https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
VariableWarehouse Class Reference

Holds variables and provides some services. More...

#include <VariableWarehouse.h>

Public Member Functions

 VariableWarehouse ()
 
void add (const std::string &var_name, std::shared_ptr< MooseVariableBase > var)
 Add a variable.
 
void addBoundaryVar (BoundaryID bnd, const MooseVariableFieldBase *var)
 Add a boundary variable.
 
void addBoundaryVar (const std::set< BoundaryID > &boundary_ids, const MooseVariableFieldBase *var)
 Add a variable to a set of boundaries.
 
void addBoundaryVars (const std::set< BoundaryID > &boundary_ids, const std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > &vars)
 Add a map of variables to a set of boundaries.
 
MooseVariableBasegetVariable (const std::string &var_name) const
 Get a variable from the warehouse.
 
MooseVariableBasegetVariable (unsigned int var_number) const
 Get a variable from the warehouse.
 
template<typename T >
MooseVariableFE< T > * getFieldVariable (const std::string &var_name)
 Get a finite element variable from the warehouse of either Real or RealVectorValue type.
 
template<typename T >
MooseVariableFE< T > * getFieldVariable (unsigned int var_number)
 Get a finite element variable from the warehouse of either Real or RealVectorValue type.
 
template<typename T >
MooseVariableField< T > * getActualFieldVariable (const std::string &var_name)
 This should be called getFieldVariable, but that name is already taken by a legacy function.
 
template<typename T >
MooseVariableFV< T > * getFVVariable (const std::string &var_name)
 Get a finite volume variable.
 
template<typename T >
MooseVariableField< T > * getActualFieldVariable (unsigned int var_number)
 This should be called getFieldVariable, but that name is already taken by a legacy function.
 
const std::vector< VariableName > & names () const
 Get the list of all variable names.
 
const std::vector< MooseVariableFieldBase * > & fieldVariables () const
 Get the list of variables.
 
const std::set< const MooseVariableFieldBase * > & boundaryVars (BoundaryID bnd) const
 Get the list of variables that needs to be reinitialized on a given boundary.
 
const std::vector< MooseVariableScalar * > & scalars () const
 Get the list of scalar variables.
 
void initialSetup ()
 Call initialSetup for all variables.
 
void timestepSetup ()
 Call timestepSetup for all variables.
 
void customSetup (const ExecFlagType &exec_type)
 Call setup on a particular execute flag for all variables.
 
void subdomainSetup ()
 Call subdomainSetup for all variables.
 
void residualSetup ()
 Call residualSetup for all variables.
 
void jacobianSetup ()
 Call jacobianSetup for all variables.
 
void clearAllDofIndices ()
 Clear all dof indices from each variable.
 
void setActiveVariableCoupleableVectorTags (const std::set< TagID > &vtags)
 Set the active vector tags for the variables.
 
void setActiveScalarVariableCoupleableVectorTags (const std::set< TagID > &vtags)
 Set the active vector tags for the variables.
 
const std::map< unsigned int, std::shared_ptr< MooseVariableBase > > & numberToVariableMap () const
 Map from variable number to variable pointer.
 
template<>
MooseVariableFE< RealVectorValue > * getFieldVariable (const std::string &var_name)
 
template<>
MooseVariableFE< RealVectorValue > * getFieldVariable (unsigned int var_number)
 
template<>
MooseVariableFE< RealEigenVector > * getFieldVariable (const std::string &var_name)
 
template<>
MooseVariableFE< RealEigenVector > * getFieldVariable (unsigned int var_number)
 
template<>
MooseVariableField< RealVectorValue > * getActualFieldVariable (const std::string &var_name)
 
template<>
MooseVariableField< RealVectorValue > * getActualFieldVariable (unsigned int var_number)
 
template<>
MooseVariableField< RealEigenVector > * getActualFieldVariable (const std::string &var_name)
 
template<>
MooseVariableField< RealEigenVector > * getActualFieldVariable (unsigned int var_number)
 
template<>
VectorMooseVariablegetFieldVariable (const std::string &var_name)
 
template<>
VectorMooseVariablegetFieldVariable (unsigned int var_number)
 
template<>
ArrayMooseVariablegetFieldVariable (const std::string &var_name)
 
template<>
ArrayMooseVariablegetFieldVariable (unsigned int var_number)
 
