GRINS-0.7.0
single_var_single_fe_type_variable.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2016 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 // This class
27 
28 // libMesh
29 #include "libmesh/getpot.h"
30 
31 namespace GRINS
32 {
34  const std::string& physics_name,
35  const std::string& old_var_prefix,
36  const std::string& old_var_name,
37  const std::string& default_name,
38  const std::string& subsection,
39  const std::string& default_family,
40  const std::string& default_order,
41  bool is_constraint_var )
42  : SingleFETypeVariable(input,physics_name,old_var_prefix,subsection,default_family,
43  default_order,is_constraint_var)
44  {
45  _var_names.resize(1);
46 
47  std::vector<std::string> default_names(1,default_name);
48 
49  if( this->check_dep_name_input(input,subsection) )
50  _var_names[0] = input("Physics/VariableNames/"+old_var_name, default_names[0] );
51  else
52  this->parse_names_from_input(input,subsection,_var_names,default_names);
53  }
54 
56  const std::string& subsection,
57  const std::string& default_name,
58  bool is_constraint_var )
59  : SingleFETypeVariable(input,subsection,is_constraint_var)
60  {
61  _var_names.resize(1);
62  std::vector<std::string> default_names(1,default_name);
63  this->parse_names_from_input(input,subsection,_var_names,default_names);
64  }
65 
66 } // end namespace GRINS
SingleVarSingleFETypeVariable(const GetPot &input, const std::string &physics_name, const std::string &old_var_prefix, const std::string &old_var_name, const std::string &default_name, const std::string &subsection, const std::string &default_family, const std::string &default_order, bool is_constraint_var)
Deprecated, old style constructor.
GRINS namespace.
void parse_names_from_input(const GetPot &input, const std::string &subsection, std::vector< std::string > &var_names, const std::vector< std::string > &default_names)
Method to parse variable names from input.
std::vector< std::string > _var_names
bool check_dep_name_input(const GetPot &input, const std::string &new_subsection) const
Check for deprecated variable name input style.
Class to encapsulate variables that have only one FEType/Order.

Generated on Thu Jun 2 2016 21:52:28 for GRINS-0.7.0 by  doxygen 1.8.10