Sierra Toolkit  Version of the Day
Gmesh_STKmesh_Fixture.hpp
1 #ifndef stk_io_util_Gmesh_STKmesh_Fixture_hpp
2 #define stk_io_util_Gmesh_STKmesh_Fixture_hpp
3 
4 #include <stk_util/parallel/Parallel.hpp>
5 #include <stk_mesh/base/Types.hpp>
6 #include <stk_mesh/fem/FEMMetaData.hpp>
7 #include <stk_mesh/base/BulkData.hpp>
8 #include <stk_io/MeshReadWriteUtils.hpp>
9 
10 #include <vector>
11 #include <string>
12 
13 namespace stk_classic {
14 namespace io {
15 namespace util {
16 
22 {
23  public:
24 
34  Gmesh_STKmesh_Fixture(stk_classic::ParallelMachine comm, const std::string& gmesh_spec);
35 
40  void commit();
41 
47  size_t getSurfElemCount(size_t surf_id) const;
48 
57  std::pair<int, double> getSurfCoordInfo(size_t surf_id) const;
58 
62  size_t getSideCount() const;
63 
67  size_t getElemCount() const;
68 
72  size_t getNodeCount() const;
73 
77  const std::vector<std::string> & getSidesetNames() const
78  { return m_sideset_names; }
79 
84  { return m_sideset_parts; }
85 
93  { return m_meta_data.get_meta_data(m_meta_data); }
94 
95  const stk_classic::mesh::fem::FEMMetaData & getFEMMetaData() const
96  { return m_meta_data; }
97 
98  stk_classic::mesh::fem::FEMMetaData & getFEMMetaData()
99  { return m_meta_data; }
100 
105  { return m_bulk_data; }
106 
108  { return m_bulk_data; }
109 
110  private:
113 
115  stk_classic::mesh::BulkData m_bulk_data;
116 
122  stk_classic::io::MeshData m_mesh_data;
123 
125  std::vector<std::string> m_sideset_names;
126 
128  stk_classic::mesh::PartVector m_sideset_parts;
129 
131  int m_num_x;
132 
134  int m_num_y;
135 
137  int m_num_z;
138 };
139 
140 }//namespace util
141 }//namespace io
142 }//namespace stk_classic
143 
144 #endif
std::pair< int, double > getSurfCoordInfo(size_t surf_id) const
FEMMetaData is a class that implements a Finite Element Method skin on top of the Sierra Tool Kit Met...
Definition: FEMMetaData.hpp:54
The manager of an integrated collection of parts and fields.
Definition: MetaData.hpp:56
const std::vector< std::string > & getSidesetNames() const
const stk_classic::mesh::PartVector & getSideParts() const
Gmesh_STKmesh_Fixture(stk_classic::ParallelMachine comm, const std::string &gmesh_spec)
Manager for an integrated collection of entities, entity relations, and buckets of field data...
Definition: BulkData.hpp:49
static MetaData & get_meta_data(FEMMetaData &fem_meta)
Getter for MetaData off of a FEMMetaData object.
Sierra Toolkit.
MPI_Comm ParallelMachine
Definition: Parallel.hpp:32
const stk_classic::mesh::BulkData & getBulkData() const
std::vector< Part *> PartVector
Collections of parts are frequently maintained as a vector of Part pointers.
Definition: Types.hpp:31