template<>
MooseVariableField< RealVectorValue > * getActualFieldVariable (const std::string &var_name)
 
template<>
MooseVariableField< RealVectorValue > * getActualFieldVariable (unsigned int var_number)
 
template<>
MooseVariableField< RealEigenVector > * getActualFieldVariable (const std::string &var_name)
 
template<>
MooseVariableField< RealEigenVector > * getActualFieldVariable (unsigned int var_number)
 

Protected Attributes

std::vector< VariableName > _names
 list of variable names
 
std::vector< MooseVariableFieldBase * > _vars
 list of finite element variables
 
HashMap< unsigned, MooseVariable * > _regular_vars_by_number
 map of non-vector finite element variables with unsigned keys
 
HashMap< std::string, MooseVariableFVReal * > _fv_vars_by_name
 map of non-vector finite element variables with name keys
 
HashMap< std::string, MooseLinearVariableFVReal * > _linear_fv_vars_by_name
 map of non-vector linear finite volume variables with name keys
 
HashMap< std::string, MooseVariable * > _regular_vars_by_name
 map of non-vector finite element variables with name keys
 
HashMap< unsigned, MooseVariableFVReal * > _fv_vars_by_number
 map of non-vector finite element variables with unsigned keys
 
HashMap< unsigned, MooseLinearVariableFVReal * > _linear_fv_vars_by_number
 map of non-vector finite element variables with unsigned keys
 
HashMap< std::string, VectorMooseVariable * > _vector_vars_by_name
 map of vector finite element variables with name keys
 
HashMap< unsigned, VectorMooseVariable * > _vector_vars_by_number
 map of vector finite element variables with unsigned keys
 
HashMap< std::string, ArrayMooseVariable * > _array_vars_by_name
 map of vector finite element variables with name keys
 
HashMap< unsigned, ArrayMooseVariable * > _array_vars_by_number
 map of vector finite element variables with unsigned keys
 
std::map< std::string, MooseVariableBase * > _var_name
 Name to variable mapping.
 
std::map< BoundaryID, std::set< const MooseVariableFieldBase * > > _boundary_vars
 Map to variables that need to be evaluated on a boundary.
 
std::vector< MooseVariableScalar * > _scalar_vars
 list of all scalar, non-finite element variables
 
std::map< unsigned int, std::shared_ptr< MooseVariableBase > > _all_objects
 All instances of objects.
 

Detailed Description

Holds variables and provides some services.

Definition at line 50 of file VariableWarehouse.h.

Constructor & Destructor Documentation

◆ VariableWarehouse()

VariableWarehouse::VariableWarehouse ( )

Definition at line 17 of file VariableWarehouse.C.

17{}

Member Function Documentation

◆ add()

void VariableWarehouse::add ( const std::string &  var_name,
std::shared_ptr< MooseVariableBase var 
)

Add a variable.

Parameters
var_nameThe name of the variable
varVariable

Definition at line 20 of file VariableWarehouse.C.

21{
22 _names.push_back(var_name);
23 auto * raw_var = var.get();
24 _all_objects[var->number()] = var;
25 _var_name[var_name] = raw_var;
26
27 if (auto * tmp_var = dynamic_cast<MooseVariableFieldBase *>(raw_var))
28 {
29 _vars.push_back(tmp_var);
30 if (auto * tmp_var = dynamic_cast<MooseVariable *>(raw_var))
31 {
32 _regular_vars_by_number[tmp_var->number()] = tmp_var;
33 _regular_vars_by_name[var_name] = tmp_var;
34 }
35 else if (auto * tmp_var = dynamic_cast<MooseVariableFVReal *>(raw_var))
36 {
37 _fv_vars_by_number[tmp_var->number()] = tmp_var;
38 _fv_vars_by_name[var_name] = tmp_var;
39 }
40 else if (auto * tmp_var = dynamic_cast<MooseLinearVariableFVReal *>(raw_var))
41 {
42 _linear_fv_vars_by_number[tmp_var->number()] = tmp_var;
43 _linear_fv_vars_by_name[var_name] = tmp_var;
44 }
45 else if (auto * tmp_var = dynamic_cast<VectorMooseVariable *>(raw_var))
46 {
47 _vector_vars_by_number[tmp_var->number()] = tmp_var;
48 _vector_vars_by_name[var_name] = tmp_var;
49 }
50 else if (auto * tmp_var = dynamic_cast<ArrayMooseVariable *>(raw_var))
51 {
52 _array_vars_by_number[tmp_var->number()] = tmp_var;
53 _array_vars_by_name[var_name] = tmp_var;
54 }
55 else
56 mooseError("Unknown variable class passed into VariableWarehouse. Attempt to hack us?");
57 }
58 else if (auto * tmp_var = dynamic_cast<MooseVariableScalar *>(raw_var))
59 _scalar_vars.push_back(tmp_var);
60 else
61 mooseError("Unknown variable class passed into VariableWarehouse. Attempt to hack us?");
62}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
This class provides an interface for common operations on field variables of both FE and FV types wit...
Class for scalar variables (they are different).
HashMap< std::string, VectorMooseVariable * > _vector_vars_by_name
map of vector finite element variables with name keys
HashMap< unsigned, VectorMooseVariable * > _vector_vars_by_number
map of vector finite element variables with unsigned keys
std::vector< MooseVariableFieldBase * > _vars
list of finite element variables
std::vector< MooseVariableScalar * > _scalar_vars
list of all scalar, non-finite element variables
HashMap< std::string, MooseVariable * > _regular_vars_by_name
map of non-vector finite element variables with name keys
HashMap< std::string, MooseLinearVariableFVReal * > _linear_fv_vars_by_name
map of non-vector linear finite volume variables with name keys
HashMap< unsigned, MooseLinearVariableFVReal * > _linear_fv_vars_by_number
map of non-vector finite element variables with unsigned keys
HashMap< unsigned, ArrayMooseVariable * > _array_vars_by_number
map of vector finite element variables with unsigned keys
HashMap< unsigned, MooseVariable * > _regular_vars_by_number
map of non-vector finite element variables with unsigned keys
HashMap< unsigned, MooseVariableFVReal * > _fv_vars_by_number
map of non-vector finite element variables with unsigned keys
std::map< std::string, MooseVariableBase * > _var_name
Name to variable mapping.
std::vector< VariableName > _names
list of variable names
std::map< unsigned int, std::shared_ptr< MooseVariableBase > > _all_objects
All instances of objects.
HashMap< std::string, ArrayMooseVariable * > _array_vars_by_name
map of vector finite element variables with name keys
HashMap< std::string, MooseVariableFVReal * > _fv_vars_by_name
map of non-vector finite element variables with name keys

◆ addBoundaryVar() [1/2]

void VariableWarehouse::addBoundaryVar ( BoundaryID  bnd,
const MooseVariableFieldBase var 
)

Add a boundary variable.

Parameters
bndThe boundary id where this variable is defined
varThe variable

Definition at line 65 of file VariableWarehouse.C.

66{
67 _boundary_vars[bnd].insert(var);
68}
std::map< BoundaryID, std::set< const MooseVariableFieldBase * > > _boundary_vars
Map to variables that need to be evaluated on a boundary.

Referenced by addBoundaryVar(), and addBoundaryVars().

◆ addBoundaryVar() [2/2]

void VariableWarehouse::addBoundaryVar ( const std::set< BoundaryID > &  boundary_ids,
const MooseVariableFieldBase var 
)

Add a variable to a set of boundaries.

Parameters
boundary_idsThe boundary ids where this variable is defined
varThe variable

Definition at line 71 of file VariableWarehouse.C.

73{
74 for (const auto & bid : boundary_ids)
75 addBoundaryVar(bid, var);
76}
void addBoundaryVar(BoundaryID bnd, const MooseVariableFieldBase *var)
Add a boundary variable.

◆ addBoundaryVars()

void VariableWarehouse::addBoundaryVars ( const std::set< BoundaryID > &  boundary_ids,
const std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > &  vars 
)

Add a map of variables to a set of boundaries.

Parameters
boundary_idsThe boundary ids where this variable is defined
varsA map of variables

Definition at line 79 of file VariableWarehouse.C.

82{
83 for (const auto & bid : boundary_ids)
84 for (const auto & it : vars)
85 for (const auto & var : it.second)
86 addBoundaryVar(bid, var);
87}
for(PetscInt i=0;i< nvars;++i)
char ** vars

◆ boundaryVars()

const std::set< const MooseVariableFEBase * > & VariableWarehouse::boundaryVars ( BoundaryID  bnd) const

