GRINS-0.6.0
primitive_flow_fe_variables.C
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 // This class
27 
28 // GRINS
29 #include "grins/grins_enums.h"
31 
32 // libMesh
33 #include "libmesh/getpot.h"
34 #include "libmesh/string_to_enum.h"
35 #include "libmesh/fem_system.h"
36 
37 namespace GRINS
38 {
39  PrimitiveFlowFEVariables::PrimitiveFlowFEVariables( const GetPot& input, const std::string& physics_name )
40  : PrimitiveFlowVariables(input),
41  _V_FE_family( libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input("Physics/"+physics_name+"/V_FE_family", input("Physics/"+physics_name+"/FE_family", "LAGRANGE") ) ) ),
42  _P_FE_family( libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input("Physics/"+physics_name+"/P_FE_family", input("Physics/"+physics_name+"/FE_family", "LAGRANGE") ) ) ),
43  _V_order( libMesh::Utility::string_to_enum<GRINSEnums::Order>( input("Physics/"+physics_name+"/V_order", "SECOND") ) ),
44  _P_order( libMesh::Utility::string_to_enum<GRINSEnums::Order>( input("Physics/"+physics_name+"/P_order", "FIRST") ) )
45  {
46  return;
47  }
48 
50  {
51  return;
52  }
53 
54  void PrimitiveFlowFEVariables::init( libMesh::FEMSystem* system )
55  {
56  _u_var = system->add_variable( _u_var_name, this->_V_order, _V_FE_family);
57  _v_var = system->add_variable( _v_var_name, this->_V_order, _V_FE_family);
58 
59  if ( system->get_mesh().mesh_dimension() == 3)
60  _w_var = system->add_variable( _w_var_name, this->_V_order, _V_FE_family);
61 
62  _p_var = system->add_variable( _p_var_name, this->_P_order, _P_FE_family);
63 
64  return;
65  }
66 
67 } // end namespace GRINS
virtual void init(libMesh::FEMSystem *system)
GRINSEnums::FEFamily _V_FE_family
Element type, read from input.
GRINS namespace.
VariableIndex _u_var
Indices for each (owned) variable;.
GRINSEnums::Order _V_order
Element orders, read from input.
std::string _u_var_name
Names of each (owned) variable in the system.

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