GRINS-0.6.0
physics_factory.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_PHYSICS_FACTORY_H
27 #define GRINS_PHYSICS_FACTORY_H
28 
29 // C++
30 #include <string>
31 
32 // GRINS stuff
33 #include "grins/var_typedefs.h"
34 
35 // libMesh forward declarations
36 class GetPot;
37 
38 namespace GRINS
39 {
41 
46  {
47  public:
48 
50 
52  virtual ~PhysicsFactory();
53 
55  GRINS::PhysicsList build(const GetPot& input);
56 
57  typedef std::tr1::shared_ptr<Physics> PhysicsPtr;
58  typedef std::pair< std::string, PhysicsPtr > PhysicsPair;
59 
60  protected:
61 
63 
68  virtual void add_physics( const GetPot& input,
69  const std::string& physics_to_add,
70  GRINS::PhysicsList& physics_list );
71 
73 
78  virtual void check_physics_consistency( const GRINS::PhysicsList& physics_list );
79 
81  void physics_consistency_error( const std::string physics_checked,
82  const std::string physics_required ) const;
83 
84  }; // class PhysicsFactory
85 
86 } // namespace GRINS
87 
88 #endif // GRINS_PHYSICS_FACTORY_H
void physics_consistency_error(const std::string physics_checked, const std::string physics_required) const
Utility function.
std::map< std::string, std::tr1::shared_ptr< GRINS::Physics > > PhysicsList
Container for GRINS::Physics object pointers.
Definition: var_typedefs.h:57
std::pair< std::string, PhysicsPtr > PhysicsPair
virtual ~PhysicsFactory()
Destructor does not need to delete std::tr1::shared_ptr's.
GRINS namespace.
Object for constructing list of physics for simulation.
virtual void check_physics_consistency(const GRINS::PhysicsList &physics_list)
Make sure the requested GRINS::Physics classes are consistent.
std::tr1::shared_ptr< Physics > PhysicsPtr
GRINS::PhysicsList build(const GetPot &input)
Builds PhysicsList. This is the primary function of this class.
virtual void add_physics(const GetPot &input, const std::string &physics_to_add, GRINS::PhysicsList &physics_list)
Figures out which GRINS::Physics pointer to create.

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