Get the list of variables that needs to be reinitialized on a given boundary.

Parameters
bndThe boundary ID
Returns
The list of variables

Definition at line 128 of file VariableWarehouse.C.

129{
130 return _boundary_vars.find(bnd)->second;
131}

◆ clearAllDofIndices()

void VariableWarehouse::clearAllDofIndices ( )

Clear all dof indices from each variable.

Definition at line 302 of file VariableWarehouse.C.

303{
304 for (auto * var : _vars)
305 var->clearAllDofIndices();
306}
void clearAllDofIndices()
Clear all dof indices from each variable.

◆ customSetup()

void VariableWarehouse::customSetup ( const ExecFlagType exec_type)

Call setup on a particular execute flag for all variables.

Definition at line 274 of file VariableWarehouse.C.

275{
276 for (auto & pair : _all_objects)
277 pair.second->customSetup(exec_type);
278}
void customSetup(const ExecFlagType &exec_type)
Call setup on a particular execute flag for all variables.

◆ fieldVariables()

const std::vector< MooseVariableFEBase * > & VariableWarehouse::fieldVariables ( ) const

Get the list of variables.

Returns
The list of variables

Definition at line 116 of file VariableWarehouse.C.

117{
118 return _vars;
119}

Referenced by LinearFVGradientInterface::needsLinearFVGradientStorage().

◆ getActualFieldVariable() [1/10]

template<typename T >
MooseVariableField< T > * VariableWarehouse::getActualFieldVariable ( const std::string &  var_name)

This should be called getFieldVariable, but that name is already taken by a legacy function.

Definition at line 203 of file VariableWarehouse.C.

204{
205 auto it = _regular_vars_by_name.find(var_name);
206 if (it != _regular_vars_by_name.end())
207 return it->second;
208 auto it_fv = _fv_vars_by_name.find(var_name);
209 if (it_fv != _fv_vars_by_name.end())
210 return it_fv->second;
211 return _linear_fv_vars_by_name.at(var_name);
212}

◆ getActualFieldVariable() [2/10]

template<>
MooseVariableField< RealEigenVector > * VariableWarehouse::getActualFieldVariable ( const std::string &  var_name)

◆ getActualFieldVariable() [3/10]

template<>
MooseVariableField< RealVectorValue > * VariableWarehouse::getActualFieldVariable ( const std::string &  var_name)

◆ getActualFieldVariable() [4/10]

template<>
MooseVariableField< RealVectorValue > * VariableWarehouse::getActualFieldVariable ( const std::string &  var_name)

Definition at line 216 of file VariableWarehouse.C.

230{
231 // TODO: when necessary, add the if check to see if we have an FV vector var
232 // before just returning nothing as found in FE vars list.
233 return getFieldVariable<RealVectorValue>(var_name);
234}

◆ getActualFieldVariable() [5/10]

template<>
template MooseVariableField< Real > * VariableWarehouse::getActualFieldVariable< Real > ( const std::string &  var_name)

Definition at line 216 of file VariableWarehouse.C.

248{
249 return getFieldVariable<RealEigenVector>(var_name);
250}

◆ getActualFieldVariable() [6/10]

template<typename T >
MooseVariableField< T > * VariableWarehouse::getActualFieldVariable ( unsigned int  var_number)

This should be called getFieldVariable, but that name is already taken by a legacy function.

Definition at line 216 of file VariableWarehouse.C.

217{
218 auto it = _regular_vars_by_number.find(var_number);
219 if (it != _regular_vars_by_number.end())
220 return it->second;
221 auto it_fv = _fv_vars_by_number.find(var_number);
222 if (it_fv != _fv_vars_by_number.end())
223 return it_fv->second;
224 return _linear_fv_vars_by_number.at(var_number);
225}

◆ getActualFieldVariable() [7/10]

template<>
MooseVariableField< RealEigenVector > * VariableWarehouse::getActualFieldVariable ( unsigned int  var_number)

◆ getActualFieldVariable() [8/10]

template<>
MooseVariableField< RealVectorValue > * VariableWarehouse::getActualFieldVariable ( unsigned int  var_number)

◆ getActualFieldVariable() [9/10]

template<>
MooseVariableField< RealVectorValue > * VariableWarehouse::getActualFieldVariable ( unsigned int  var_number)

Definition at line 216 of file VariableWarehouse.C.

