Sierra Toolkit Version of the Day
RingFixture.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_FIXTURES_RING_FIXTURE_HPP
00010 #define STK_MESH_FIXTURES_RING_FIXTURE_HPP
00011 
00012 #include <stk_util/parallel/Parallel.hpp>
00013 
00014 #include <stk_util/environment/ReportHandler.hpp>
00015 
00016 #include <stk_mesh/base/Types.hpp>
00017 #include <stk_mesh/base/MetaData.hpp>
00018 #include <stk_mesh/base/BulkData.hpp>
00019 #include <stk_mesh/base/MetaData.hpp>
00020 #include <stk_mesh/base/Entity.hpp>
00021 #include <stk_mesh/base/EntityComm.hpp>
00022 #include <stk_mesh/base/GetEntities.hpp>
00023 
00024 #include <stk_mesh/fem/FEMMetaData.hpp>
00025 
00026 #include <Shards_BasicTopologies.hpp>
00027 
00028 namespace stk {
00029 namespace mesh {
00030 namespace fixtures {
00031 
00037 class RingFixture {
00038  public:
00039   const int             m_spatial_dimension;
00040   fem::FEMMetaData      m_meta_data;
00041   BulkData              m_bulk_data;
00042   PartVector            m_edge_parts ;
00043   Part &                m_edge_part_extra ;
00044   const size_t          m_num_edge_per_proc ;
00045   std::vector<EntityId> m_node_ids , m_edge_ids ;
00046 
00047   RingFixture( stk::ParallelMachine pm ,
00048                unsigned num_edge_per_proc = 10 ,
00049                bool use_edge_parts = false );
00050 
00051   ~RingFixture() {}
00052 
00057   void generate_mesh();
00058 
00062   void fixup_node_ownership();
00063 
00064  private:
00065 
00066    RingFixture();
00067    RingFixture( const RingFixture & );
00068    RingFixture & operator = ( const RingFixture & );
00069 };
00070 
00071 }
00072 }
00073 }
00074 
00075 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines