Base class for creating a user object with the SpatialUserObject and Moose::Functor APIs. More...
#include <SpatialUserObjectFunctor.h>
Public Types | |
using | FunctorType = FunctorBase< Real > |
using | ValueType = Real |
using | GradientType = typename FunctorReturnType< Real, 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 | |
SpatialUserObjectFunctor (const InputParameters ¶ms) | |
virtual bool | hasBlocks (SubdomainID sub) const override |
Returns whether the functor is defined on this block. More... | |
template<typename SpatialArg > | |
Real | evaluateTemplate (const SpatialArg &position, const Moose::StateArg &libmesh_dbg_var(state)) const |
FunctorReturnType< Real, 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... | |
virtual bool | isExtrapolatedBoundaryFace (const FaceInfo &, const Elem *, const StateArg &) const |
Returns whether this (sided) face is an extrapolated boundary face for this functor. More... | |
bool | isInternalFace (const FaceInfo &) const |
Returns true if the face is an internal face. More... | |
virtual bool | isConstant () const |
Returns true if this functor is a constant. More... | |
virtual bool | hasFaceSide (const FaceInfo &fi, const bool fi_elem_side) const override |
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 |
Static Public Member Functions | |
static InputParameters | validParams () |
Protected Types | |
using | ElemArg = Moose::ElemArg |
using | ElemQpArg = Moose::ElemQpArg |
using | ElemSideQpArg = Moose::ElemSideQpArg |
using | FaceArg = Moose::FaceArg |
using | ElemPointArg = Moose::ElemPointArg |
using | NodeArg = Moose::NodeArg |
Protected Member Functions | |
virtual Real | evaluate (const ElemArg &elem, const Moose::StateArg &state) const override |
Evaluate the functor with a given element. More... | |
virtual Real | evaluate (const FaceArg &face, const Moose::StateArg &state) const override final |
virtual Real | evaluate (const ElemQpArg &qp, const Moose::StateArg &state) const override |
virtual Real | evaluate (const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final |
virtual Real | evaluate (const ElemPointArg &elem_point, const Moose::StateArg &state) const override final |
Evaluate the functor with a given element and point. More... | |
virtual Real | evaluate (const NodeArg &node, const Moose::StateArg &state) const override final |
virtual bool | supportsFaceArg () const override final |
Whether this functor supports evaluation with FaceArg. More... | |
virtual bool | supportsElemSideQpArg () const override final |
Whether this functor supports evaluation with ElemSideQpArg. More... | |
Functor evaluation routines | |
These methods are all for evaluating functors with different kinds of spatial arguments. Each of these methods also takes a state argument. For a description of the state argument, please see the | |
virtual GradientType | evaluateGradient (const ElemArg &, const StateArg &) const |
Evaluate the functor gradient with a given element. More... | |
virtual GradientType | evaluateGradient (const FaceArg &, const StateArg &) const |
virtual GradientType | evaluateGradient (const ElemQpArg &, const StateArg &) const |
virtual GradientType | evaluateGradient (const ElemSideQpArg &, const StateArg &) const |
virtual GradientType | evaluateGradient (const ElemPointArg &, const StateArg &) const |
Evaluate the functor gradient with a given element and point. More... | |
virtual GradientType | evaluateGradient (const NodeArg &, const StateArg &) const |
virtual DotType | evaluateDot (const ElemArg &, const StateArg &) const |
Evaluate the functor time derivative with a given element. More... | |
virtual DotType | evaluateDot (const FaceArg &, const StateArg &) const |
virtual DotType | evaluateDot (const ElemQpArg &, const StateArg &) const |
virtual DotType | evaluateDot (const ElemSideQpArg &, const StateArg &) const |
virtual DotType | evaluateDot (const ElemPointArg &, const StateArg &) const |
Evaluate the functor time derivative with a given element and point. More... | |
virtual DotType | evaluateDot (const NodeArg &, const StateArg &) const |
virtual GradientType | evaluateGradDot (const ElemArg &, const StateArg &) const |
Evaluate the functor gradient-dot with a given element. More... | |
virtual GradientType | evaluateGradDot (const FaceArg &, const StateArg &) const |
virtual GradientType | evaluateGradDot (const ElemQpArg &, const StateArg &) const |
virtual GradientType | evaluateGradDot (const ElemSideQpArg &, const StateArg &) const |
virtual GradientType | evaluateGradDot (const ElemPointArg &, const StateArg &) const |
Evaluate the functor gradient-dot with a given element and point. More... | |
virtual GradientType | evaluateGradDot (const NodeArg &, const StateArg &) const |
Private Member Functions | |
template<typename SpatialArg > | |
Real | evaluateTemplate (const SpatialArg &position, const Moose::StateArg &state) const |
Base class for creating a user object with the SpatialUserObject and Moose::Functor APIs.
Definition at line 20 of file SpatialUserObjectFunctor.h.
|
inherited |
Definition at line 150 of file MooseFunctor.h.
|
protected |
Definition at line 29 of file SpatialUserObjectFunctor.h.
|
protected |
Definition at line 33 of file SpatialUserObjectFunctor.h.
|
protected |
Definition at line 30 of file SpatialUserObjectFunctor.h.
|
protected |
Definition at line 31 of file SpatialUserObjectFunctor.h.
|
protected |
Definition at line 32 of file SpatialUserObjectFunctor.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.
|
protected |
Definition at line 34 of file SpatialUserObjectFunctor.h.
|
inherited |
Definition at line 141 of file MooseFunctor.h.
SpatialUserObjectFunctor< UserObjectType >::SpatialUserObjectFunctor | ( | const InputParameters & | params | ) |
Definition at line 68 of file SpatialUserObjectFunctor.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.
|
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.
|
overrideprotectedvirtual |
Evaluate the functor with a given element.
Some example implementations of this method could compute an element-average or evaluate at the element centroid
Implements Moose::FunctorBase< Real >.
Definition at line 85 of file SpatialUserObjectFunctor.h.
|
finaloverrideprotectedvirtual |
face | See the FaceArg doxygen |
state | See the StateArg doxygen |
Implements Moose::FunctorBase< Real >.
Definition at line 93 of file SpatialUserObjectFunctor.h.
|
overrideprotectedvirtual |
qp | See the ElemQpArg doxygen |
state | See the StateArg doxygen |
Implements Moose::FunctorBase< Real >.
Definition at line 101 of file SpatialUserObjectFunctor.h.
|
finaloverrideprotectedvirtual |
side_qp | See the ElemSideQpArg doxygen |
state | See the StateArg doxygen |
Implements Moose::FunctorBase< Real >.
Definition at line 109 of file SpatialUserObjectFunctor.h.
|
finaloverrideprotectedvirtual |
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< Real >.
Definition at line 117 of file SpatialUserObjectFunctor.h.
|
finaloverrideprotectedvirtual |
Implements Moose::FunctorBase< Real >.
Definition at line 125 of file SpatialUserObjectFunctor.h.
|
inlineprotectedvirtualinherited |
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 in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 385 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
face | See the FaceArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 395 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
qp | See the ElemQpArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 405 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
side_qp | See the ElemSideQpArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 416 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
Evaluate the functor time derivative with a given element and point.
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 425 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 430 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
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 in Moose::FunctorEnvelope< Real >.
Definition at line 439 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
face | See the FaceArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >.
Definition at line 449 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
qp | See the ElemQpArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >.
Definition at line 459 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
side_qp | See the ElemSideQpArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >.
Definition at line 470 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
Evaluate the functor gradient-dot with a given element and point.
Reimplemented in Moose::FunctorEnvelope< Real >.
Definition at line 479 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
Reimplemented in Moose::FunctorEnvelope< Real >.
Definition at line 484 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
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 in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 332 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
face | See the FaceArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 342 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
qp | See the ElemQpArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 352 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
side_qp | See the ElemSideQpArg doxygen |
state | See the StateArg doxygen |
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 362 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
Evaluate the functor gradient with a given element and point.
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 371 of file MooseFunctor.h.
|
inlineprotectedvirtualinherited |
Reimplemented in Moose::FunctorEnvelope< Real >, Function, and Postprocessor.
Definition at line 376 of file MooseFunctor.h.
|
private |
Real SpatialUserObjectFunctor< UserObjectType >::evaluateTemplate | ( | const SpatialArg & | position, |
const Moose::StateArg & | libmesh_dbg_varstate | ||
) | const |
Definition at line 76 of file SpatialUserObjectFunctor.h.
|
inlineinherited |
Return the functor name.
Definition at line 170 of file MooseFunctor.h.
|
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.
|
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.
|
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.
|
overridevirtual |
Returns whether the functor is defined on this block.
Reimplemented from Moose::FunctorBase< Real >.
Reimplemented in MeshDivisionFunctorReductionVectorPostprocessor.
Definition at line 133 of file SpatialUserObjectFunctor.h.
|
overridevirtualinherited |
Implements FaceArgInterface.
Reimplemented in Moose::FunctorEnvelope< Real >, InternalSideIntegralVariablePostprocessor, InterfaceIntegralVariableValuePostprocessor, SideIntegralVariablePostprocessor, SideIntegralFunctorPostprocessorTempl< is_ad >, and SideIntegralFunctorPostprocessorTempl< false >.
Definition at line 976 of file MooseFunctor.h.
|
inlinevirtualinherited |
Returns true if this functor is a constant.
Reimplemented in Moose::FunctorEnvelope< Real >.
Definition at line 260 of file MooseFunctor.h.
|
inlinevirtualinherited |
Returns whether this (sided) face is an extrapolated boundary face for this functor.
Reimplemented in Moose::FunctorEnvelope< Real >.
Definition at line 247 of file MooseFunctor.h.
|
inherited |
Returns true if the face is an internal face.
Definition at line 569 of file MooseFunctor.h.
|
overridevirtualinherited |
Implements Moose::FunctorAbstract.
Reimplemented in 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 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.
|
inlinefinaloverrideprotectedvirtual |
Whether this functor supports evaluation with ElemSideQpArg.
Implements Moose::FunctorBase< Real >.
Definition at line 46 of file SpatialUserObjectFunctor.h.
|
inlinefinaloverrideprotectedvirtual |
Whether this functor supports evaluation with FaceArg.
Implements Moose::FunctorBase< Real >.
Definition at line 45 of file SpatialUserObjectFunctor.h.
|
overridevirtualinherited |
Implements Moose::FunctorAbstract.
Reimplemented in Function, NumNonlinearIterations, and MemoryUsage.
Definition at line 815 of file MooseFunctor.h.
|
static |
Definition at line 58 of file SpatialUserObjectFunctor.h.
Referenced by LineValueSampler::validParams(), LayeredIntegralBase< ElementIntegralVariableUserObject >::validParams(), MeshDivisionFunctorReductionVectorPostprocessor::validParams(), FunctionLayeredIntegral::validParams(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::validParams(), and PostprocessorSpatialUserObject::validParams().