239{
240 // TODO: when necessary, add the if check to see if we have an FV vector var
241 // before just returning nothing as found in FE vars list.
242 return getFieldVariable<RealVectorValue>(var_number);
243}

◆ getActualFieldVariable() [10/10]

template<>
template MooseVariableField< Real > * VariableWarehouse::getActualFieldVariable< Real > ( unsigned int  var_number)

Definition at line 216 of file VariableWarehouse.C.

255{
256 return getFieldVariable<RealEigenVector>(var_number);
257}

◆ getFieldVariable() [1/10]

template<typename T >
MooseVariableFE< T > * VariableWarehouse::getFieldVariable ( const std::string &  var_name)

Get a finite element variable from the warehouse of either Real or RealVectorValue type.

Parameters
var_nameThe name of the variable to retrieve
Returns
The retrieved variable

Note this should actually be named getFieldFEVariable, but that would require fixing a lot of code in a lot of apps

Definition at line 153 of file VariableWarehouse.C.

154{
155 return getFieldVariableHelper<T>(_regular_vars_by_name, var_name, "_regular_vars_by_name");
156}

◆ getFieldVariable() [2/10]

template<>
MooseVariableFE< RealVectorValue > * VariableWarehouse::getFieldVariable ( const std::string &  var_name)

◆ getFieldVariable() [3/10]

template<>
MooseVariableFE< RealEigenVector > * VariableWarehouse::getFieldVariable ( const std::string &  var_name)

◆ getFieldVariable() [4/10]

template<>
VectorMooseVariable * VariableWarehouse::getFieldVariable ( const std::string &  var_name)

Definition at line 166 of file VariableWarehouse.C.

168{
169 return getFieldVariableHelper<RealVectorValue>(
170 _vector_vars_by_name, var_name, "_vector_vars_by_name");
171}

◆ getFieldVariable() [5/10]

template<>
template MooseVariableFE< Real > * VariableWarehouse::getFieldVariable< Real > ( const std::string &  var_name)

Definition at line 182 of file VariableWarehouse.C.

184{
185 return getFieldVariableHelper<RealEigenVector>(
186 _array_vars_by_name, var_name, "_array_vars_by_name");
187}

◆ getFieldVariable() [6/10]

template<typename T >
MooseVariableFE< T > * VariableWarehouse::getFieldVariable ( unsigned int  var_number)

Get a finite element variable from the warehouse of either Real or RealVectorValue type.

Parameters
var_numberThe number of the variable to retrieve
Returns
The retrieved variable

Note this should actually be named getFieldFEVariable, but that would require fixing a lot of code in a lot of apps

Definition at line 160 of file VariableWarehouse.C.

161{
162 return getFieldVariableHelper<T>(_regular_vars_by_number, var_number, "_regular_vars_by_number");
163}

◆ getFieldVariable() [7/10]

template<>
MooseVariableFE< RealVectorValue > * VariableWarehouse::getFieldVariable ( unsigned int  var_number)

◆ getFieldVariable() [8/10]

template<>
MooseVariableFE< RealEigenVector > * VariableWarehouse::getFieldVariable ( unsigned int  var_number)

◆ getFieldVariable() [9/10]

template<>
VectorMooseVariable * VariableWarehouse::getFieldVariable ( unsigned int  var_number)

Definition at line 174 of file VariableWarehouse.C.

176{
177 return getFieldVariableHelper<RealVectorValue>(
178 _vector_vars_by_number, var_number, "_vector_vars_by_number");
179}

◆ getFieldVariable() [10/10]

template<>
template MooseVariableFE< Real > * VariableWarehouse::getFieldVariable< Real > ( unsigned int  var_number)

Definition at line 190 of file VariableWarehouse.C.

192{
193 return getFieldVariableHelper<RealEigenVector>(
194 _array_vars_by_number, var_number, "_array_vars_by_number");
195}

◆ getFVVariable()

template<typename T >
MooseVariableFV< T > * VariableWarehouse::getFVVariable ( const std::string &  var_name)

Get a finite volume variable.

Definition at line 271 of file VariableWarehouse.h.

272{
273 auto it = _fv_vars_by_name.find(var_name);
274 if (it == _fv_vars_by_name.end())
275 mooseError("Requested variable ",
276 var_name,
277 " doesn't exist as a finite volume variable in the warehouse.");
278
279 return it->second;
280}

