GRINS-0.6.0
Public Member Functions | Protected Attributes | List of all members
GRINS::SolidMechanicsVariables Class Reference

#include <solid_mechanics_variables.h>

Inheritance diagram for GRINS::SolidMechanicsVariables:
Inheritance graph
[legend]

Public Member Functions

 SolidMechanicsVariables (const GetPot &input)
 
virtual ~SolidMechanicsVariables ()
 
void init (libMesh::FEMSystem *system)
 Initialize System variables. More...
 
bool have_v () const
 
bool have_w () const
 
VariableIndex u_var () const
 
VariableIndex v_var () const
 
VariableIndex w_var () const
 
const std::string & u_var_name () const
 
const std::string & v_var_name () const
 
const std::string & w_var_name () const
 

Protected Attributes

bool _have_v
 
bool _have_w
 
VariableIndex _u_var
 
VariableIndex _v_var
 
VariableIndex _w_var
 
std::string _u_var_name
 
std::string _v_var_name
 
std::string _w_var_name
 

Detailed Description

Definition at line 43 of file solid_mechanics_variables.h.

Constructor & Destructor Documentation

GRINS::SolidMechanicsVariables::SolidMechanicsVariables ( const GetPot &  input)

Definition at line 37 of file solid_mechanics_variables.C.

38  : _have_v(false),
39  _have_w(false),
40  _u_var(invalid_var_index), // These are unsigned, so initialize to absurdly large value
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  }
const std::string v_disp_name_default
const unsigned int invalid_var_index
Invalid varaible index id.
Definition: var_typedefs.h:48
const std::string w_disp_name_default
const std::string u_disp_name_default
GRINS::SolidMechanicsVariables::~SolidMechanicsVariables ( )
virtual

Definition at line 50 of file solid_mechanics_variables.C.

51  {
52  return;
53  }

Member Function Documentation

bool GRINS::SolidMechanicsVariables::have_v ( ) const
inline
bool GRINS::SolidMechanicsVariables::have_w ( ) const
inline
void GRINS::SolidMechanicsVariables::init ( libMesh::FEMSystem *  system)

Initialize System variables.

Additional arguments specify whether the spatial mesh is really 2D or 3D. This is needed for cases such as a 1D beam in 2D (is_2D = true) or 3D (is_3D = true) space or 2D shell manifolds in 3D (is_3D = true).

Definition at line 55 of file solid_mechanics_variables.C.

References _have_v, _have_w, _u_var, _u_var_name, _v_var, _v_var_name, _w_var, and _w_var_name.

Referenced by GRINS::SolidMechanicsBCHandling::init_bc_data().

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  }
VariableIndex GRINS::SolidMechanicsVariables::u_var ( ) const
inline
const std::string & GRINS::SolidMechanicsVariables::u_var_name ( ) const
inline

Definition at line 115 of file solid_mechanics_variables.h.

References _u_var_name.

Referenced by GRINS::SolidMechanicsBCHandling::user_init_dirichlet_bcs().

116  {
117  return _u_var_name;
118  }
VariableIndex GRINS::SolidMechanicsVariables::v_var ( ) const
inline
const std::string & GRINS::SolidMechanicsVariables::v_var_name ( ) const
inline

Definition at line 121 of file solid_mechanics_variables.h.

References _v_var_name.

Referenced by GRINS::SolidMechanicsBCHandling::user_init_dirichlet_bcs().

122  {
123  return _v_var_name;
124  }
VariableIndex GRINS::SolidMechanicsVariables::w_var ( ) const
inline
const std::string & GRINS::SolidMechanicsVariables::w_var_name ( ) const
inline

Definition at line 127 of file solid_mechanics_variables.h.

References _w_var_name.

Referenced by GRINS::SolidMechanicsBCHandling::user_init_dirichlet_bcs().

128  {
129  return _w_var_name;
130  }

Member Data Documentation

bool GRINS::SolidMechanicsVariables::_have_v
protected
bool GRINS::SolidMechanicsVariables::_have_w
protected
VariableIndex GRINS::SolidMechanicsVariables::_u_var
protected

Definition at line 74 of file solid_mechanics_variables.h.

Referenced by GRINS::SolidMechanicsFEVariables::init(), init(), and u_var().

std::string GRINS::SolidMechanicsVariables::_u_var_name
protected
VariableIndex GRINS::SolidMechanicsVariables::_v_var
protected

Definition at line 75 of file solid_mechanics_variables.h.

Referenced by GRINS::SolidMechanicsFEVariables::init(), init(), and v_var().

std::string GRINS::SolidMechanicsVariables::_v_var_name
protected
VariableIndex GRINS::SolidMechanicsVariables::_w_var
protected

Definition at line 76 of file solid_mechanics_variables.h.

Referenced by GRINS::SolidMechanicsFEVariables::init(), init(), and w_var().

std::string GRINS::SolidMechanicsVariables::_w_var_name
protected

The documentation for this class was generated from the following files:

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