26 std::string
const& property_name,
28 int const number_of_components)
30 if (property_name.empty())
33 "Trying to get or to create a mesh property with empty name.");
36 auto numberOfMeshItems = [&mesh, &item_type]() -> std::size_t
49 "getOrCreateMeshProperty cannot handle other "
50 "types than Node, Cell, or IntegrationPoint.");
58 mesh.
getProperties().template getPropertyVector<T>(property_name);
64 assert(result->size() ==
65 numberOfMeshItems() * number_of_components);
70 auto result = mesh.
getProperties().template createNewPropertyVector<T>(
71 property_name, item_type, number_of_components);
73 result->resize(numberOfMeshItems() * number_of_components);