◆ getVariable() [1/2]

MooseVariableBase * VariableWarehouse::getVariable ( const std::string &  var_name) const

Get a variable from the warehouse.

Parameters
var_nameThe name of the variable to retrieve
Returns
The retrieved variable

Definition at line 90 of file VariableWarehouse.C.

91{
92 auto it = _var_name.find(var_name);
93 if (it != _var_name.end())
94 return it->second;
95 else
96 return nullptr;
97}

Referenced by LinearFVGradientInterface::requestLinearFVLimitedGradients().

◆ getVariable() [2/2]

MooseVariableBase * VariableWarehouse::getVariable ( unsigned int  var_number) const

Get a variable from the warehouse.

Parameters
var_numberThe number of the variable to retrieve
Returns
The retrieved variable

Definition at line 100 of file VariableWarehouse.C.

101{
102 auto it = _all_objects.find(var_number);
103 if (it != _all_objects.end())
104 return it->second.get();
105 else
106 return nullptr;
107}

◆ initialSetup()

void VariableWarehouse::initialSetup ( )

Call initialSetup for all variables.

Definition at line 260 of file VariableWarehouse.C.

261{
262 for (auto & pair : _all_objects)
263 pair.second->initialSetup();
264}
void initialSetup()
Call initialSetup for all variables.

◆ jacobianSetup()

void VariableWarehouse::jacobianSetup ( )

Call jacobianSetup for all variables.

Definition at line 288 of file VariableWarehouse.C.

289{
290 for (auto & pair : _all_objects)
291 pair.second->jacobianSetup();
292}
void jacobianSetup()
Call jacobianSetup for all variables.

◆ names()

const std::vector< VariableName > & VariableWarehouse::names ( ) const

Get the list of all variable names.

Returns
The list of variable names

Definition at line 110 of file VariableWarehouse.C.

111{
112 return _names;
113}

◆ numberToVariableMap()

const std::map< unsigned int, std::shared_ptr< MooseVariableBase > > & VariableWarehouse::numberToVariableMap ( ) const
inline

Map from variable number to variable pointer.

Includes both field and scalar variables

Definition at line 283 of file VariableWarehouse.h.

284{
285 return _all_objects;
286}

◆ residualSetup()

void VariableWarehouse::residualSetup ( )

Call residualSetup for all variables.

Definition at line 295 of file VariableWarehouse.C.

296{
297 for (auto & pair : _all_objects)
298 pair.second->residualSetup();
299}
void residualSetup()
Call residualSetup for all variables.

◆ scalars()

const std::vector< MooseVariableScalar * > & VariableWarehouse::scalars ( ) const

Get the list of scalar variables.

Returns
The list of scalar variables

Definition at line 122 of file VariableWarehouse.C.

123{
124 return _scalar_vars;
125}

◆ setActiveScalarVariableCoupleableVectorTags()

void VariableWarehouse::setActiveScalarVariableCoupleableVectorTags ( const std::set< TagID > &  vtags)

Set the active vector tags for the variables.

Definition at line 316 of file VariableWarehouse.C.

317{
318 for (auto * var : _scalar_vars)
319 var->setActiveTags(vtags);
320}

◆ setActiveVariableCoupleableVectorTags()

void VariableWarehouse::setActiveVariableCoupleableVectorTags ( const std::set< TagID > &  vtags)

Set the active vector tags for the variables.

Definition at line 309 of file VariableWarehouse.C.

310{
311 for (auto * var : _vars)
312 var->setActiveTags(vtags);
313}

◆ subdomainSetup()

void VariableWarehouse::subdomainSetup ( )

Call subdomainSetup for all variables.

Definition at line 281 of file VariableWarehouse.C.

282{
283 for (auto & pair : _all_objects)
284 pair.second->subdomainSetup();
285}
void subdomainSetup()
Call subdomainSetup for all variables.

◆ timestepSetup()

void VariableWarehouse::timestepSetup ( )

Call timestepSetup for all variables.

Definition at line 267 of file VariableWarehouse.C.

268{
269 for (auto & pair : _all_objects)
270 pair.second->timestepSetup();
271}
void timestepSetup()
Call timestepSetup for all variables.

Member Data Documentation

◆ _all_objects

std::map<unsigned int, std::shared_ptr<MooseVariableBase> > VariableWarehouse::_all_objects
protected

