Skip to content
Snippets Groups Projects
Commit c4f7c0df authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MeL] Update for ptr version of getPropertyVec.

parent 9f094c46
No related branches found
No related tags found
No related merge requests found
...@@ -257,10 +257,8 @@ void scaleMeshPropertyVector(MeshLib::Mesh & mesh, ...@@ -257,10 +257,8 @@ void scaleMeshPropertyVector(MeshLib::Mesh & mesh,
std::string const& property_name, std::string const& property_name,
double factor) double factor)
{ {
boost::optional<MeshLib::PropertyVector<double> &> pv( for (auto& v :
mesh.getProperties().getPropertyVector<double>(property_name)); *mesh.getProperties().getPropertyVector<double>(property_name))
for (auto & v : *pv)
v *= factor; v *= factor;
} }
......
...@@ -215,9 +215,8 @@ void addPropertyToMesh(MeshLib::Mesh& mesh, std::string const& name, ...@@ -215,9 +215,8 @@ void addPropertyToMesh(MeshLib::Mesh& mesh, std::string const& name,
mesh.getNumberOfElements(), mesh.getNumberOfElements(),
values.size() / number_of_components); values.size() / number_of_components);
boost::optional<MeshLib::PropertyVector<T>&> property( auto* const property = mesh.getProperties().createNewPropertyVector<T>(
mesh.getProperties().createNewPropertyVector<T>(name, item_type, name, item_type, number_of_components);
number_of_components));
if (!property) if (!property)
{ {
OGS_FATAL("Error while creating PropertyVector \"%s\".", name.c_str()); OGS_FATAL("Error while creating PropertyVector \"%s\".", name.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment