Wraps non-AD functors such that they can be used in objects that have requested the functor as AD. More...
#include <ADWrapperFunctor.h>
Public Types | |
| using | FunctorType = FunctorBase< T > |
| using | ValueType = T |
| using | GradientType = typename FunctorReturnType< T, FunctorEvaluationKind::Gradient >::type |
| This rigmarole makes it so that a user can create functors that return containers (std::vector, std::array). More... | |
| using | DotType = ValueType |
Public Member Functions | |
| ADWrapperFunctor (const FunctorBase< typename MetaPhysicL::RawType< T >::value_type > &non_ad_functor) | |
| virtual bool | isExtrapolatedBoundaryFace (const FaceInfo &fi, const Elem *const elem, const Moose::StateArg &state) const override |
| Returns whether this (sided) face is an extrapolated boundary face for this functor. More... | |
| virtual bool | isConstant () const override |
| Returns true if this functor is a constant. More... | |
| virtual bool | hasBlocks (const SubdomainID id) const override |
| Returns whether the functor is defined on this block. More... | |
| virtual bool | hasFaceSide (const FaceInfo &fi, const bool fi_elem_side) const override |
| bool | supportsFaceArg () const override final |
| Whether this functor supports evaluation with FaceArg. More... | |
| bool | supportsElemSideQpArg () const override final |
| Whether this functor supports evaluation with ElemSideQpArg. More... | |
| template<FunctorEvaluationKind FET, typename Space , typename State > | |
| FunctorReturnType< T, FET >::type | genericEvaluate (const Space &r, const State &state) const |
Perform a generic evaluation based on the supplied template argument FET and supplied spatial and temporal arguments. More... | |
| const MooseFunctorName & | functorName () const |
| Return the functor name. More... | |
| virtual void | residualSetup () override |
| virtual void | jacobianSetup () override |
| virtual void | timestepSetup () override |
| virtual void | customSetup (const ExecFlagType &exec_type) override |
| void | setCacheClearanceSchedule (const std::set< ExecFlagType > &clearance_schedule) |
| Set how often to clear the functor evaluation cache. More... | |
| bool | isInternalFace (const FaceInfo &) const |
| Returns true if the face is an internal face. More... | |
| void | checkFace (const Moose::FaceArg &face) const |
| Examines the incoming face argument. More... | |
| ValueType | operator() (const ElemArg &elem, const StateArg &state) const |
Same as their evaluate overloads with the same arguments but allows for caching implementation. More... | |
| ValueType | operator() (const FaceArg &face, const StateArg &state) const |
| ValueType | operator() (const ElemQpArg &qp, const StateArg &state) const |
| ValueType | operator() (const ElemSideQpArg &qp, const StateArg &state) const |
| ValueType | operator() (const ElemPointArg &elem_point, const StateArg &state) const |
| ValueType | operator() (const NodeArg &node, const StateArg &state) const |
| GradientType | gradient (const ElemArg &elem, const StateArg &state) const |
Same as their evaluateGradient overloads with the same arguments but allows for caching implementation. More... | |
| GradientType | gradient (const FaceArg &face, const StateArg &state) const |
| GradientType | gradient (const ElemQpArg &qp, const StateArg &state) const |
| GradientType | gradient (const ElemSideQpArg &qp, const StateArg &state) const |
| GradientType | gradient (const ElemPointArg &elem_point, const StateArg &state) const |
| GradientType | gradient (const NodeArg &node, const StateArg &state) const |
| DotType | dot (const ElemArg &elem, const StateArg &state) const |
Same as their evaluateDot overloads with the same arguments but allows for caching implementation. More... | |
| DotType | dot (const FaceArg &face, const StateArg &state) const |
| DotType | dot (const ElemQpArg &qp, const StateArg &state) const |
| DotType | dot (const ElemSideQpArg &qp, const StateArg &state) const |
| DotType | dot (const ElemPointArg &elem_point, const StateArg &state) const |
| DotType | dot (const NodeArg &node, const StateArg &state) const |
| GradientType | gradDot (const ElemArg &elem, const StateArg &state) const |
Same as their evaluateGradDot overloads with the same arguments but allows for caching implementation. More... | |
| GradientType | gradDot (const FaceArg &face, const StateArg &state) const |
| GradientType | gradDot (const ElemQpArg &qp, const StateArg &state) const |
| GradientType | gradDot (const ElemSideQpArg &qp, const StateArg &state) const |
| GradientType | gradDot (const ElemPointArg &elem_point, const StateArg &state) const |
| GradientType | gradDot (const NodeArg &node, const StateArg &state) const |
Protected Member Functions | |
| ValueType | evaluate (const ElemArg &elem, const StateArg &state) const override |
| Forward calls to wrapped object. More... | |
| ValueType | evaluate (const FaceArg &face, const StateArg &state) const override |
| ValueType | evaluate (const ElemQpArg &qp, const StateArg &state) const override |
| ValueType | evaluate (const ElemSideQpArg &qp, const StateArg &state) const override |
| ValueType | evaluate (const ElemPointArg &elem_point, const StateArg &state) const override |
| Evaluate the functor with a given element and point. More... | |
| ValueType | evaluate (const NodeArg &node, const StateArg &state) const override |
| GradientType | evaluateGradient (const ElemArg &elem, const StateArg &state) const override |
| Evaluate the functor gradient with a given element. More... | |
| GradientType | evaluateGradient (const FaceArg &face, const StateArg &state) const override |
| GradientType | evaluateGradient (const ElemQpArg &qp, const StateArg &state) const override |
| GradientType | evaluateGradient (const ElemSideQpArg &qp, const StateArg &state) const override |
| GradientType | evaluateGradient (const ElemPointArg &elem_point, const StateArg &state) const override |
| Evaluate the functor gradient with a given element and point. More... | |
| GradientType | evaluateGradient (const NodeArg &node, const StateArg &state) const override |
| DotType | evaluateDot (const ElemArg &elem, const StateArg &state) const override |
| Evaluate the functor time derivative with a given element. More... | |
| DotType | evaluateDot (const FaceArg &face, const StateArg &state) const override |
| DotType | evaluateDot (const ElemQpArg &qp, const StateArg &state) const override |
| DotType | evaluateDot (const ElemSideQpArg &qp, const StateArg &state) const override |
| DotType | evaluateDot (const ElemPointArg &elem_point, const StateArg &state) const override |
| Evaluate the functor time derivative with a given element and point. More... | |
| DotType | evaluateDot (const NodeArg &node, const StateArg &state) const override |
| GradientType | evaluateGradDot (const ElemArg &elem, const StateArg &state) const override |
| Evaluate the functor gradient-dot with a given element. More... | |
| GradientType | evaluateGradDot (const FaceArg &face, const StateArg &state) const override |
| GradientType | evaluateGradDot (const ElemQpArg &qp, const StateArg &state) const override |
| GradientType | evaluateGradDot (const ElemSideQpArg &qp, const StateArg &state) const override |
| GradientType | evaluateGradDot (const ElemPointArg &elem_point, const StateArg &state) const override |
| Evaluate the functor gradient-dot with a given element and point. More... | |
| GradientType | evaluateGradDot (const NodeArg &node, const StateArg &state) const override |
Private Attributes | |
| const FunctorBase< typename MetaPhysicL::RawType< T >::value_type > & | _non_ad_functor |
| Our wrapped AD object. More... | |
Wraps non-AD functors such that they can be used in objects that have requested the functor as AD.
Definition at line 20 of file ADWrapperFunctor.h.
|
inherited |
Definition at line 150 of file MooseFunctor.h.
|
inherited |
Definition at line 140 of file MooseFunctor.h.
|
inherited |
This rigmarole makes it so that a user can create functors that return containers (std::vector, std::array).
This logic will make it such that if a user requests a functor type T that is a container of algebraic types, for example Reals, then the GradientType will be a container of the gradients of those algebraic types, in this example VectorValue<Reals>. So if T is std::vector<Real>, then GradientType will be std::vector<VectorValue<Real>>. As another example: T = std::array<VectorValue<Real>, 1> -> GradientType = std::array<TensorValue<Real>, 1>
Definition at line 149 of file MooseFunctor.h.
|
inherited |
Definition at line 141 of file MooseFunctor.h.
|
inline |
Definition at line 27 of file ADWrapperFunctor.h.
|
inherited |
Examines the incoming face argument.
If the face argument producer (residual object, postprocessor, etc.) did not indicate a sidedness to the face, e.g. if the face_side member of the FaceArg is nullptr, then we may "modify" the sidedness of the argument if we are only defined on one side of the face. If the face argument producer has indicated a sidedness and we are not defined on that side, then we will error
| face | The face argument created by the face argument producer, likely a residual object |
Definition at line 732 of file MooseFunctor.h.
|
overridevirtualinherited |
Implements Moose::FunctorAbstract.
Reimplemented in Function.
Definition at line 839 of file MooseFunctor.h.
|
inherited |
Same as their evaluateDot overloads with the same arguments but allows for caching implementation.
These are the methods a user will call in their code
Definition at line 890 of file MooseFunctor.h.
Referenced by FVFunctorTimeKernel::computeQpResidual(), and Moose::ADWrapperFunctor< T >::evaluateDot().
|
inherited |
Definition at line 897 of file MooseFunctor.h.
|
inherited |
Definition at line 905 of file MooseFunctor.h.
|
inherited |
Definition at line 912 of file MooseFunctor.h.
|
inherited |
Definition at line 919 of file MooseFunctor.h.
|
inherited |
Definition at line 926 of file MooseFunctor.h.
|
inlineoverrideprotectedvirtual |
Forward calls to wrapped object.
Implements Moose::FunctorBase< T >.
Definition at line 60 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Implements Moose::FunctorBase< T >.
Definition at line 64 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Implements Moose::FunctorBase< T >.
Definition at line 68 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
| side_qp | See the ElemSideQpArg doxygen |
| state | See the StateArg doxygen |
Implements Moose::FunctorBase< T >.
Definition at line 72 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Evaluate the functor with a given element and point.
Some example implementations of this method could perform a two-term Taylor expansion using cell-centered value and gradient
Implements Moose::FunctorBase< T >.
Definition at line 76 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Implements Moose::FunctorBase< T >.
Definition at line 80 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Evaluate the functor time derivative with a given element.
Some example implementations of this method could compute an element-average or evaluate at the element centroid
Reimplemented from Moose::FunctorBase< T >.
Definition at line 111 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 115 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 119 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
| side_qp | See the ElemSideQpArg doxygen |
| state | See the StateArg doxygen |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 123 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Evaluate the functor time derivative with a given element and point.
Reimplemented from Moose::FunctorBase< T >.
Definition at line 127 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 131 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Evaluate the functor gradient-dot with a given element.
Some example implementations of this method could compute an element-average or evaluate at the element centroid
Reimplemented from Moose::FunctorBase< T >.
Definition at line 136 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 140 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 144 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
| side_qp | See the ElemSideQpArg doxygen |
| state | See the StateArg doxygen |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 148 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Evaluate the functor gradient-dot with a given element and point.
Reimplemented from Moose::FunctorBase< T >.
Definition at line 152 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 157 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Evaluate the functor gradient with a given element.
Some example implementations of this method could compute an element-average or evaluate at the element centroid
Reimplemented from Moose::FunctorBase< T >.
Definition at line 85 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 89 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 93 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
| side_qp | See the ElemSideQpArg doxygen |
| state | See the StateArg doxygen |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 97 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Evaluate the functor gradient with a given element and point.
Reimplemented from Moose::FunctorBase< T >.
Definition at line 101 of file ADWrapperFunctor.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 106 of file ADWrapperFunctor.h.
|
inlineinherited |
Return the functor name.
Definition at line 170 of file MooseFunctor.h.
Referenced by Moose::FunctorBase< libMesh::VectorValue >::evaluateDot(), Moose::FunctorBase< libMesh::VectorValue >::evaluateGradDot(), Moose::FunctorBase< libMesh::VectorValue >::evaluateGradient(), and Moose::FunctorBase< libMesh::VectorValue >::hasBlocks().
|
inherited |
Perform a generic evaluation based on the supplied template argument FET and supplied spatial and temporal arguments.
Definition at line 987 of file MooseFunctor.h.
|
inherited |
Same as their evaluateGradDot overloads with the same arguments but allows for caching implementation.
These are the methods a user will call in their code
Definition at line 933 of file MooseFunctor.h.
Referenced by Moose::VectorComponentFunctor< T >::evaluateGradDot(), and Moose::ADWrapperFunctor< T >::evaluateGradDot().
|
inherited |
Definition at line 940 of file MooseFunctor.h.
|
inherited |
Definition at line 948 of file MooseFunctor.h.
|
inherited |
Definition at line 955 of file MooseFunctor.h.
|
inherited |
Definition at line 962 of file MooseFunctor.h.
|
inherited |
Definition at line 969 of file MooseFunctor.h.
|
inherited |
Same as their evaluateGradient overloads with the same arguments but allows for caching implementation.
These are the methods a user will call in their code
Definition at line 847 of file MooseFunctor.h.
Referenced by GradientJumpIndicator::computeQpIntegral(), Moose::FV::containerInterpolate(), Moose::VectorComponentFunctor< T >::evaluateGradient(), Moose::ADWrapperFunctor< T >::evaluateGradient(), and Moose::FV::greenGaussGradient().
|
inherited |
Definition at line 854 of file MooseFunctor.h.
|
inherited |
Definition at line 862 of file MooseFunctor.h.
|
inherited |
Definition at line 869 of file MooseFunctor.h.
|
inherited |
Definition at line 876 of file MooseFunctor.h.
|
inherited |
Definition at line 883 of file MooseFunctor.h.
|
inlineoverridevirtual |
Returns whether the functor is defined on this block.
Reimplemented from Moose::FunctorBase< T >.
Definition at line 40 of file ADWrapperFunctor.h.
|
inlineoverridevirtual |
Reimplemented from Moose::FunctorBase< T >.
Definition at line 44 of file ADWrapperFunctor.h.
|
inlineoverridevirtual |
Returns true if this functor is a constant.
Reimplemented from Moose::FunctorBase< T >.
Definition at line 39 of file ADWrapperFunctor.h.
|
inlineoverridevirtual |
Returns whether this (sided) face is an extrapolated boundary face for this functor.
Reimplemented from Moose::FunctorBase< T >.
Definition at line 33 of file ADWrapperFunctor.h.
|
inherited |
Returns true if the face is an internal face.
Definition at line 569 of file MooseFunctor.h.
Referenced by FVAnisotropicDiffusion::computeQpResidual(), and FVDiffusion::computeQpResidual().
|
overridevirtualinherited |
Implements Moose::FunctorAbstract.
Reimplemented in MooseVariableFE< OutputType >, MooseVariableFE< ComputeValueType >, MooseVariableFE< T >, MooseVariableFE< RealEigenVector >, MooseVariableFE< VectorValue< Real > >, MooseVariableFE< RealVectorValue >, MooseVariableFE< Real >, MooseVariableFV< OutputType >, MooseVariableFV< ComputeValueType >, MooseVariableFV< T >, MooseVariableFV< RealEigenVector >, MooseVariableFV< RealVectorValue >, MooseVariableFV< Real >, MooseVariableField< OutputType >, MooseVariableField< RT >, MooseVariableField< ComputeValueType >, MooseVariableField< T >, MooseVariableField< RealEigenVector >, MooseVariableField< RealVectorValue >, MooseVariableField< Real >, MooseLinearVariableFV< OutputType >, MooseLinearVariableFV< ComputeValueType >, MooseLinearVariableFV< T >, MooseLinearVariableFV< RealEigenVector >, MooseLinearVariableFV< RealVectorValue >, MooseLinearVariableFV< Real >, and Function.
Definition at line 831 of file MooseFunctor.h.
|
inherited |
Same as their evaluate overloads with the same arguments but allows for caching implementation.
These are the methods a user will call in their code
Definition at line 597 of file MooseFunctor.h.
|
inherited |
Definition at line 610 of file MooseFunctor.h.
|
inherited |
Definition at line 656 of file MooseFunctor.h.
|
inherited |
Definition at line 677 of file MooseFunctor.h.
|
inherited |
Definition at line 707 of file MooseFunctor.h.
|
inherited |
Definition at line 724 of file MooseFunctor.h.
|
overridevirtualinherited |
Implements Moose::FunctorAbstract.
Reimplemented in MooseVariableFE< OutputType >, MooseVariableFE< ComputeValueType >, MooseVariableFE< T >, MooseVariableFE< RealEigenVector >, MooseVariableFE< VectorValue< Real > >, MooseVariableFE< RealVectorValue >, MooseVariableFE< Real >, MooseVariableFV< OutputType >, MooseVariableFV< ComputeValueType >, MooseVariableFV< T >, MooseVariableFV< RealEigenVector >, MooseVariableFV< RealVectorValue >, MooseVariableFV< Real >, MooseVariableField< OutputType >, MooseVariableField< RT >, MooseVariableField< ComputeValueType >, MooseVariableField< T >, MooseVariableField< RealEigenVector >, MooseVariableField< RealVectorValue >, MooseVariableField< Real >, MooseLinearVariableFV< OutputType >, MooseLinearVariableFV< ComputeValueType >, MooseLinearVariableFV< T >, MooseLinearVariableFV< RealEigenVector >, MooseLinearVariableFV< RealVectorValue >, MooseLinearVariableFV< Real >, and Function.
Definition at line 823 of file MooseFunctor.h.
|
inherited |
Set how often to clear the functor evaluation cache.
Definition at line 714 of file MooseFunctor.h.
|
inlinefinaloverridevirtual |
Whether this functor supports evaluation with ElemSideQpArg.
Implements Moose::FunctorBase< T >.
Definition at line 50 of file ADWrapperFunctor.h.
|
inlinefinaloverridevirtual |
Whether this functor supports evaluation with FaceArg.
Implements Moose::FunctorBase< T >.
Definition at line 49 of file ADWrapperFunctor.h.
|
overridevirtualinherited |
Implements Moose::FunctorAbstract.
Reimplemented in MooseVariableFV< OutputType >, MooseVariableFV< ComputeValueType >, MooseVariableFV< T >, MooseVariableFV< RealEigenVector >, MooseVariableFV< RealVectorValue >, MooseVariableFV< Real >, MooseVariableField< OutputType >, MooseVariableField< RT >, MooseVariableField< ComputeValueType >, MooseVariableField< T >, MooseVariableField< RealEigenVector >, MooseVariableField< RealVectorValue >, MooseVariableField< Real >, Function, NumNonlinearIterations, and MemoryUsage.
Definition at line 815 of file MooseFunctor.h.
|
private |
Our wrapped AD object.
Definition at line 165 of file ADWrapperFunctor.h.
Referenced by Moose::ADWrapperFunctor< T >::evaluate(), Moose::ADWrapperFunctor< T >::evaluateDot(), Moose::ADWrapperFunctor< T >::evaluateGradDot(), Moose::ADWrapperFunctor< T >::evaluateGradient(), Moose::ADWrapperFunctor< T >::hasBlocks(), Moose::ADWrapperFunctor< T >::hasFaceSide(), Moose::ADWrapperFunctor< T >::isConstant(), Moose::ADWrapperFunctor< T >::isExtrapolatedBoundaryFace(), Moose::ADWrapperFunctor< T >::supportsElemSideQpArg(), and Moose::ADWrapperFunctor< T >::supportsFaceArg().
1.8.14