GRINS-0.6.0
solid_mechanics_variables.h
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 #ifndef GRINS_SOLID_MECHANICS_VARIABLES_H
26 #define GRINS_SOLID_MECHANICS_VARIABLES_H
27 
28 // libMesh forward declarations
29 class GetPot;
30 namespace libMesh
31 {
32  class FEMSystem;
33 }
34 
35 // libMesh
36 #include "libmesh/libmesh_common.h"
37 
38 // GRINS
39 #include "grins/var_typedefs.h"
40 
41 namespace GRINS
42 {
44  {
45  public:
46 
47  SolidMechanicsVariables( const GetPot& input );
48  virtual ~SolidMechanicsVariables();
49 
51 
56  void init( libMesh::FEMSystem* system );
57 
58  bool have_v() const;
59  bool have_w() const;
60 
61  VariableIndex u_var() const;
62  VariableIndex v_var() const;
63  VariableIndex w_var() const;
64 
65  const std::string& u_var_name() const;
66  const std::string& v_var_name() const;
67  const std::string& w_var_name() const;
68 
69  protected:
70 
71  bool _have_v;
72  bool _have_w;
73 
77 
79 
80  };
81 
82  inline
84  {
85  return _u_var;
86  }
87 
88  inline
90  {
91  libmesh_assert(_have_v);
92  return _v_var;
93  }
94 
95  inline
97  {
98  libmesh_assert(_have_w);
99  return _w_var;
100  }
101 
102  inline
104  {
105  return _have_v;
106  }
107 
108  inline
110  {
111  return _have_w;
112  }
113 
114  inline
115  const std::string& SolidMechanicsVariables::u_var_name() const
116  {
117  return _u_var_name;
118  }
119 
120  inline
121  const std::string& SolidMechanicsVariables::v_var_name() const
122  {
123  return _v_var_name;
124  }
125 
126  inline
127  const std::string& SolidMechanicsVariables::w_var_name() const
128  {
129  return _w_var_name;
130  }
131 
132 } // end namespace GRINS
133 
134 #endif // GRINS_SOLID_MECHANICS_VARIABLES_H
unsigned int VariableIndex
More descriptive name of the type used for variable indices.
Definition: var_typedefs.h:40
GRINS namespace.
const std::string & w_var_name() const
void init(libMesh::FEMSystem *system)
Initialize System variables.
const std::string & v_var_name() const
const std::string & u_var_name() const

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