GRINS-0.6.0
simulation_builder.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 
26 #ifndef GRINS_SIMULATION_BUILDER_H
27 #define GRINS_SIMULATION_BUILDER_H
28 
29 // GRINS
30 #include "grins/physics_factory.h"
31 #include "grins/mesh_builder.h"
32 #include "grins/solver_factory.h"
34 #include "grins/bc_factory.h"
35 #include "grins/qoi_factory.h"
38 
39 namespace GRINS
40 {
42  {
43  public:
44 
46  virtual ~SimulationBuilder();
47 
48  std::tr1::shared_ptr<libMesh::UnstructuredMesh> build_mesh
49  ( const GetPot& input,
50  const libMesh::Parallel::Communicator &comm
51  LIBMESH_CAN_DEFAULT_TO_COMMWORLD );
52 
53  GRINS::PhysicsList build_physics( const GetPot& input );
54 
55  std::tr1::shared_ptr<GRINS::Solver> build_solver( const GetPot& input );
56 
57  std::tr1::shared_ptr<GRINS::Visualization> build_vis
58  ( const GetPot& input,
59  const libMesh::Parallel::Communicator &comm
60  LIBMESH_CAN_DEFAULT_TO_COMMWORLD );
61 
62  std::multimap< GRINS::PhysicsName, GRINS::DBCContainer > build_dirichlet_bcs();
63 
64  std::map< GRINS::PhysicsName, GRINS::NBCContainer > build_neumann_bcs( libMesh::EquationSystems& equation_system );
65 
66  std::tr1::shared_ptr<CompositeQoI> build_qoi( const GetPot& input );
67 
68  std::tr1::shared_ptr<PostProcessedQuantities<libMesh::Real> > build_postprocessing( const GetPot& input );
69 
70  std::tr1::shared_ptr<libMesh::ErrorEstimator> build_error_estimator( const GetPot& input,
71  const libMesh::QoISet& qoi_set );
72 
73  void attach_physics_factory( std::tr1::shared_ptr<PhysicsFactory> physics_factory );
74 
75  void attach_solver_factory( std::tr1::shared_ptr<SolverFactory> solver_factory );
76 
77  void attach_mesh_builder( std::tr1::shared_ptr<MeshBuilder> mesh_builder );
78 
79  void attach_vis_factory( std::tr1::shared_ptr<VisualizationFactory> vis_factory );
80 
81  void attach_bc_factory( std::tr1::shared_ptr<BoundaryConditionsFactory> bc_factory );
82 
83  void attach_qoi_factory( std::tr1::shared_ptr<QoIFactory> qoi_factory );
84 
85  void attach_postprocessing_factory( std::tr1::shared_ptr<PostprocessingFactory> postprocessing_factory );
86 
87  void attach_error_estimator_factory( std::tr1::shared_ptr<ErrorEstimatorFactory> error_estimator_factory );
88 
89  const MeshBuilder& mesh_builder() const;
90 
91  protected:
92 
93  std::tr1::shared_ptr<PhysicsFactory> _physics_factory;
94  std::tr1::shared_ptr<MeshBuilder> _mesh_builder;
95  std::tr1::shared_ptr<SolverFactory> _solver_factory;
96  std::tr1::shared_ptr<VisualizationFactory> _vis_factory;
97  std::tr1::shared_ptr<BoundaryConditionsFactory> _bc_factory;
98  std::tr1::shared_ptr<QoIFactory> _qoi_factory;
99  std::tr1::shared_ptr<PostprocessingFactory> _postprocessing_factory;
100  std::tr1::shared_ptr<ErrorEstimatorFactory> _error_estimator_factory;
101 
102  }; //class SimulationBuilder
103 } // namespace GRINS
104 
105 #endif //GRINS_SIMULATION_BUILDER_H
std::tr1::shared_ptr< CompositeQoI > build_qoi(const GetPot &input)
std::map< std::string, std::tr1::shared_ptr< GRINS::Physics > > PhysicsList
Container for GRINS::Physics object pointers.
Definition: var_typedefs.h:57
std::tr1::shared_ptr< libMesh::ErrorEstimator > build_error_estimator(const GetPot &input, const libMesh::QoISet &qoi_set)
void attach_mesh_builder(std::tr1::shared_ptr< MeshBuilder > mesh_builder)
std::tr1::shared_ptr< PostProcessedQuantities< libMesh::Real > > build_postprocessing(const GetPot &input)
void attach_qoi_factory(std::tr1::shared_ptr< QoIFactory > qoi_factory)
std::tr1::shared_ptr< BoundaryConditionsFactory > _bc_factory
std::map< GRINS::PhysicsName, GRINS::NBCContainer > build_neumann_bcs(libMesh::EquationSystems &equation_system)
void attach_vis_factory(std::tr1::shared_ptr< VisualizationFactory > vis_factory)
void attach_solver_factory(std::tr1::shared_ptr< SolverFactory > solver_factory)
GRINS namespace.
std::tr1::shared_ptr< MeshBuilder > _mesh_builder
std::tr1::shared_ptr< GRINS::Solver > build_solver(const GetPot &input)
GRINS::PhysicsList build_physics(const GetPot &input)
const MeshBuilder & mesh_builder() const
std::tr1::shared_ptr< ErrorEstimatorFactory > _error_estimator_factory
std::multimap< GRINS::PhysicsName, GRINS::DBCContainer > build_dirichlet_bcs()
void attach_postprocessing_factory(std::tr1::shared_ptr< PostprocessingFactory > postprocessing_factory)
std::tr1::shared_ptr< SolverFactory > _solver_factory
void attach_physics_factory(std::tr1::shared_ptr< PhysicsFactory > physics_factory)
std::tr1::shared_ptr< QoIFactory > _qoi_factory
void attach_error_estimator_factory(std::tr1::shared_ptr< ErrorEstimatorFactory > error_estimator_factory)
std::tr1::shared_ptr< PhysicsFactory > _physics_factory
std::tr1::shared_ptr< libMesh::UnstructuredMesh > build_mesh(const GetPot &input, const libMesh::Parallel::Communicator &comm LIBMESH_CAN_DEFAULT_TO_COMMWORLD)
std::tr1::shared_ptr< VisualizationFactory > _vis_factory
void attach_bc_factory(std::tr1::shared_ptr< BoundaryConditionsFactory > bc_factory)
std::tr1::shared_ptr< PostprocessingFactory > _postprocessing_factory
std::tr1::shared_ptr< GRINS::Visualization > build_vis(const GetPot &input, const libMesh::Parallel::Communicator &comm LIBMESH_CAN_DEFAULT_TO_COMMWORLD)

Generated on Mon Jun 22 2015 21:32:20 for GRINS-0.6.0 by  doxygen 1.8.9.1