◆ _array_vars_by_name

HashMap<std::string, ArrayMooseVariable *> VariableWarehouse::_array_vars_by_name
protected

map of vector finite element variables with name keys

Definition at line 251 of file VariableWarehouse.h.

Referenced by add(), and getFieldVariable().

◆ _array_vars_by_number

HashMap<unsigned, ArrayMooseVariable *> VariableWarehouse::_array_vars_by_number
protected

map of vector finite element variables with unsigned keys

Definition at line 254 of file VariableWarehouse.h.

Referenced by add(), and getFieldVariable().

◆ _boundary_vars

std::map<BoundaryID, std::set<const MooseVariableFieldBase *> > VariableWarehouse::_boundary_vars
protected

Map to variables that need to be evaluated on a boundary.

Definition at line 260 of file VariableWarehouse.h.

Referenced by addBoundaryVar(), and boundaryVars().

◆ _fv_vars_by_name

HashMap<std::string, MooseVariableFVReal *> VariableWarehouse::_fv_vars_by_name
protected

map of non-vector finite element variables with name keys

Definition at line 230 of file VariableWarehouse.h.

Referenced by add(), getActualFieldVariable(), and getFVVariable().

◆ _fv_vars_by_number

HashMap<unsigned, MooseVariableFVReal *> VariableWarehouse::_fv_vars_by_number
protected

map of non-vector finite element variables with unsigned keys

Definition at line 239 of file VariableWarehouse.h.

Referenced by add(), and getActualFieldVariable().

◆ _linear_fv_vars_by_name

HashMap<std::string, MooseLinearVariableFVReal *> VariableWarehouse::_linear_fv_vars_by_name
protected

map of non-vector linear finite volume variables with name keys

Definition at line 233 of file VariableWarehouse.h.

Referenced by add(), and getActualFieldVariable().

◆ _linear_fv_vars_by_number

HashMap<unsigned, MooseLinearVariableFVReal *> VariableWarehouse::_linear_fv_vars_by_number
protected

map of non-vector finite element variables with unsigned keys

Definition at line 242 of file VariableWarehouse.h.

Referenced by add(), and getActualFieldVariable().

◆ _names

std::vector<VariableName> VariableWarehouse::_names
protected

list of variable names

Definition at line 221 of file VariableWarehouse.h.

Referenced by add(), and names().

◆ _regular_vars_by_name

HashMap<std::string, MooseVariable *> VariableWarehouse::_regular_vars_by_name
protected

map of non-vector finite element variables with name keys

Definition at line 236 of file VariableWarehouse.h.

Referenced by add(), getActualFieldVariable(), and getFieldVariable().

◆ _regular_vars_by_number

HashMap<unsigned, MooseVariable *> VariableWarehouse::_regular_vars_by_number
protected

map of non-vector finite element variables with unsigned keys

Definition at line 227 of file VariableWarehouse.h.

Referenced by add(), getActualFieldVariable(), and getFieldVariable().

◆ _scalar_vars

std::vector<MooseVariableScalar *> VariableWarehouse::_scalar_vars
protected

list of all scalar, non-finite element variables

Definition at line 263 of file VariableWarehouse.h.

Referenced by add(), scalars(), and setActiveScalarVariableCoupleableVectorTags().

◆ _var_name

std::map<std::string, MooseVariableBase *> VariableWarehouse::_var_name
protected

Name to variable mapping.

Definition at line 257 of file VariableWarehouse.h.

Referenced by add(), and getVariable().

◆ _vars

std::vector<MooseVariableFieldBase *> VariableWarehouse::_vars
protected

list of finite element variables

Definition at line 224 of file VariableWarehouse.h.

Referenced by add(), clearAllDofIndices(), fieldVariables(), and setActiveVariableCoupleableVectorTags().

◆ _vector_vars_by_name

HashMap<std::string, VectorMooseVariable *> VariableWarehouse::_vector_vars_by_name
protected

map of vector finite element variables with name keys

Definition at line 245 of file VariableWarehouse.h.

Referenced by add(), and getFieldVariable().

◆ _vector_vars_by_number

HashMap<unsigned, VectorMooseVariable *> VariableWarehouse::_vector_vars_by_number
protected

map of vector finite element variables with unsigned keys

Definition at line 248 of file VariableWarehouse.h.

Referenced by add(), and getFieldVariable().


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