|
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 #ifndef stk_mesh_unit_tests_SelectorFixture_hpp 00010 #define stk_mesh_unit_tests_SelectorFixture_hpp 00011 00012 #include <stk_mesh/base/MetaData.hpp> 00013 #include <stk_mesh/base/BulkData.hpp> 00014 #include <stk_mesh/base/Types.hpp> 00015 00016 namespace stk { 00017 namespace mesh { 00018 namespace fixtures { 00019 00020 // Example Mesh primarily used for testing Selectors: 00021 // 00022 // PartA, PartB, PartC, PartD 00023 // Entity1, Entity2, Entity3, Entity4 00024 // All entities are rank 0 00025 // 00026 // PartA contains Entity1, Entity2 00027 // PartB contains Entity2, Entity3 00028 // PartC contains Entity3, Entity4 00029 // PartD contains no entities 00030 // Entity5 is not contained in any user-defined Part 00031 // 00032 // |----------|--|-------|--|----------| |-------------| 00033 // |<--PartA---->| |<--PartC---->| | PartD | 00034 // | |<---PartB--->| | | | 00035 // | 1 |2 | |3 | 4 | 5 | | 00036 // | | | | | | | | 00037 // | | | | | | | | 00038 // |----------|--|-------|--|----------| |-------------| 00039 // 00040 00041 class SelectorFixture { 00042 public: 00043 SelectorFixture(); 00044 ~SelectorFixture(); 00045 00046 const stk::mesh::MetaData & get_MetaData() const { return m_MetaData ; } 00047 stk::mesh::MetaData & get_NonconstMetaData() { return m_MetaData ; } 00048 00049 const stk::mesh::BulkData & get_BulkData() const { return m_BulkData ; } 00050 stk::mesh::BulkData & get_NonconstBulkData() { return m_BulkData ; } 00051 00052 stk::mesh::MetaData m_MetaData ; 00053 stk::mesh::BulkData m_BulkData ; 00054 00055 stk::mesh::Part & m_partA ; 00056 stk::mesh::Part & m_partB ; 00057 stk::mesh::Part & m_partC ; 00058 stk::mesh::Part & m_partD ; 00059 00060 stk::mesh::Entity * m_entity1 ; 00061 stk::mesh::Entity * m_entity2 ; 00062 stk::mesh::Entity * m_entity3 ; 00063 stk::mesh::Entity * m_entity4 ; 00064 stk::mesh::Entity * m_entity5 ; 00065 00066 private: 00067 SelectorFixture( const SelectorFixture & ); 00068 SelectorFixture & operator = ( const SelectorFixture & ); 00069 }; 00070 00071 class VariableSelectorFixture { 00072 public: 00073 VariableSelectorFixture(int NumParts); 00074 ~VariableSelectorFixture(); 00075 00076 stk::mesh::MetaData m_MetaData ; 00077 stk::mesh::BulkData m_BulkData ; 00078 00079 stk::mesh::PartVector m_declared_part_vector; 00080 std::vector<stk::mesh::Entity*> m_entities ; 00081 00082 private: 00083 VariableSelectorFixture( const VariableSelectorFixture & ); 00084 VariableSelectorFixture & operator = ( const VariableSelectorFixture & ); 00085 }; 00086 00087 00088 00089 } // fixtures 00090 } // mesh 00091 } // stk 00092 00093 #endif // stk_mesh_unit_tests_UnitTestFixture_hpp