GRINS-0.8.0
default_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_DEFAULT_VARIABLE_BUILDER_H
26 #define GRINS_DEFAULT_VARIABLE_BUILDER_H
27 
28 // GRINS
29 #include "grins/variable_builder.h"
30 #include "grins/builder_helper.h"
31 
32 // libMesh
33 #include "libmesh/getpot.h"
34 
35 namespace GRINS
36 {
38  public BuilderHelper
39  {
40  public:
43 
44  virtual void build_variables_impl( const GetPot& input,
45  MultiphysicsSystem& system );
46 
47  protected:
48 
50  void parse_var_names( const GetPot& input,
51  const std::string& var_type,
52  const std::string& var_section,
53  std::vector<std::string>& var_names ) const;
54 
56 
57  std::string parse_fe_family( const GetPot& input,
58  const std::string& var_section,
59  const std::string& var_type ) const;
60 
62 
63  std::string parse_fe_order( const GetPot& input,
64  const std::string& var_section,
65  const std::string& var_type ) const;
66 
68 
72  std::string parse_var_type( const GetPot& input,
73  const std::string& var_section ) const
74  { std::string input_sec = VariablesParsing::variables_section()+"/"+var_section+"/type";
75  return input(input_sec,var_section); }
76 
77  void parse_subdomain_ids( const std::set<libMesh::subdomain_id_type>& mesh_subdomain_ids,
78  const GetPot& input,
79  const std::string& var_section,
80  std::set<libMesh::subdomain_id_type>& subdomain_ids );
81 
82  };
83 } // end namespace GRINS
84 
85 #endif // GRINS_DEFAULT_VARIABLE_BUILDER_H
std::string parse_fe_order(const GetPot &input, const std::string &var_section, const std::string &var_type) const
Helper function to extract [Varaiable//order] from input.
static std::string variables_section()
Helper function to encapsualte the overall [Variables] section name.
std::string parse_var_type(const GetPot &input, const std::string &var_section) const
Parses the [Variable//var_type] option.
void parse_subdomain_ids(const std::set< libMesh::subdomain_id_type > &mesh_subdomain_ids, const GetPot &input, const std::string &var_section, std::set< libMesh::subdomain_id_type > &subdomain_ids)
GRINS namespace.
This class contains common functions used by various Builders throughout GRINS.
Manages runtime construction of the FEVariableBase objects.
void parse_var_names(const GetPot &input, const std::string &var_type, const std::string &var_section, std::vector< std::string > &var_names) const
Parse [Variable//names].
virtual void build_variables_impl(const GetPot &input, MultiphysicsSystem &system)
Implementation of Variable construction done in subclasses.
Interface with libMesh for solving Multiphysics problems.
std::string parse_fe_family(const GetPot &input, const std::string &var_section, const std::string &var_type) const
Helper function to extract from input.

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