22 WARN(
"A property of the name '{:s}' does not exist.", name);
36 std::vector<std::string> names;
38 std::back_inserter(names),
39 [](
auto const& pair) { return std::string(pair.first); });
46 std::vector<std::string> names;
49 if (p.second->getMeshItemType() == t)
51 names.push_back(std::string(p.first));
58 std::vector<std::size_t>
const& exclude_elem_ids,
59 std::vector<std::size_t>
const& exclude_node_ids)
const
67 name_vector_pair.first,
68 name_vector_pair.second->clone(exclude_elem_ids)));
70 else if (name_vector_pair.second->getMeshItemType() ==
74 name_vector_pair.first,
75 name_vector_pair.second->clone(exclude_node_ids)));
82 std::vector<MeshItemType>
const& exclude_mesh_item_types)
const
87 if (std::find(exclude_mesh_item_types.begin(),
88 exclude_mesh_item_types.end(),
89 name_vector_pair.second->getMeshItemType()) !=
90 exclude_mesh_item_types.end())
95 std::vector<std::size_t>
const exclude_positions{};
97 std::make_pair(name_vector_pair.first,
98 name_vector_pair.second->clone(exclude_positions)));
100 return new_properties;
104 : _properties(properties._properties)
109 name_vector_pair.second = t;
115 if (&properties ==
this)
121 std::vector<std::size_t> exclude_positions;
125 name_vector_pair.second->clone(exclude_positions));
126 name_vector_pair.second = t;
136 delete name_vector_pair.second;
172 {
return p.second->getMeshItemType() == mesh_item_type; });
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the class Properties that implements a container of properties.
Property manager on mesh items. Class Properties manages scalar, vector or matrix properties....
std::vector< std::string > getPropertyVectorNames() const
std::map< std::string, PropertyVectorBase * > _properties
bool hasPropertyVector(std::string_view name) const
std::map< std::string, PropertyVectorBase * >::size_type size() const
Properties excludeCopyProperties(std::vector< std::size_t > const &exclude_elem_ids, std::vector< std::size_t > const &exclude_node_ids) const
std::map< std::string, PropertyVectorBase * >::const_iterator begin() const
std::map< std::string, PropertyVectorBase * >::const_iterator end() const
void removePropertyVector(std::string_view name)
Properties & operator=(Properties const &properties)