16 #include <stk_util/util/string_case_compare.hpp> 18 #include <stk_mesh/base/PartRelation.hpp> 19 #include <stk_mesh/base/Part.hpp> 20 #include <stk_mesh/base/Trace.hpp> 22 #include <stk_mesh/baseImpl/PartImpl.hpp> 23 #include <stk_util/environment/ReportHandler.hpp> 32 void PartImpl::add_part_to_subset( Part & part)
34 TraceIfWatching(
"stk_classic::mesh::impl::PartImpl::add_part_to_subset", LOG_PART, m_universe_ordinal);
35 DiagIfWatching(LOG_PART, m_universe_ordinal,
"New subset is: " << part );
41 void PartImpl::add_part_to_superset( Part & part )
43 TraceIfWatching(
"stk_classic::mesh::impl::PartImpl::add_part_to_superset", LOG_PART, m_universe_ordinal);
44 DiagIfWatching(LOG_PART, m_universe_ordinal,
"New superset is: " << part );
46 insert( m_supersets, part );
49 void PartImpl::add_relation( PartRelation relation )
51 TraceIfWatching(
"stk_classic::mesh::impl::PartImpl::add_relation", LOG_PART, m_universe_ordinal);
52 DiagIfWatching(LOG_PART, m_universe_ordinal,
"New relation from: " << relation.m_root <<
", to: " << relation.m_target );
54 m_relations.push_back(relation);
57 void PartImpl::set_intersection_of(
const PartVector & pv )
59 TraceIfWatching(
"stk_classic::mesh::impl::PartImpl::set_intersection_of", LOG_PART, m_universe_ordinal);
60 DiagIfWatching(LOG_PART, m_universe_ordinal,
"Intersection: " << pv );
66 PartImpl::PartImpl( MetaData * arg_meta_data ,
67 const std::string & arg_name ,
72 m_subsets() , m_supersets() , m_intersect() , m_relations() ,
73 m_mesh_meta_data( arg_meta_data ),
74 m_universe_ordinal( arg_ordinal ),
75 m_entity_rank( arg_rank )
78 void PartImpl::set_primary_entity_rank( EntityRank
entity_rank )
80 TraceIfWatching(
"stk_classic::mesh::impl::PartImpl::set_primary_entity_rank", LOG_PART, m_universe_ordinal);
83 const bool rank_already_set = m_entity_rank != InvalidEntityRank &&
entity_rank != m_entity_rank;
89 ThrowErrorMsgIf( rank_already_set,
" Error: Different entity rank has already been set on Part");
std::vector< Part *> PartVector
Collections of parts are frequently maintained as a vector of Part pointers.
EntityRank entity_rank(const EntityKey &key)
Given an entity key, return an entity type (rank).
bool insert(PartVector &v, Part &part)
Insert a part into a properly ordered collection of parts. Returns true if this is a new insertion...