GRINS-0.8.0
simulation_builder.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 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 // This class
28 
29 // libMesh
30 #include "libmesh/error_estimator.h"
31 #include "libmesh/adjoint_refinement_estimator.h"
32 
33 namespace GRINS
34 {
36  : _mesh_builder( new MeshBuilder ),
37  _vis_factory( new VisualizationFactory ),
38  _qoi_factory( new QoIFactory ),
39  _postprocessing_factory( new PostprocessingFactory )
40  {}
41 
42  void SimulationBuilder::attach_mesh_builder( SharedPtr<MeshBuilder> mesh_builder )
43  {
45  return;
46  }
47 
48  void SimulationBuilder::attach_vis_factory( SharedPtr<VisualizationFactory> vis_factory )
49  {
50  this->_vis_factory = vis_factory;
51  return;
52  }
53 
54  void SimulationBuilder::attach_qoi_factory( SharedPtr<QoIFactory> qoi_factory )
55  {
56  this->_qoi_factory = qoi_factory;
57  }
58 
59  void SimulationBuilder::attach_postprocessing_factory( SharedPtr<PostprocessingFactory> postprocessing_factory )
60  {
61  this->_postprocessing_factory = postprocessing_factory;
62  }
63 
64  SharedPtr<libMesh::UnstructuredMesh> SimulationBuilder::build_mesh
65  ( const GetPot& input,
66  const libMesh::Parallel::Communicator &comm)
67  {
68  return (this->_mesh_builder)->build(input, comm);
69  }
70 
71  SharedPtr<GRINS::Visualization> SimulationBuilder::build_vis
72  ( const GetPot& input,
73  const libMesh::Parallel::Communicator &comm)
74  {
75  return (this->_vis_factory)->build(input, comm);
76  }
77 
78  SharedPtr<CompositeQoI> SimulationBuilder::build_qoi( const GetPot& input )
79  {
80  return (this->_qoi_factory)->build(input);
81  }
82 
83  SharedPtr<PostProcessedQuantities<libMesh::Real> >
85  {
86  return (this->_postprocessing_factory)->build(input);
87  }
88 
90  {
91  return *_mesh_builder;
92  }
93 
94 } //namespace GRINS
SharedPtr< VisualizationFactory > _vis_factory
SharedPtr< CompositeQoI > build_qoi(const GetPot &input)
GRINS namespace.
const MeshBuilder & mesh_builder() const
SharedPtr< QoIFactory > _qoi_factory
void attach_mesh_builder(SharedPtr< MeshBuilder > mesh_builder)
SharedPtr< PostprocessingFactory > _postprocessing_factory
This object handles constructing the postprocessing object to be used.
void attach_vis_factory(SharedPtr< VisualizationFactory > vis_factory)
SharedPtr< MeshBuilder > _mesh_builder
void attach_qoi_factory(SharedPtr< QoIFactory > qoi_factory)
SharedPtr< GRINS::Visualization > build_vis(const GetPot &input, const libMesh::Parallel::Communicator &comm LIBMESH_CAN_DEFAULT_TO_COMMWORLD)
SharedPtr< PostProcessedQuantities< libMesh::Real > > build_postprocessing(const GetPot &input)
SharedPtr< libMesh::UnstructuredMesh > build_mesh(const GetPot &input, const libMesh::Parallel::Communicator &comm LIBMESH_CAN_DEFAULT_TO_COMMWORLD)
void attach_postprocessing_factory(SharedPtr< PostprocessingFactory > postprocessing_factory)

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1