https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MooseVariableInterface.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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 "MooseVariableBase.h"
13
14// Forward declarations
15class Assembly;
16class MooseObject;
17template <typename T>
19template <typename T>
20class MooseVariableFE;
21template <typename T>
22class MooseVariableFV;
23template <typename T>
25
29template <typename T>
31{
32public:
40 const MooseObject * moose_object,
41 bool nodal,
42 std::string var_param_name = "variable",
45
51
56
61
66
71
73
74protected:
82 virtual const typename OutputTools<T>::VariableValue & value();
83
89 virtual const typename OutputTools<T>::VariableValue & valueOld();
90
96 virtual const typename OutputTools<T>::VariableValue & valueOlder();
97
103 virtual const typename OutputTools<T>::VariableValue & dot();
104
110 virtual const typename OutputTools<T>::VariableValue & dotDot();
111
117 virtual const typename OutputTools<T>::VariableValue & dotOld();
118
124 virtual const typename OutputTools<T>::VariableValue & dotDotOld();
125
134 virtual const VariableValue & dotDu();
135
144 virtual const VariableValue & dotDotDu();
145
153 virtual const typename OutputTools<T>::VariableGradient & gradient();
154
160 virtual const typename OutputTools<T>::VariableGradient & gradientOld();
161
167 virtual const typename OutputTools<T>::VariableGradient & gradientOlder();
168
174 virtual const typename OutputTools<T>::VariableSecond & second();
175
181 virtual const typename OutputTools<T>::VariableSecond & secondOld();
182
188 virtual const typename OutputTools<T>::VariableSecond & secondOlder();
189
195 virtual const typename OutputTools<T>::VariableTestSecond & secondTest();
196
204 virtual const typename OutputTools<T>::VariableTestSecond & secondTestFace();
205
211 virtual const typename OutputTools<T>::VariablePhiSecond & secondPhi();
212
220 virtual const typename OutputTools<T>::VariablePhiSecond & secondPhiFace();
221
223 bool _nodal;
224
231
232protected:
234
235private:
237};
238
239// Declare all the specializations, as the template specialization declaration below must know
240template <>
242template <>
244template <>
246template <>
248template <>
250template <>
252template <>
254
255// Prevent implicit instantiation in other translation units where these classes are used
256extern template class MooseVariableInterface<Real>;
257extern template class MooseVariableInterface<RealVectorValue>;
258extern template class MooseVariableInterface<RealEigenVector>;
OutputTools< Real >::VariableValue VariableValue
Definition MooseTypes.h:348
OutputTools< RealVectorValue >::VariableValue VectorVariableValue
Definition MooseTypes.h:365
Keeps track of stuff related to assembling.
Definition Assembly.h:110
forward declarations
Definition MooseArray.h:18
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.
Definition MooseObject.h:31
Base variable class.
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
MooseVariableBase * mooseVariableBase() const
Get the variable that this object is using.
virtual const OutputTools< T >::VariableSecond & secondOlder()
The older second derivative of the variable this object is operating on.
const MooseObject & _moose_object
bool _nodal
Whether or not this object is acting only at nodes.
MooseVariableBase * _var
The variable this object is acting on.
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...
@ VAR_FIELD_ANY
Definition MooseTypes.h:781
VarKindType
Framework-wide stuff.
Definition MooseTypes.h:769
@ VAR_ANY
Definition MooseTypes.h:772