GRINS-0.8.0
variable_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-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 #ifndef GRINS_VARIABLE_BUILDER_H
26 #define GRINS_VARIABLE_BUILDER_H
27 
28 // GRINS
29 #include "grins/shared_ptr.h"
31 
32 // libMesh
33 #include "libmesh/auto_ptr.h" // libMesh::UniquePtr
34 
35 // libMesh forward declarations
36 class GetPot;
37 
38 namespace GRINS
39 {
40  // Forward declarations
41  class MultiphysicsSystem;
42 
44 
48  {
49  public:
50 
53 
54  static void build_variables( const GetPot& input,
55  MultiphysicsSystem& system );
56 
58  virtual void build_variables_impl( const GetPot& input,
59  MultiphysicsSystem& system ) =0;
60 
61  protected:
62 
64  void add_variable_to_warehouse( SharedPtr<FEVariablesBase>& fe_var,
65  const std::string& var_name );
66 
68 
71  const std::vector<std::string>& var_names,
72  const std::string& fe_family,
73  const std::string& order,
74  std::vector<VariableIndex>& var_indices,
75  const std::set<libMesh::subdomain_id_type>& subdomain_ids);
76 
77 
79  SharedPtr<FEVariablesBase> build_fe_var( const std::string& var_type,
80  const std::vector<std::string>& var_names,
81  const std::vector<VariableIndex>& var_indices,
82  const std::set<libMesh::subdomain_id_type>& subdomain_ids );
83 
84  };
85 } // end namespace GRINS
86 
87 #endif // GRINS_VARIABLE_BUILDER_H
virtual void build_variables_impl(const GetPot &input, MultiphysicsSystem &system)=0
Implementation of Variable construction done in subclasses.
void add_variable_to_warehouse(SharedPtr< FEVariablesBase > &fe_var, const std::string &var_name)
Adds/registers the fe_var to VariableWarehouse.
GRINS namespace.
Manages runtime construction of the FEVariableBase objects.
void add_vars_to_system(MultiphysicsSystem &system, const std::vector< std::string > &var_names, const std::string &fe_family, const std::string &order, std::vector< VariableIndex > &var_indices, const std::set< libMesh::subdomain_id_type > &subdomain_ids)
Given the names, family, and order, this adds the variables to the system and populates var_indices...
static void build_variables(const GetPot &input, MultiphysicsSystem &system)
Interface with libMesh for solving Multiphysics problems.
SharedPtr< FEVariablesBase > build_fe_var(const std::string &var_type, const std::vector< std::string > &var_names, const std::vector< VariableIndex > &var_indices, const std::set< libMesh::subdomain_id_type > &subdomain_ids)
Sets appropriate data in the VariableFactoryAbstract and calls VariableFactoryAbstract::build() ...

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