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");
106 template <
typename T>
111 return _variable->dofValuesOld();
113 return _variable->slnOld();
121 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
126 template <
typename T>
131 return _variable->dofValuesOlder();
133 return _variable->slnOlder();
141 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
146 template <
typename T>
151 return _variable->dofValuesDot();
153 return _variable->uDot();
156 template <
typename T>
161 return _variable->dofValuesDotDot();
163 return _variable->uDotDot();
166 template <
typename T>
171 return _variable->dofValuesDotOld();
173 return _variable->uDotOld();
176 template <
typename T>
181 return _variable->dofValuesDotDotOld();
183 return _variable->uDotDotOld();
191 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
201 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
211 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
221 mooseError(
"Dofs are scalars while vector variables have vector values. Mismatch");
226 template <
typename T>
231 return _variable->dofValuesDuDotDu();
233 return _variable->duDotDu();
236 template <
typename T>
241 return _variable->dofValuesDuDotDotDu();
243 return _variable->duDotDotDu();
246 template <
typename T>
251 mooseError(
"gradients are not defined at nodes");
253 return _variable->gradSln();
256 template <
typename T>
261 mooseError(
"gradients are not defined at nodes");
263 return _variable->gradSlnOld();
266 template <
typename T>
271 mooseError(
"gradients are not defined at nodes");
273 return _variable->gradSlnOlder();
276 template <
typename T>
281 mooseError(
"second derivatives are not defined at nodes");
283 return _variable->secondSln();
286 template <
typename T>
291 mooseError(
"second derivatives are not defined at nodes");
293 return _variable->secondSlnOld();
296 template <
typename T>
301 mooseError(
"second derivatives are not defined at nodes");
303 return _variable->secondSlnOlder();
306 template <
typename T>
311 mooseError(
"second derivatives are not defined at nodes");
313 return _variable->secondPhi();
316 template <
typename T>
321 mooseError(
"second derivatives are not defined at nodes");
323 return _variable->secondPhiFace();
326 template <
typename T>
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);
339 template <
typename T>
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);
352 template <
typename T>
356 return *_field_variable;
virtual const OutputTools< T >::VariableValue & valueOld()
The old value of the variable this object is operating on.
virtual const OutputTools< T >::VariablePhiSecond & secondPhiFace()
The second derivative of the trial function on the current face.
MooseVariableFV< T > * mooseVariableFV() const
Return the MooseVariableFV object that this interface acts on.
virtual const OutputTools< T >::VariableGradient & gradientOld()
The old gradient of the variable this object is operating on.
MooseVariableBase * _var
The variable this object is acting on.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
OutputTools< RealVectorValue >::VariableValue VectorVariableValue
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.
const FieldVariableValue & uDotOld() const
MooseLinearVariableFV< T > * _linear_fv_variable
bool _nodal
Whether or not this object is acting only at nodes.
MooseVariableFV< T > * _fv_variable
virtual const std::string & name() const
Get the name of the class.
const FieldVariableValue & uDot() const
element dots
virtual const VariableValue & dotDotDu()
The derivative of the second time derivative of the variable this object is operating on with respect...
MooseVariableFE< T > * mooseVariable() const
Return the MooseVariableFE object that this interface acts on.
virtual const OutputTools< T >::VariableValue & valueOlder()
The older 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.
Every object that can be built by the factory should be derived from this class.
const FieldVariableValue & uDotDot() const
const FieldVariableValue & sln() const override
element solutions
VarKindType
Framework-wide stuff.
const FieldVariableValue & uDotDotOld() const
virtual const OutputTools< T >::VariableTestSecond & secondTest()
The second derivative of the test function.
virtual const OutputTools< T >::VariableValue & value()
The value of the variable this object is operating on.
virtual const OutputTools< T >::VariableValue & dotOld()
The old time derivative of the variable this object is operating on.
unsigned int number() const
Gets the number of this system.
MooseVariableFE< T > * _variable
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...
virtual const OutputTools< T >::VariableTestSecond & secondTestFace()
The second derivative of the test function on the current face.
OutputTools< Real >::VariableValue VariableValue
virtual const VariableValue & dotDu()
The derivative of the time derivative of the variable this object is operating on with respect to thi...
const FieldVariableValue & slnOlder() const override
virtual const OutputTools< T >::VariableValue & dot()
The time derivative of the variable this object is operating on.
Generic class for solving transient nonlinear problems.
Moose::VarKindType kind() const
Kind of the variable (Nonlinear, Auxiliary, ...)
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
virtual const OutputTools< T >::VariableGradient & gradient()
The gradient of the variable this object is operating on.
MooseVariableField< T > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
const MooseObject & _moose_object
virtual const OutputTools< T >::VariableSecond & secondOld()
The old second derivative of the variable this object is operating on.
const InputParameters & parameters() const
Get the parameters of the object.
virtual const OutputTools< T >::VariableSecond & second()
The second derivative of the variable this object is operating on.
MooseVariableField< T > * _field_variable
MooseLinearVariableFV< T > * mooseLinearVariableFV() const
Return the MooseLinearVariableFV object that this interface acts on.
virtual const OutputTools< T >::VariablePhiSecond & secondPhi()
The second derivative of the trial function.
const FieldVariableValue & slnOld() const override
SystemBase & sys()
Get the system this variable is part of.
virtual ~MooseVariableInterface()
virtual const OutputTools< T >::VariableSecond & secondOlder()
The older second derivative of the variable this object is operating on.
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.