|
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_UNITTEST_RING_MESH_FIXTURE_HPP 00010 #define STK_MESH_UNITTEST_RING_MESH_FIXTURE_HPP 00011 00012 #include <stk_util/parallel/Parallel.hpp> 00013 #include <stk_mesh/base/Types.hpp> 00014 #include <stk_mesh/base/MetaData.hpp> 00015 #include <stk_mesh/base/BulkData.hpp> 00016 #include <stk_mesh/fem/TopologicalMetaData.hpp> 00017 00023 class UnitTestRingMeshFixture { 00024 public: 00025 const int m_spatial_dimension; 00026 stk::mesh::MetaData m_meta_data; 00027 stk::mesh::BulkData m_bulk_data; 00028 stk::mesh::TopologicalMetaData m_top_data; 00029 stk::mesh::PartVector m_edge_parts ; 00030 stk::mesh::Part & m_edge_part_extra ; 00031 const size_t m_num_edge_per_proc ; 00032 std::vector<stk::mesh::EntityId> m_node_ids , m_edge_ids ; 00033 00034 UnitTestRingMeshFixture( stk::ParallelMachine pm , 00035 unsigned num_edge_per_proc = 10 , 00036 bool use_edge_parts = false ); 00037 00038 ~UnitTestRingMeshFixture(); 00039 00040 // Testing for a simple loop of mesh entities: 00041 // node[i] : edge[i] : node[ ( i + 1 ) % node.size() ] 00042 void generate_mesh( bool generate_aura = true ); 00043 00044 void test_shift_loop( bool generate_aura ); 00045 00046 private: 00047 00048 UnitTestRingMeshFixture(); 00049 UnitTestRingMeshFixture( const UnitTestRingMeshFixture & ); 00050 UnitTestRingMeshFixture & operator = ( const UnitTestRingMeshFixture & ); 00051 }; 00052 00053 #endif