25 std::string var_param_name,
28 : _nodal(nodal), _moose_object(*moose_object)
37 parameters.
varName(var_param_name, moose_object->
name()),
39 expected_var_field_type);
44 mooseError(
"The variable supplied to the variable interface is not of field type");
62 ". Did you forget to set fv = true in the Variables block?");
70 if (!_linear_fv_variable)
72 "The variable defined in ", _moose_object.name(),
" is not a MooseLinearVariableFV!");
73 return _linear_fv_variable;
82 "_variable is null in ", _moose_object.name(),
". Are you using a finite volume variable?");
91 return _variable->dofValues();
93 return _variable->sln();
101 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
103 return _variable->sln();
111 return _variable->dofValuesOld();
113 return _variable->slnOld();
121 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
123 return _variable->slnOld();
131 return _variable->dofValuesOlder();
133 return _variable->slnOlder();
141 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
143 return _variable->slnOlder();
151 return _variable->dofValuesDot();
153 return _variable->uDot();
161 return _variable->dofValuesDotDot();
163 return _variable->uDotDot();
171 return _variable->dofValuesDotOld();
173 return _variable->uDotOld();
181 return _variable->dofValuesDotDotOld();
183 return _variable->uDotDotOld();
191 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
193 return _variable->uDot();
201 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
203 return _variable->uDotDot();
211 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
213 return _variable->uDotOld();
221 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
223 return _variable->uDotDotOld();
231 return _variable->dofValuesDuDotDu();
233 return _variable->duDotDu();
241 return _variable->dofValuesDuDotDotDu();
243 return _variable->duDotDotDu();
251 mooseError(
"gradients are not defined at nodes");
253 return _variable->gradSln();
261 mooseError(
"gradients are not defined at nodes");
263 return _variable->gradSlnOld();
271 mooseError(
"gradients are not defined at nodes");
273 return _variable->gradSlnOlder();
281 mooseError(
"second derivatives are not defined at nodes");
283 return _variable->secondSln();
291 mooseError(
"second derivatives are not defined at nodes");
293 return _variable->secondSlnOld();
301 mooseError(
"second derivatives are not defined at nodes");
303 return _variable->secondSlnOlder();
311 mooseError(
"second derivatives are not defined at nodes");
313 return _variable->secondPhi();
321 mooseError(
"second derivatives are not defined at nodes");
323 return _variable->secondPhiFace();
331 mooseError(
"second derivatives are not defined at nodes");
333 if (_linear_fv_variable)
334 mooseError(
"second order shape function derivatives not available for linear FV variables");
336 return _mvi_assembly->secondPhi(*_variable);
344 mooseError(
"second derivatives are not defined at nodes");
346 if (_linear_fv_variable)
347 mooseError(
"second order shape function derivatives not available for linear FV variables");
349 return _mvi_assembly->secondPhiFace(*_variable);
356 return *_field_variable;
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
OutputTools< Real >::VariableValue VariableValue
OutputTools< RealVectorValue >::VariableValue VectorVariableValue
const InputParameters & parameters() const
Get the parameters of the object.
const std::string & name() const
Get the name of the class.
This class provides variable solution interface for linear finite volume problems.
Every object that can be built by the factory should be derived from this class.
SystemBase & sys()
Get the system this variable is part of.
Moose::VarKindType kind() const
Kind of the variable (Nonlinear, Auxiliary, ...)
Class for stuff related to variables.
This class provides variable solution values for other classes/objects to bind to when looping over f...
Class for stuff related to variables.
Interface for objects that need to get values of MooseVariables.
virtual const OutputTools< T >::VariableGradient & gradientOld()
The old gradient of the variable this object is operating on.
MooseVariableFE< T > * _variable
virtual const OutputTools< T >::VariableSecond & second()
The second derivative of the variable this object is operating on.
virtual const OutputTools< T >::VariableValue & value()
The value of the variable this object is operating on.
virtual const OutputTools< T >::VariableGradient & gradientOlder()
The older gradient of the variable this object is operating on.
virtual const VariableValue & dotDu()
The derivative of the time derivative of the variable this object is operating on with respect to thi...
virtual const OutputTools< T >::VariableValue & dot()
The time derivative of the variable this object is operating on.
virtual const OutputTools< T >::VariablePhiSecond & secondPhi()
The second derivative of the trial function.
virtual const OutputTools< T >::VariableValue & valueOld()
The old value of the variable this object is operating on.
virtual const OutputTools< T >::VariableValue & valueOlder()
The older value of the variable this object is operating on.
MooseVariableFE< T > * mooseVariable() const
Return the MooseVariableFE object that this interface acts on.
MooseVariableField< T > * _field_variable
MooseVariableField< T > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
virtual const OutputTools< T >::VariableTestSecond & secondTest()
The second derivative of the test function.
virtual const OutputTools< T >::VariableGradient & gradient()
The gradient of the variable this object is operating on.
virtual const OutputTools< T >::VariableSecond & secondOld()
The old second derivative of the variable this object is operating on.
virtual const OutputTools< T >::VariableTestSecond & secondTestFace()
The second derivative of the test function on the current face.
MooseVariableFV< T > * mooseVariableFV() const
Return the MooseVariableFV object that this interface acts on.
virtual const OutputTools< T >::VariableValue & dotOld()
The old time derivative of the variable this object is operating on.
MooseVariableFV< T > * _fv_variable
virtual const OutputTools< T >::VariableSecond & secondOlder()
The older second derivative of the variable this object is operating on.
const MooseObject & _moose_object
MooseVariableBase * _var
The variable this object is acting on.
virtual ~MooseVariableInterface()
virtual const OutputTools< T >::VariableValue & dotDot()
The second time derivative of the variable this object is operating on.
virtual const OutputTools< T >::VariableValue & dotDotOld()
The old second time derivative of the variable this object is operating on.
MooseLinearVariableFV< T > * mooseLinearVariableFV() const
Return the MooseLinearVariableFV object that this interface acts on.
MooseLinearVariableFV< T > * _linear_fv_variable
virtual const OutputTools< T >::VariablePhiSecond & secondPhiFace()
The second derivative of the trial function on the current face.
virtual const VariableValue & dotDotDu()
The derivative of the second time derivative of the variable this object is operating on with respect...
MooseVariableInterface(const MooseObject *moose_object, bool nodal, std::string var_param_name="variable", Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY)
Constructing the object.
Generic class for solving transient nonlinear problems.
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const =0
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
unsigned int number() const
Gets the number of this system.
VarKindType
Framework-wide stuff.