www.mooseframework.org
RichardsVarNames.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef RICHARDSVARNAMES_H
9 #define RICHARDSVARNAMES_H
10 
11 #include "GeneralUserObject.h"
12 #include "Coupleable.h"
13 #include "ZeroInterface.h"
14 
15 class RichardsVarNames;
16 
17 template <>
18 InputParameters validParams<RichardsVarNames>();
19 
25 class RichardsVarNames : public GeneralUserObject, public Coupleable, public ZeroInterface
26 {
27 public:
28  RichardsVarNames(const InputParameters & parameters);
29 
30  void initialize();
31  void execute();
32  void finalize();
33 
35  unsigned int num_v() const;
36 
44  unsigned int richards_var_num(unsigned int moose_var_num) const;
45 
53  bool not_richards_var(unsigned int moose_var_num) const;
54 
59  std::string richards_names() const;
60 
68  const VariableValue * richards_vals(unsigned int richards_var_num) const;
69 
77  const VariableValue * richards_vals_old(unsigned int richards_var_num) const;
78 
86  const VariableGradient * grad_var(unsigned int richards_var_num) const;
87 
94  const VariableValue * nodal_var(unsigned int richards_var_num) const;
95 
100  const VariableValue * nodal_var_old(unsigned int richards_var_num) const;
101 
103  std::string var_types() const;
104 
105 protected:
107  unsigned int _num_v;
108 
110  MooseEnum _var_types;
111 
113  std::vector<unsigned int> _moose_var_num;
114 
116  std::vector<unsigned int> _ps_var_num;
117 
119  std::vector<const VariableValue *>
120  _moose_var_value; // this is a vector of pointers to VariableValues
121 
123  std::vector<const VariableValue *> _moose_var_value_old;
124 
126  std::vector<const VariableValue *>
127  _moose_nodal_var_value; // this is a vector of pointers to VariableValues
128 
130  std::vector<const VariableValue *> _moose_nodal_var_value_old;
131 
133  std::vector<const VariableGradient *> _moose_grad_var;
134 };
135 
136 #endif // RICHARDSVARNAMES_H
const VariableValue * nodal_var_old(unsigned int richards_var_num) const
The old nodal variable values for the given richards_var_num.
InputParameters validParams< RichardsVarNames >()
std::vector< const VariableValue * > _moose_nodal_var_value
moose_var_value[i] = values of richards variable i
std::vector< const VariableValue * > _moose_nodal_var_value_old
moose_var_value_old[i] = old values of richards variable i
std::vector< unsigned int > _moose_var_num
_moose_var_num[i] = the moose variable number corresponding to richards variable i ...
const VariableValue * nodal_var(unsigned int richards_var_num) const
The nodal variable values for the given richards_var_num To extract a the value of pressure variable ...
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels...
std::vector< const VariableValue * > _moose_var_value
moose_var_value[i] = values of richards variable i
unsigned int num_v() const
the number of porepressure variables
const VariableGradient * grad_var(unsigned int richards_var_num) const
a vector of pointers to grad(Variable)
std::vector< unsigned int > _ps_var_num
_pressure_var_num[i] = the richards variable corresponding to moose variable i
std::string var_types() const
return the _var_types string
const VariableValue * richards_vals(unsigned int richards_var_num) const
a vector of pointers to VariableValues
std::vector< const VariableGradient * > _moose_grad_var
moose_grad_var[i] = gradient values of richards variable i
RichardsVarNames(const InputParameters &parameters)
MooseEnum _var_types
physical meaning of the variables. Eg &#39;pppp&#39; means &#39;all variables are pressure variables&#39; ...
unsigned int _num_v
number of richards variables
std::string richards_names() const
a space-separated string of richards variable names eg richards_names() = &#39;pwater pgas&#39; ...
const VariableValue * richards_vals_old(unsigned int richards_var_num) const
a vector of pointers to old VariableValues
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
std::vector< const VariableValue * > _moose_var_value_old
moose_var_value_old[i] = old values of richards variable i