VertexCFD  0.0-dev
VertexCFD_Mesh_StkReaderFactory.hpp
1 #ifndef VERTEXCFD_MESH_STKREADERFACTORY_HPP
2 #define VERTEXCFD_MESH_STKREADERFACTORY_HPP
3 
4 #include <string>
5 
6 #include <PanzerAdaptersSTK_config.hpp>
7 #include <Panzer_STK_MeshFactory.hpp>
8 
9 #include <stk_io/StkMeshIoBroker.hpp>
10 
11 namespace VertexCFD
12 {
13 namespace Mesh
14 {
15 //---------------------------------------------------------------------------//
32 int getMeshDimension(const std::string& mesh_str,
33  stk::ParallelMachine parallel_mach,
34  const bool is_exodus = true);
35 
36 //---------------------------------------------------------------------------//
47 class StkReaderFactory : public panzer_stk::STK_MeshFactory
48 {
49  public:
51 
59  StkReaderFactory(const std::string& file_name,
60  const int restart_index = 0,
61  const bool is_exodus = true);
62 
70  virtual Teuchos::RCP<panzer_stk::STK_Interface>
71  buildMesh(stk::ParallelMachine parallel_mach) const override;
72 
78  virtual Teuchos::RCP<panzer_stk::STK_Interface>
79  buildUncommitedMesh(stk::ParallelMachine parallel_mach) const override;
80 
84  virtual void
85  completeMeshConstruction(panzer_stk::STK_Interface& mesh,
86  stk::ParallelMachine parallel_mach) const override;
87 
90  void setParameterList(
91  const Teuchos::RCP<Teuchos::ParameterList>& param_list) override;
92 
94  Teuchos::RCP<const Teuchos::ParameterList>
95  getValidParameters() const override;
96 
98  const std::string& getFileName() const { return file_name_; }
99 
100  protected:
101  void registerElementBlocks(panzer_stk::STK_Interface& mesh,
102  stk::io::StkMeshIoBroker& mesh_data) const;
103  void registerSidesets(panzer_stk::STK_Interface& mesh) const;
104  void registerNodesets(panzer_stk::STK_Interface& mesh) const;
105 
106  std::string file_name_;
107  std::string decomp_method_;
108  int restart_index_;
109  bool is_exodus_;
110 
111  private:
113  bool user_mesh_scaling_;
114 
116  double mesh_scale_factor_;
117 
120  int levels_of_refinement_;
121 };
122 
123 //---------------------------------------------------------------------------//
124 
125 } // end namespace Mesh
126 } // end namespace VertexCFD
127 
128 #endif // VERTEXCFD_STKREADERFACTORY_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::Mesh::StkReaderFactory::setParameterList
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &param_list) override
From ParameterListAcceptor.
Definition: VertexCFD_Mesh_StkReaderFactory.cpp:244
VertexCFD::Mesh::StkReaderFactory::buildMesh
virtual Teuchos::RCP< panzer_stk::STK_Interface > buildMesh(stk::ParallelMachine parallel_mach) const override
Definition: VertexCFD_Mesh_StkReaderFactory.cpp:64
VertexCFD::Mesh::StkReaderFactory
Definition: VertexCFD_Mesh_StkReaderFactory.hpp:48
VertexCFD::Mesh::StkReaderFactory::getFileName
const std::string & getFileName() const
Get file name mean is read from.
Definition: VertexCFD_Mesh_StkReaderFactory.hpp:98
VertexCFD::Mesh::StkReaderFactory::getValidParameters
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
From ParameterListAcceptor.
Definition: VertexCFD_Mesh_StkReaderFactory.cpp:313
VertexCFD::Mesh::StkReaderFactory::buildUncommitedMesh
virtual Teuchos::RCP< panzer_stk::STK_Interface > buildUncommitedMesh(stk::ParallelMachine parallel_mach) const override
Definition: VertexCFD_Mesh_StkReaderFactory.cpp:83
VertexCFD::Mesh::StkReaderFactory::completeMeshConstruction
virtual void completeMeshConstruction(panzer_stk::STK_Interface &mesh, stk::ParallelMachine parallel_mach) const override
Definition: VertexCFD_Mesh_StkReaderFactory.cpp:140