Skip to content
Snippets Groups Projects
Commit 46038e55 authored by Norihiro Watanabe's avatar Norihiro Watanabe
Browse files

[Mesh/Properties] add the second version of excludeCopyProperties() with mesh item types

parent bd789c2a
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,26 @@ Properties Properties::excludeCopyProperties(
return exclude_copy;
}
Properties Properties::excludeCopyProperties(
std::vector<MeshItemType> const& exclude_mesh_item_types) const
{
Properties new_properties;
for (auto property_vector : _properties) {
if (std::find(exclude_mesh_item_types.begin(),
exclude_mesh_item_types.end(),
property_vector.second->getMeshItemType()) !=
exclude_mesh_item_types.end())
continue;
std::vector<std::size_t> const exclude_positions;
new_properties._properties.insert(
std::make_pair(property_vector.first,
property_vector.second->clone(exclude_positions))
);
}
return new_properties;
}
Properties::Properties(Properties const& properties)
: _properties(properties._properties)
{
......
......@@ -107,6 +107,12 @@ public:
std::vector<std::size_t> const& exclude_elem_ids,
std::vector<std::size_t> const& exclude_node_ids) const;
/** copy all PropertyVector objects stored in the (internal) map but
* PropertyVector objects with the given MeshItemType are excluded.
*/
Properties excludeCopyProperties(
std::vector<MeshItemType> const& exclude_mesh_item_types) const;
Properties() {}
Properties(Properties const& properties);
......
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