GRINS-0.8.0
variables_parsing.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_VARIABLES_PARSING_H
26 #define GRINS_VARIABLES_PARSING_H
27 
28 // C++
29 #include <string>
30 
31 // libMesh
32 #include "libmesh/getpot.h"
33 
34 namespace GRINS
35 {
37  {
38  public:
39 
40  static std::string displacement_section()
41  { return "Displacement"; }
42 
43  static std::string pressure_section()
44  { return "Pressure"; }
45 
46  static std::string temperature_section()
47  { return "Temperature"; }
48 
49  static std::string thermo_pressure_section()
50  { return "ThermoPressure"; }
51 
52  static std::string turbulence_section()
53  { return "TurbulentViscosity"; }
54 
55  static std::string species_mass_fractions_section()
56  { return "SpeciesMassFractions"; }
57 
58  static std::string velocity_section()
59  { return "Velocity"; }
60 
61  static std::string single_var_section()
62  { return "SingleVariable"; }
63 
64  static std::string scalar_var_section()
65  { return "ScalarVariable"; }
66 
68  static std::string variables_section()
69  { return "Variables"; }
70 
72 
74  static std::string varnames_input_name( const std::string& subsection )
75  { return VariablesParsing::variables_section()+"/"+subsection+"/names"; }
76 
78  static std::string fe_family_input_name( const std::string& subsection )
79  { return VariablesParsing::variables_section()+"/"+subsection+"/fe_family"; }
80 
82  static std::string order_input_name( const std::string& subsection )
83  { return VariablesParsing::variables_section()+"/"+subsection+"/order"; }
84 
85  enum SECTION_TYPE { PHYSICS = 0, QOI };
86 
87  static std::string single_variable_name( const GetPot& input, const std::string& subsection_name,
88  const SECTION_TYPE section_type )
90  subsection_name,
91  "var_name",
93  section_type); }
94 
95  static std::string scalar_variable_name( const GetPot& input, const std::string& subsection_name,
96  const SECTION_TYPE section_type )
98  subsection_name,
99  "var_name",
101  section_type); }
102 
103  static std::string velocity_variable_name( const GetPot& input, const std::string& subsection_name,
104  const SECTION_TYPE section_type )
106  subsection_name,
107  "velocity_var_name",
109  section_type); }
110 
111  static std::string temp_variable_name( const GetPot& input, const std::string& subsection_name,
112  const SECTION_TYPE section_type )
114  subsection_name,
115  "temperature_var_name",
117  section_type); }
118 
119  static std::string press_variable_name( const GetPot& input, const std::string& subsection_name,
120  const SECTION_TYPE section_type )
122  subsection_name,
123  "pressure_var_name",
125  section_type); }
126 
127  static std::string thermo_press_variable_name( const GetPot& input, const std::string& subsection_name,
128  const SECTION_TYPE section_type )
130  subsection_name,
131  "thermo_pressure_var_name",
133  section_type); }
134 
135  static std::string turb_variable_name( const GetPot& input, const std::string& subsection_name,
136  const SECTION_TYPE section_type )
138  subsection_name,
139  "turbulence_var_name",
141  section_type); }
142 
143  static std::string disp_variable_name( const GetPot& input, const std::string& subsection_name,
144  const SECTION_TYPE section_type )
146  subsection_name,
147  "displacement_var_name",
149  section_type); }
150 
151  static std::string species_mass_frac_variable_name( const GetPot& input,
152  const std::string& subsection_name,
153  const SECTION_TYPE section_type )
155  subsection_name,
156  "species_mass_fracs_var_name",
158  section_type); }
159 
160 
161 
162  private:
163 
164  static std::string section_parse_var_name( const GetPot & input,
165  const std::string & input_subsection_name,
166  const std::string & input_var_name,
167  const std::string & default_var_name,
168  const SECTION_TYPE section_type );
169  };
170 
171 } // end namespace GRINS
172 
173 #endif // GRINS_VARIABLES_PARSING_H
static std::string single_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string species_mass_frac_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string variables_section()
Helper function to encapsualte the overall [Variables] section name.
static std::string temperature_section()
static std::string velocity_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string displacement_section()
static std::string fe_family_input_name(const std::string &subsection)
Helper function to encaplusate fe_family input variable.
static std::string section_parse_var_name(const GetPot &input, const std::string &input_subsection_name, const std::string &input_var_name, const std::string &default_var_name, const SECTION_TYPE section_type)
static std::string press_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
GRINS namespace.
static std::string disp_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string velocity_section()
static std::string turb_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string temp_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string species_mass_fractions_section()
static std::string thermo_pressure_section()
static std::string pressure_section()
static std::string varnames_input_name(const std::string &subsection)
Helper function to encapsulate the names variable in the input file.
static std::string single_var_section()
static std::string scalar_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string turbulence_section()
static std::string scalar_var_section()
static std::string thermo_press_variable_name(const GetPot &input, const std::string &subsection_name, const SECTION_TYPE section_type)
static std::string order_input_name(const std::string &subsection)
Helper function to encaplusate order input variable.

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