GRINS-0.6.0
solid_mechanics_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 
40  SolidMechanicsFEVariables::SolidMechanicsFEVariables( const GetPot& input, const std::string& physics_name )
41  : SolidMechanicsVariables(input),
42  _FE_family( libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input("Physics/"+physics_name+"/FE_family", "LAGRANGE") ) ),
43  _order( libMesh::Utility::string_to_enum<GRINSEnums::Order>( input("Physics/"+physics_name+"/order", "FIRST") ) )
44  {
45  return;
46  }
47 
49  {
50  return;
51  }
52 
53  void SolidMechanicsFEVariables::init( libMesh::FEMSystem* system, bool is_2D, bool is_3D )
54  {
55  _u_var = system->add_variable( _u_var_name, this->_order, _FE_family);
56 
57  if ( system->get_mesh().mesh_dimension() >= 2 || is_2D || is_3D)
58  {
59  _have_v = true;
60  _v_var = system->add_variable( _v_var_name, this->_order, _FE_family);
61  }
62 
63  if ( system->get_mesh().mesh_dimension() == 3 || is_3D )
64  {
65  _have_w = true;
66  _w_var = system->add_variable( _w_var_name, this->_order, _FE_family);
67  }
68 
69  return;
70  }
71 
72 } // end namespace GRINS
GRINSEnums::Order _order
Element orders, read from input.
GRINS namespace.
GRINSEnums::FEFamily _FE_family
Element type, read from input.
void init(libMesh::FEMSystem *system, bool is_2D, bool is_3D)
Initialize System variables.

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