GRINS-0.7.0
velocity_fe_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-2016 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 
26 #ifndef GRINS_VELOCITY_FE_VARIABLES_H
27 #define GRINS_VELOCITY_FE_VARIABLES_H
28 
29 // GRINS
32 
33 namespace GRINS
34 {
35 
37  {
38  public:
39 
40  VelocityFEVariables( const GetPot& input, const std::string& physics_name,
41  bool is_constraint_var = false );
43 
44  virtual void init( libMesh::FEMSystem* system );
45 
46  VariableIndex u() const;
47  VariableIndex v() const;
48  VariableIndex w() const;
49 
50  private:
51 
53 
54  std::string subsection() const
56 
57  std::vector<std::string> old_var_names()
58  {
59  std::vector<std::string> var_names(3);
60  var_names[0] = "u_velocity";
61  var_names[1] = "v_velocity";
62  var_names[2] = "w_velocity";
63  return var_names;
64  }
65 
66  std::vector<std::string> default_names()
67  {
68  std::vector<std::string> var_names(3);
69  var_names[0] = "u";
70  var_names[1] = "v";
71  var_names[2] = "w";
72  return var_names;
73  }
74 
75  unsigned int _u_idx, _v_idx, _w_idx;
76 
77  };
78 
79  inline
81  {
82  return this->_vars[_u_idx];
83  }
84 
85  inline
87  {
88  return this->_vars[_v_idx];
89  }
90 
91  inline
93  {
94  return this->_vars[_w_idx];
95  }
96 
97 } // end namespace GRINS
98 
99 #endif //GRINS_VELOCITY_FE_VARIABLES_H
virtual void init(libMesh::FEMSystem *system)
Add variables to the system.
unsigned int VariableIndex
More descriptive name of the type used for variable indices.
Definition: var_typedefs.h:42
Base class for variables with multiple components that all have the same FEType.
GRINS namespace.
static std::string velocity_section()
std::string subsection() const
std::vector< std::string > old_var_names()
std::vector< std::string > default_names()
bool is_constraint_var() const
std::vector< VariableIndex > _vars

Generated on Thu Jun 2 2016 21:52:28 for GRINS-0.7.0 by  doxygen 1.8.10