GRINS-0.6.0
solid_mechanics_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 // libMesh
29 #include "libmesh/getpot.h"
30 #include "libmesh/fem_system.h"
31 
32 // GRINS
34 
35 namespace GRINS
36 {
38  : _have_v(false),
39  _have_w(false),
40  _u_var(invalid_var_index), // These are unsigned, so initialize to absurdly large value
41  _v_var(invalid_var_index),
42  _w_var(invalid_var_index),
43  _u_var_name( input("Physics/VariableNames/u_displacment", u_disp_name_default ) ),
44  _v_var_name( input("Physics/VariableNames/v_displacment", v_disp_name_default ) ),
45  _w_var_name( input("Physics/VariableNames/w_displacment", w_disp_name_default ) )
46  {
47  return;
48  }
49 
51  {
52  return;
53  }
54 
55  void SolidMechanicsVariables::init( libMesh::FEMSystem* system )
56  {
57  libmesh_assert( system->has_variable( _u_var_name ) );
58  _u_var = system->variable_number( _u_var_name );
59 
60  if ( system->has_variable( _v_var_name ) )
61  {
62  _have_v = true;
63  _v_var = system->variable_number( _v_var_name );
64  }
65 
66  if ( system->has_variable( _w_var_name ) )
67  {
68  _have_w = true;
69  _w_var = system->variable_number( _w_var_name );
70  }
71 
72  return;
73  }
74 
75 } // end namespace GRINS
const std::string v_disp_name_default
const unsigned int invalid_var_index
Invalid varaible index id.
Definition: var_typedefs.h:48
GRINS namespace.
void init(libMesh::FEMSystem *system)
Initialize System variables.
const std::string w_disp_name_default
const std::string u_disp_name_default

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