41 #include "DTK_STKMeshEntityPredicates.hpp" 43 #include <stk_mesh/base/MetaData.hpp> 51 bool STKPartPredicate::operator()( Entity entity )
53 for (
auto part_it = b_part_ids.begin(); part_it != b_part_ids.end();
56 if ( !entity.inBlock( *part_it ) )
67 STKPartNamePredicate::STKPartNamePredicate(
68 const Teuchos::Array<std::string> &part_names,
69 const Teuchos::RCP<stk::mesh::BulkData> &bulk_data )
71 stk::mesh::Part *part = 0;
72 for (
auto name_it = part_names.begin(); name_it != part_names.end();
75 part = bulk_data->mesh_meta_data().get_part( *name_it );
76 this->b_part_ids.push_back( part->mesh_meta_data_ordinal() );
83 STKPartVectorPredicate::STKPartVectorPredicate(
84 const stk::mesh::PartVector &parts )
86 for (
auto part_it = parts.begin(); part_it != parts.end(); ++part_it )
88 this->b_part_ids.push_back( ( *part_it )->mesh_meta_data_ordinal() );
95 STKSelectorPredicate::STKSelectorPredicate(
96 const stk::mesh::Selector &selector )
98 stk::mesh::PartVector parts;
99 selector.get_parts( parts );
100 for (
auto part_it = parts.begin(); part_it != parts.end(); ++part_it )
102 this->b_part_ids.push_back( ( *part_it )->mesh_meta_data_ordinal() );