19 std::map<std::string, PropertyVectorBase*>::const_iterator it(
23 WARN(
"A property of the name '{:s}' does not exist.",
name);
37 std::vector<std::string> names;
39 std::back_inserter(names),
40 [](
auto const& pair) { return pair.first; });
47 std::vector<std::string> names;
50 if (p.second->getMeshItemType() == t)
52 names.push_back(p.first);
59 std::vector<std::size_t>
const& exclude_elem_ids,
60 std::vector<std::size_t>
const& exclude_node_ids)
const
68 name_vector_pair.first,
69 name_vector_pair.second->clone(exclude_elem_ids)));
71 else if (name_vector_pair.second->getMeshItemType() ==
75 name_vector_pair.first,
76 name_vector_pair.second->clone(exclude_node_ids)));
83 std::vector<MeshItemType>
const& exclude_mesh_item_types)
const
88 if (std::find(exclude_mesh_item_types.begin(),
89 exclude_mesh_item_types.end(),
90 name_vector_pair.second->getMeshItemType()) !=
91 exclude_mesh_item_types.end())
96 std::vector<std::size_t>
const exclude_positions{};
98 std::make_pair(name_vector_pair.first,
99 name_vector_pair.second->clone(exclude_positions)));
101 return new_properties;
105 : _properties(properties._properties)
107 std::vector<std::size_t> exclude_positions;
111 name_vector_pair.second->clone(exclude_positions));
112 name_vector_pair.second = t;
118 if (&properties ==
this)
124 std::vector<std::size_t> exclude_positions;
128 name_vector_pair.second->clone(exclude_positions));
129 name_vector_pair.second = t;
139 delete name_vector_pair.second;
175 {
return p.second->getMeshItemType() == mesh_item_type; });
void WARN(char const *fmt, Args const &... 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....
bool hasPropertyVector(std::string const &name) const
std::vector< std::string > getPropertyVectorNames() const
std::map< std::string, PropertyVectorBase * > _properties
void removePropertyVector(std::string const &name)
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
Properties & operator=(Properties const &properties)