www.mooseframework.org
RichardsVarNames.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "GeneralUserObject.h"
13 #include "Coupleable.h"
14 
15 class RichardsVarNames;
16 
17 template <>
18 InputParameters validParams<RichardsVarNames>();
19 
25 class RichardsVarNames : public GeneralUserObject, public Coupleable
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 
RichardsVarNames::initialize
void initialize()
Definition: RichardsVarNames.C:78
RichardsVarNames::_var_types
MooseEnum _var_types
physical meaning of the variables. Eg 'pppp' means 'all variables are pressure variables'
Definition: RichardsVarNames.h:110
RichardsVarNames::var_types
std::string var_types() const
return the _var_types string
Definition: RichardsVarNames.C:136
RichardsVarNames::richards_var_num
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
Definition: RichardsVarNames.C:99
RichardsVarNames::_num_v
unsigned int _num_v
number of richards variables
Definition: RichardsVarNames.h:107
RichardsVarNames::richards_names
std::string richards_names() const
a space-separated string of richards variable names eg richards_names() = 'pwater pgas'
RichardsVarNames
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels,...
Definition: RichardsVarNames.h:25
RichardsVarNames::nodal_var_old
const VariableValue * nodal_var_old(unsigned int richards_var_num) const
The old nodal variable values for the given richards_var_num.
Definition: RichardsVarNames.C:148
RichardsVarNames::execute
void execute()
Definition: RichardsVarNames.C:83
RichardsVarNames::_moose_var_value_old
std::vector< const VariableValue * > _moose_var_value_old
moose_var_value_old[i] = old values of richards variable i
Definition: RichardsVarNames.h:123
RichardsVarNames::_ps_var_num
std::vector< unsigned int > _ps_var_num
_pressure_var_num[i] = the richards variable corresponding to moose variable i
Definition: RichardsVarNames.h:116
RichardsVarNames::richards_vals
const VariableValue * richards_vals(unsigned int richards_var_num) const
a vector of pointers to VariableValues
Definition: RichardsVarNames.C:117
RichardsVarNames::_moose_grad_var
std::vector< const VariableGradient * > _moose_grad_var
moose_grad_var[i] = gradient values of richards variable i
Definition: RichardsVarNames.h:133
RichardsVarNames::_moose_var_num
std::vector< unsigned int > _moose_var_num
_moose_var_num[i] = the moose variable number corresponding to richards variable i
Definition: RichardsVarNames.h:113
RichardsVarNames::_moose_nodal_var_value
std::vector< const VariableValue * > _moose_nodal_var_value
moose_var_value[i] = values of richards variable i
Definition: RichardsVarNames.h:127
RichardsVarNames::_moose_nodal_var_value_old
std::vector< const VariableValue * > _moose_nodal_var_value_old
moose_var_value_old[i] = old values of richards variable i
Definition: RichardsVarNames.h:130
RichardsVarNames::nodal_var
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 ...
Definition: RichardsVarNames.C:142
RichardsVarNames::RichardsVarNames
RichardsVarNames(const InputParameters &parameters)
Definition: RichardsVarNames.C:38
RichardsVarNames::_moose_var_value
std::vector< const VariableValue * > _moose_var_value
moose_var_value[i] = values of richards variable i
Definition: RichardsVarNames.h:120
RichardsVarNames::num_v
unsigned int num_v() const
the number of porepressure variables
Definition: RichardsVarNames.C:93
RichardsVarNames::richards_vals_old
const VariableValue * richards_vals_old(unsigned int richards_var_num) const
a vector of pointers to old VariableValues
Definition: RichardsVarNames.C:124
RichardsVarNames::grad_var
const VariableGradient * grad_var(unsigned int richards_var_num) const
a vector of pointers to grad(Variable)
Definition: RichardsVarNames.C:130
validParams< RichardsVarNames >
InputParameters validParams< RichardsVarNames >()
Definition: RichardsVarNames.C:19
RichardsVarNames::not_richards_var
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
Definition: RichardsVarNames.C:109
RichardsVarNames::finalize
void finalize()
Definition: RichardsVarNames.C:88