UnitTestGridMeshFixture.hpp

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_GRID_MESH_FIXTURE_HPP
00010 #define STK_MESH_UNITTEST_GRID_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 
00017 class GridMeshFixture
00018 {
00019 private:
00020 
00021   stk::mesh::MetaData m_meta_data;
00022   stk::mesh::BulkData m_bulk_data;
00023   stk::mesh::Part   & m_quad_part;
00024   stk::mesh::Part   & m_shell_part;
00025   std::vector<stk::mesh::Entity*> m_closure;
00026 
00027 public:
00028   // intentionally exposed to the public
00029   std::vector<stk::mesh::EntityId> m_node_ids;
00030   std::vector<stk::mesh::EntityId> m_quad_face_ids;
00031   std::vector<stk::mesh::EntityId> m_shell_face_ids;
00032 
00033   GridMeshFixture(stk::ParallelMachine pm);
00034 
00035   ~GridMeshFixture();
00036 
00037   stk::mesh::MetaData& meta_data() { return m_meta_data; }
00038   stk::mesh::BulkData& bulk_data() { return m_bulk_data; }
00039 
00040   const std::vector<stk::mesh::Entity*>& get_predefined_closure() const
00041   { return m_closure; }
00042 
00043 private:
00044   void generate_grid();
00045 };
00046 
00047 #endif
00048 

Generated on Tue Jul 13 09:27:32 2010 for Sierra Toolkit by  doxygen 1.4.7