www.mooseframework.org
MooseVariableInterface.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 "MooseVariableBase.h"
13 
14 // Forward declarations
15 class Assembly;
16 class MooseObject;
17 template <typename T>
18 class MooseVariableField;
19 template <typename T>
20 class MooseVariableFE;
21 template <typename T>
22 class MooseVariableFV;
23 template <typename T>
25 
29 template <typename T>
31 {
32 public:
40  const MooseObject * moose_object,
41  bool nodal,
42  std::string var_param_name = "variable",
45 
50  MooseVariableBase * mooseVariableBase() const { return _var; };
51 
56 
61 
66 
71 
72  virtual ~MooseVariableInterface();
73 
74 protected:
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 
226  MooseVariableBase * _var = nullptr;
231 
232 protected:
234 
235 private:
237 };
virtual const OutputTools< T >::VariableValue & valueOld()
The old value of the variable this object is operating on.
VarFieldType
Definition: MooseTypes.h:634
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.
Keeps track of stuff related to assembling.
Definition: Assembly.h:93
MooseVariableBase * _var
The variable this object is acting on.
Class for stuff related to variables.
Definition: Adaptivity.h:31
Class for stuff related to variables.
Definition: Coupleable.h:38
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 > * _linear_fv_variable
bool _nodal
Whether or not this object is acting only at nodes.
MooseVariableFV< T > * _fv_variable
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.
Definition: MooseObject.h:33
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
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.
MooseVariableFE< T > * _variable
virtual const OutputTools< T >::VariableTestSecond & secondTestFace()
The second derivative of the test function on the current face.
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:302
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 >::VariableGradient & gradient()
The gradient of the variable this object is operating on.
Interface for objects that need to get values of MooseVariables.
MooseVariableBase * mooseVariableBase() const
Get the variable that this object is using.
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.
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.
This class provides variable solution values for other classes/objects to bind to when looping over f...
virtual const OutputTools< T >::VariablePhiSecond & secondPhi()
The second derivative of the trial function.
virtual const OutputTools< T >::VariableSecond & secondOlder()
The older second derivative of the variable this object is operating on.
This class provides variable solution interface for linear finite volume problems.
Definition: FVUtils.h:24
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.