25 std::string
const& property_name,
27 int const number_of_components)
29 if (property_name.empty())
32 "Trying to get or to create a mesh property with empty name.");
35 auto numberOfMeshItems = [&mesh, &item_type]() -> std::size_t
48 "getOrCreateMeshProperty cannot handle other "
49 "types than Node, Cell, or IntegrationPoint.");
57 mesh.
getProperties().template getPropertyVector<T>(property_name);
63 assert(result->size() ==
64 numberOfMeshItems() * number_of_components);
69 auto result = mesh.
getProperties().template createNewPropertyVector<T>(
70 property_name, item_type, number_of_components);
72 result->resize(numberOfMeshItems() * number_of_components);