19template <
typename UserObjectType>
52 template <
typename SpatialArg>
56template <
typename UserObjectType>
60 auto params = UserObjectType::validParams();
62 ExecFlagEnum & exec_enum = params.template set<ExecFlagEnum>(
"execute_on",
true);
67template <
typename UserObjectType>
69 : UserObjectType(params),
Moose::FunctorBase<Real>(this->name())
73template <
typename UserObjectType>
74template <
typename SpatialArg>
77 const SpatialArg & position,
const Moose::StateArg & libmesh_dbg_var(state))
const
79 mooseAssert(state.state == 0,
"We do not currently support evaluating at old states");
80 return this->spatialValue(position.getPoint());
83template <
typename UserObjectType>
88 return evaluateTemplate(elem, state);
91template <
typename UserObjectType>
96 return evaluateTemplate(face, state);
99template <
typename UserObjectType>
104 return evaluateTemplate(qp, state);
107template <
typename UserObjectType>
112 return evaluateTemplate(elem_side_qp, state);
115template <
typename UserObjectType>
120 return evaluateTemplate(elem_point, state);
123template <
typename UserObjectType>
128 return evaluateTemplate(node, state);
131template <
typename UserObjectType>
135 if constexpr (std::is_base_of<BlockRestrictable, UserObjectType>::value)
136 return UserObjectType::hasBlocks(sub_id);
const ExecFlagType EXEC_TRANSFER
A MultiMooseEnum object to hold "execute_on" flags.
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
Add additional execute_on flags to the list of possible flags.
Base class template for functor objects.
virtual bool hasBlocks(SubdomainID) const
Returns whether the functor is defined on this block.
Base class for creating a user object with the SpatialUserObject and Moose::Functor APIs.
virtual Real evaluate(const ElemQpArg &qp, const Moose::StateArg &state) const override
virtual bool hasBlocks(SubdomainID sub) const override
Returns whether the functor is defined on this block.
SpatialUserObjectFunctor(const InputParameters ¶ms)
static InputParameters validParams()
virtual Real evaluate(const ElemArg &elem, const Moose::StateArg &state) const override
Evaluate the functor with a given element.
virtual Real evaluate(const FaceArg &face, const Moose::StateArg &state) const override final
virtual bool supportsElemSideQpArg() const override final
Whether this functor supports evaluation with ElemSideQpArg.
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.
virtual Real evaluate(const ElemPointArg &elem_point, const Moose::StateArg &state) const override final
Evaluate the functor with a given element and point.
virtual Real evaluate(const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final
Real evaluateTemplate(const SpatialArg &position, const Moose::StateArg &state) const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
A structure that is used to evaluate Moose functors logically at an element/cell center.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
Argument for requesting functor evaluation at a quadrature point location in an element.
Argument for requesting functor evaluation at quadrature point locations on an element side.
A structure defining a "face" evaluation calling argument for Moose functors.
State argument for evaluating functors.