|
Sierra Toolkit Version of the Day
|
00001 /*------------------------------------------------------------------------*/ 00002 /* Copyright 2010 Sandia Corporation. */ 00003 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */ 00004 /* license for use of this work by or on behalf of the U.S. Government. */ 00005 /* Export of this program may require a license from the */ 00006 /* United States Government. */ 00007 /*------------------------------------------------------------------------*/ 00008 00009 00010 //---------------------------------------------------------------------- 00011 #include <stdexcept> 00012 #include <iostream> 00013 #include <sstream> 00014 #include <algorithm> 00015 00016 #include <stk_util/util/string_case_compare.hpp> 00017 #include <stk_mesh/base/PartRelation.hpp> 00018 #include <stk_mesh/base/Part.hpp> 00019 #include <stk_mesh/baseImpl/PartImpl.hpp> 00020 00021 //---------------------------------------------------------------------- 00022 00023 namespace stk { 00024 namespace mesh { 00025 00026 namespace impl { 00027 00028 00029 void PartImpl::add_part_to_subset( Part & part) 00030 { 00031 insert( m_subsets, part ); 00032 } 00033 00034 00035 void PartImpl::add_part_to_superset( Part & part ) 00036 { 00037 insert( m_supersets, part ); 00038 } 00039 00040 void PartImpl::add_relation( PartRelation relation ) 00041 { 00042 m_relations.push_back(relation); 00043 } 00044 00045 void PartImpl::set_intersection_of( const PartVector & pv ) 00046 { 00047 m_intersect = pv ; 00048 } 00049 00050 00051 PartImpl::~PartImpl() 00052 { 00053 } 00054 00055 00056 // Subset part constructor: 00057 PartImpl::PartImpl( MetaData * arg_meta_data , 00058 const std::string & arg_name , 00059 EntityRank arg_rank , 00060 size_t arg_ordinal ) 00061 : m_name( arg_name ), 00062 m_attribute(), 00063 m_subsets() , m_supersets() , m_intersect() , m_relations() , 00064 m_mesh_meta_data( arg_meta_data ), 00065 m_universe_ordinal( arg_ordinal ), 00066 m_entity_rank( arg_rank ) 00067 {} 00068 00069 00070 00071 //---------------------------------------------------------------------- 00072 00073 00074 00075 //---------------------------------------------------------------------- 00076 00077 } // namespace impl 00078 00079 } // namespace mesh 00080 } // namespace stk 00081 00082