22#include "libmesh/remote_elem.h"
23#include "libmesh/tensor_tools.h"
25#include "metaphysicl/ct_types.h"
27#include <unordered_map>
48template <
typename, FunctorEvaluationKind>
69 typedef typename MetaPhysicL::ReplaceAlgebraicType<
72 typename MetaPhysicL::ValueType<T>::type>::type>::type
type;
97template <FunctorEvaluationKind>
154 const std::set<ExecFlagType> & clearance_schedule = {
EXEC_ALWAYS})
160#ifdef MOOSE_KOKKOS_ENABLED
171 template <FunctorEvaluationKind FET,
typename Space,
typename State>
173 const State & state)
const;
370 mooseError(
"Element side quadrature point gradient not implemented for functor " +
413 mooseError(
"Element quadrature point time derivative not implemented for functor " +
424 mooseError(
"Element side quadrature point time derivative not implemented for functor " +
467 mooseError(
"Element quadrature point gradient-dot not implemented for functor " +
478 mooseError(
"Element side quadrature point gradient-dot not implemented for functor " +
505 template <
typename SpaceArg,
typename StateArg>
508 std::vector<std::pair<bool, T>> & qp_cache_data,
509 const SpaceArg & space,
515 template <
typename SpaceArg>
517 const SpaceArg & space)
const;
539 mutable std::unordered_map<dof_id_type, std::vector<std::pair<bool, ValueType>>>
_qp_to_value;
557 mutable std::unordered_map<dof_id_type, std::vector<std::vector<std::pair<bool, ValueType>>>>
580 return hasBlocks(fi.
elem().subdomain_id()) && hasBlocks(fi.
neighborPtr()->subdomain_id());
584template <
typename SpaceArg>
587 const SpaceArg & space)
const
590 auto [it, inserted] = cache_data.try_emplace(space,
ValueType());
591 auto & value = it->second;
605 if (_always_evaluate)
608 mooseAssert(state.
state == 0,
609 "Cached evaluations are only currently supported for the current state.");
611 return queryFVArgCache(_elem_arg_to_value, elem);
620 if (_always_evaluate)
623 mooseAssert(state.
state == 0,
624 "Cached evaluations are only currently supported for the current state.");
626 return queryFVArgCache(_face_arg_to_value, face_in);
630template <
typename SpaceArg,
typename StateArg>
634 std::vector<std::pair<bool, ValueType>> & qp_cache_data,
635 const SpaceArg & space,
640 if (qp >= qp_cache_data.size())
643 auto & pr = qp_cache_data[qp];
650 auto & pr = qp_cache_data[qp];
664 if (_always_evaluate)
667 const auto elem_id = elem_qp.
elem->
id();
668 if (elem_id != _current_qp_map_key)
670 _current_qp_map_key = elem_id;
671 _current_qp_map_value = &_qp_to_value[elem_id];
673 auto & qp_data = *_current_qp_map_value;
674 const auto qp = elem_qp.
qp;
675 const auto *
const qrule = elem_qp.
qrule;
676 mooseAssert(qrule,
"qrule must be non-null");
678 return queryQpCache(qp, *qrule, qp_data, elem_qp, state);
685 if (_always_evaluate)
686 return evaluate(elem_side_qp, state);
688 const Elem *
const elem = elem_side_qp.
elem;
689 mooseAssert(elem,
"elem must be non-null");
690 const auto elem_id = elem->id();
691 if (elem_id != _current_side_qp_map_key)
693 _current_side_qp_map_key = elem_id;
694 _current_side_qp_map_value = &_side_qp_to_value[elem_id];
696 auto & side_qp_data = *_current_side_qp_map_value;
697 const auto side = elem_side_qp.
side;
698 const auto qp = elem_side_qp.
qp;
699 const auto *
const qrule = elem_side_qp.
qrule;
700 mooseAssert(qrule,
"qrule must be non-null");
703 if (side >= side_qp_data.size())
704 side_qp_data.resize(elem->n_sides());
707 auto & qp_data = side_qp_data[side];
708 return queryQpCache(qp, *qrule, qp_data, elem_side_qp, state);
723 _always_evaluate =
true;
725 _clearance_schedule = clearance_schedule;
732 mooseAssert(node.
subdomain_ids,
"Subdomain IDs must be supplied to the node argument");
745 const Elem *
const elem = face.face_side;
746 const FaceInfo *
const fi = face.fi;
747 mooseAssert(fi,
"face info should be non-null");
748 bool check_elem_def =
false;
749 bool check_neighbor_def =
false;
753 if (!hasFaceSide(*fi,
true))
754 check_neighbor_def =
true;
755 else if (!hasFaceSide(*fi,
false))
756 check_elem_def =
true;
758 else if (elem == fi->
elemPtr())
759 check_elem_def =
true;
762 mooseAssert(elem == fi->
neighborPtr(),
"This has to match something");
763 check_neighbor_def =
true;
766 if (check_elem_def && !hasFaceSide(*fi,
true))
768 std::string additional_message =
"It is not defined on the neighbor side either.";
769 if (hasFaceSide(*fi,
false))
770 additional_message =
"It is however defined on the neighbor side.";
773 " is not defined on the element side of the face information, but a face argument "
775 "(e.g. residual object, postprocessor, etc.) has requested evaluation there.\n",
778 if (check_neighbor_def && !hasFaceSide(*fi,
false))
780 std::string additional_message =
"It is not defined on the element side either.";
781 if (hasFaceSide(*fi,
true))
782 additional_message =
"It is however defined on the element side.";
786 " is not defined on the neighbor side of the face information, but a face argument "
787 "producer (e.g. residual object, postprocessor, etc.) has requested evaluation there.\n",
797 for (
auto & map_pr : _qp_to_value)
798 for (
auto & pr : map_pr.second)
801 for (
auto & map_pr : _side_qp_to_value)
803 auto & side_vector = map_pr.second;
804 for (
auto & qp_vector : side_vector)
805 for (
auto & pr : qp_vector)
810 _current_qp_map_value =
nullptr;
812 _current_side_qp_map_value =
nullptr;
814 _elem_arg_to_value.clear();
815 _face_arg_to_value.clear();
816 _node_arg_to_value.clear();
847 if (_clearance_schedule.count(exec_type))
855 return evaluateGradient(elem, state);
863 return evaluateGradient(face, state);
870 return evaluateGradient(elem_qp, state);
877 return evaluateGradient(elem_side_qp, state);
884 return evaluateGradient(elem_point, state);
891 return evaluateGradient(node, state);
898 return evaluateDot(elem, state);
906 return evaluateDot(face, state);
913 return evaluateDot(elem_qp, state);
920 return evaluateDot(elem_side_qp, state);
927 return evaluateDot(elem_point, state);
934 return evaluateDot(node, state);
941 return evaluateGradDot(elem, state);
949 return evaluateGradDot(face, state);
956 return evaluateGradDot(elem_qp, state);
963 return evaluateGradDot(elem_side_qp, state);
970 return evaluateGradDot(elem_point, state);
977 return evaluateGradDot(node, state);
985 return hasBlocks(fi.
elem().subdomain_id());
991template <FunctorEvaluationKind FET,
typename Space,
typename State>
996 return (*
this)(r, state);
998 return gradient(r, state);
1000 return dot(r, state);
1002 return gradDot(r, state);
1045template <
typename T>
1096 _owned = std::move(wrapped);
1116 virtual bool wrapsNull()
const override {
return wrapsType<NullFunctor<T>>(); }
1128 template <
typename T2>
1131 return dynamic_cast<const T2 *
>(
_wrapped);
1135 const Elem *
const elem,
1136 const StateArg & state)
const override
1138 return _wrapped->isExtrapolatedBoundaryFace(fi, elem, state);
1144 return _wrapped->hasFaceSide(fi, fi_elem_side);
1157 return _wrapped->operator()(elem, state);
1161 return _wrapped->operator()(face, state);
1165 return _wrapped->operator()(qp, state);
1169 return _wrapped->operator()(qp, state);
1173 return _wrapped->operator()(elem_point, state);
1177 return _wrapped->operator()(node, state);
1182 return _wrapped->gradient(elem, state);
1186 return _wrapped->gradient(face, state);
1190 return _wrapped->gradient(qp, state);
1193 const StateArg & state)
const override
1195 return _wrapped->gradient(qp, state);
1198 const StateArg & state)
const override
1200 return _wrapped->gradient(elem_point, state);
1204 return _wrapped->gradient(node, state);
1224 const StateArg & state)
const override
1226 return _wrapped->dot(elem_point, state);
1235 return _wrapped->gradDot(elem, state);
1239 return _wrapped->gradDot(face, state);
1243 return _wrapped->gradDot(qp, state);
1246 const StateArg & state)
const override
1248 return _wrapped->gradDot(qp, state);
1251 const StateArg & state)
const override
1253 return _wrapped->gradDot(elem_point, state);
1257 return _wrapped->gradDot(node, state);
1266 friend class ::SubProblem;
1272template <
typename T>
1337template <
typename T>
1357 mooseError(
"We should never get here. If you have, contact a MOOSE developer and tell them "
1358 "they've written broken code");
1362 mooseError(
"We should never get here. If you have, contact a MOOSE developer and tell them "
1363 "they've written broken code");
1367 mooseError(
"We should never get here. If you have, contact a MOOSE developer and tell them "
1368 "they've written broken code");
1372 mooseError(
"We should never get here. If you have, contact a MOOSE developer and tell them "
1373 "they've written broken code");
1377 mooseError(
"We should never get here. If you have, contact a MOOSE developer and tell them "
1378 "they've written broken code");
1382 mooseError(
"We should never get here. If you have, contact a MOOSE developer and tell them "
1383 "they've written broken code");
1387template <
typename T>
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
T evaluate(Real, const Point &)
The general evaluation method is not defined.
const ExecFlagType EXEC_TIMESTEP_BEGIN
const ExecFlagType EXEC_ALWAYS
const ExecFlagType EXEC_LINEAR
const ExecFlagType EXEC_NONLINEAR
A base class interface for both producers and consumers of functor face arguments,...
This data structure is used to store geometric and variable related metadata about each cell face in ...
const Elem & elem() const
const Elem * neighborPtr() const
const Elem * elemPtr() const
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
const Elem & neighbor() const
Class for containing MooseEnum item information.
Class template for creating constant functors.
ValueType evaluate(const NodeArg &, const StateArg &) const override
GradientType evaluateGradDot(const ElemSideQpArg &, const StateArg &) const override
ConstantFunctor(ValueType &&value)
ConstantFunctor(const ValueType &value)
virtual bool isConstant() const override
Returns true if this functor is a constant.
bool supportsElemSideQpArg() const override final
Whether this functor supports evaluation with ElemSideQpArg.
GradientType evaluateGradient(const ElemPointArg &, const StateArg &) const override
Evaluate the functor gradient with a given element and point.
ValueType evaluate(const ElemQpArg &, const StateArg &) const override
DotType evaluateDot(const NodeArg &, const StateArg &) const override
GradientType evaluateGradient(const NodeArg &, const StateArg &) const override
GradientType evaluateGradDot(const NodeArg &, const StateArg &) const override
ValueType evaluate(const ElemArg &, const StateArg &) const override
Evaluate the functor with a given element.
GradientType evaluateGradient(const ElemSideQpArg &, const StateArg &) const override
GradientType evaluateGradient(const ElemQpArg &, const StateArg &) const override
DotType evaluateDot(const ElemPointArg &, const StateArg &) const override
Evaluate the functor time derivative with a given element and point.
DotType evaluateDot(const ElemQpArg &, const StateArg &) const override
DotType evaluateDot(const FaceArg &, const StateArg &) const override
DotType evaluateDot(const ElemArg &, const StateArg &) const override
Evaluate the functor time derivative with a given element.
GradientType evaluateGradDot(const ElemQpArg &, const StateArg &) const override
ValueType evaluate(const ElemPointArg &, const StateArg &) const override
Evaluate the functor with a given element and point.
GradientType evaluateGradDot(const ElemPointArg &, const StateArg &) const override
Evaluate the functor gradient-dot with a given element and point.
GradientType evaluateGradDot(const ElemArg &, const StateArg &) const override
Evaluate the functor gradient-dot with a given element.
bool supportsFaceArg() const override final
Whether this functor supports evaluation with FaceArg.
DotType evaluateDot(const ElemSideQpArg &, const StateArg &) const override
GradientType evaluateGradDot(const FaceArg &, const StateArg &) const override
GradientType evaluateGradient(const FaceArg &, const StateArg &) const override
GradientType evaluateGradient(const ElemArg &, const StateArg &) const override
Evaluate the functor gradient with a given element.
bool hasBlocks(SubdomainID) const override
Returns whether the functor is defined on this block.
ValueType evaluate(const ElemSideQpArg &, const StateArg &) const override
ValueType evaluate(const FaceArg &, const StateArg &) const override
Abstract base class that can be used to hold collections of functors.
virtual void residualSetup()=0
virtual void timestepSetup()=0
virtual void jacobianSetup()=0
virtual void customSetup(const ExecFlagType &exec_type)=0
Base class template for functor objects.
virtual DotType evaluateDot(const FaceArg &, const StateArg &) const
DotType dot(const ElemQpArg &qp, 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.
GradientType gradient(const NodeArg &node, const StateArg &state) const
GradientType gradient(const FaceArg &face, const StateArg &state) const
DotType dot(const NodeArg &node, const StateArg &state) const
virtual GradientType evaluateGradDot(const NodeArg &, const StateArg &) const
GradientType gradDot(const NodeArg &node, const StateArg &state) const
virtual bool isExtrapolatedBoundaryFace(const FaceInfo &, const Elem *, const StateArg &) const
Returns whether this (sided) face is an extrapolated boundary face for this functor.
GradientType gradient(const ElemSideQpArg &qp, const StateArg &state) const
virtual GradientType evaluateGradDot(const ElemQpArg &, const StateArg &) const
ValueType operator()(const ElemArg &elem, const StateArg &state) const
Same as their evaluate overloads with the same arguments but allows for caching implementation.
virtual GradientType evaluateGradient(const ElemPointArg &, const StateArg &) const
Evaluate the functor gradient with a given element and point.
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 tem...
void setCacheClearanceSchedule(const std::set< ExecFlagType > &clearance_schedule)
Set how often to clear the functor evaluation cache.
virtual GradientType evaluateGradDot(const ElemSideQpArg &, const StateArg &) const
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
bool _always_evaluate
Boolean to check if we always need evaluation.
ValueType operator()(const NodeArg &node, const StateArg &state) const
void clearCacheData()
clear cache data
GradientType gradient(const ElemPointArg &elem_point, const StateArg &state) const
void checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
typename FunctorReturnType< T, FunctorEvaluationKind::Gradient >::type GradientType
This rigmarole makes it so that a user can create functors that return containers (std::vector,...
dof_id_type _current_qp_map_key
Current key for qp map cache.
virtual bool supportsFaceArg() const =0
Whether this functor supports evaluation with FaceArg.
virtual DotType evaluateDot(const ElemSideQpArg &, const StateArg &) const
virtual GradientType evaluateGradDot(const ElemPointArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element and point.
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const =0
Evaluate the functor with a given element.
ValueType operator()(const ElemSideQpArg &qp, const StateArg &state) const
const MooseFunctorName & functorName() const
Return the functor name.
virtual GradientType evaluateGradient(const ElemQpArg &, const StateArg &) const
virtual bool hasBlocks(SubdomainID) const
Returns whether the functor is defined on this block.
GradientType gradDot(const FaceArg &face, const StateArg &state) const
DotType dot(const FaceArg &face, const StateArg &state) const
std::map< ElemArg, ValueType > _elem_arg_to_value
Map from element arguments to their cached evaluations.
ValueType queryQpCache(unsigned int qp, const libMesh::QBase &qrule, std::vector< std::pair< bool, T > > &qp_cache_data, const SpaceArg &space, const StateArg &state) const
check a qp cache and if invalid then evaluate
virtual void residualSetup() override
virtual bool supportsElemSideQpArg() const =0
Whether this functor supports evaluation with ElemSideQpArg.
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
virtual ValueType evaluate(const NodeArg &node, const StateArg &state) const =0
std::unordered_map< dof_id_type, std::vector< std::pair< bool, ValueType > > > _qp_to_value
Cached element quadrature point functor property evaluations.
GradientType gradDot(const ElemSideQpArg &qp, const StateArg &state) const
virtual GradientType evaluateGradient(const NodeArg &, const StateArg &) const
bool isInternalFace(const FaceInfo &) const
Returns true if the face is an internal face.
virtual DotType evaluateDot(const ElemPointArg &, const StateArg &) const
Evaluate the functor time derivative with a given element and point.
virtual GradientType evaluateGradient(const ElemSideQpArg &, const StateArg &) const
GradientType gradDot(const ElemQpArg &qp, const StateArg &state) const
ValueType operator()(const ElemQpArg &qp, 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 implementatio...
std::map< FaceArg, ValueType > _face_arg_to_value
Map from face arguments to their cached evaluations.
ValueType queryFVArgCache(std::map< SpaceArg, ValueType > &cache_data, const SpaceArg &space) const
check a finite volume spatial argument cache and if invalid then evaluate
virtual ValueType evaluate(const FaceArg &face, const StateArg &state) const =0
DotType dot(const ElemPointArg &elem_point, const StateArg &state) const
virtual void timestepSetup() override
virtual DotType evaluateDot(const NodeArg &, const StateArg &) const
ValueType operator()(const FaceArg &face, const StateArg &state) const
virtual GradientType evaluateGradDot(const FaceArg &, const StateArg &) const
virtual DotType evaluateDot(const ElemQpArg &, const StateArg &) const
FunctorBase(const FunctorBase< T > &, const Moose::Kokkos::FunctorCopy &)
Special constructor used for Kokkos functor copy during parallel dispatch.
GradientType gradient(const ElemQpArg &qp, const StateArg &state) const
virtual ValueType evaluate(const ElemQpArg &qp, const StateArg &state) const =0
std::vector< std::vector< std::pair< bool, ValueType > > > * _current_side_qp_map_value
Current value for side-qp map cache.
GradientType gradDot(const ElemArg &elem, const StateArg &state) const
Same as their evaluateGradDot overloads with the same arguments but allows for caching implementation...
std::map< NodeArg, ValueType > _node_arg_to_value
Map from nodal arguments to their cached evaluations.
virtual bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const override
std::vector< std::pair< bool, ValueType > > * _current_qp_map_value
Current value for qp map cache.
virtual void customSetup(const ExecFlagType &exec_type) override
DotType dot(const ElemSideQpArg &qp, const StateArg &state) const
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
FunctorBase(const MooseFunctorName &name, const std::set< ExecFlagType > &clearance_schedule={EXEC_ALWAYS})
MooseFunctorName _functor_name
name of the functor
virtual ValueType evaluate(const ElemPointArg &elem_point, const StateArg &state) const =0
Evaluate the functor with a given element and point.
dof_id_type _current_side_qp_map_key
Current key for side-qp map cache.
virtual ~FunctorBase()=default
ValueType operator()(const ElemPointArg &elem_point, const StateArg &state) const
virtual void jacobianSetup() override
GradientType gradDot(const ElemPointArg &elem_point, const StateArg &state) const
std::unordered_map< dof_id_type, std::vector< std::vector< std::pair< bool, ValueType > > > > _side_qp_to_value
Cached element quadrature point functor property evaluations.
virtual ValueType evaluate(const ElemSideQpArg &side_qp, const StateArg &state) const =0
virtual GradientType evaluateGradient(const FaceArg &, const StateArg &) const
virtual bool isConstant() const
Returns true if this functor is a constant.
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
A non-templated base class for functors that allow an owner object to hold different class template i...
virtual bool ownsWrappedFunctor() const =0
virtual ~FunctorEnvelopeBase()=default
virtual bool wrapsNull() const =0
virtual std::string returnType() const =0
FunctorEnvelopeBase()=default
virtual bool isConstant() const =0
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
virtual DotType evaluateDot(const FaceArg &face, const StateArg &state) const override
virtual ValueType evaluate(const FaceArg &face, const StateArg &state) const override
virtual bool wrapsNull() const override
virtual GradientType evaluateGradDot(const ElemSideQpArg &qp, const StateArg &state) const override
virtual bool isExtrapolatedBoundaryFace(const FaceInfo &fi, const Elem *const elem, const StateArg &state) const override
Returns whether this (sided) face is an extrapolated boundary face for this functor.
bool supportsElemSideQpArg() const override final
Whether this functor supports evaluation with ElemSideQpArg.
virtual ValueType evaluate(const ElemQpArg &qp, const StateArg &state) const override
virtual ValueType evaluate(const ElemPointArg &elem_point, const StateArg &state) const override
Evaluate the functor with a given element and point.
virtual GradientType evaluateGradDot(const ElemArg &elem, const StateArg &state) const override
Evaluate the functor gradient-dot with a given element.
virtual DotType evaluateDot(const ElemQpArg &qp, const StateArg &state) const override
virtual GradientType evaluateGradDot(const NodeArg &node, const StateArg &state) const override
virtual ~FunctorEnvelope()=default
virtual GradientType evaluateGradient(const ElemSideQpArg &qp, const StateArg &state) const override
void assign(const FunctorBase< T > &wrapped)
virtual bool isConstant() const override
Returns true if this functor is a constant.
FunctorEnvelope(FunctorEnvelope &&)=delete
virtual DotType evaluateDot(const ElemPointArg &elem_point, const StateArg &state) const override
Evaluate the functor time derivative with a given element and point.
virtual ValueType evaluate(const ElemSideQpArg &qp, const StateArg &state) const override
virtual GradientType evaluateGradDot(const ElemQpArg &qp, const StateArg &state) const override
const FunctorBase< T > * _wrapped
virtual bool ownsWrappedFunctor() const override
void assign(std::unique_ptr< FunctorBase< T > > &&wrapped)
virtual GradientType evaluateGradient(const NodeArg &node, const StateArg &state) const override
void assign(FunctorBase< T > &&)=delete
Prevent wrapping of a temporary object.
virtual GradientType evaluateGradDot(const ElemPointArg &elem_point, const StateArg &state) const override
Evaluate the functor gradient-dot with a given element and point.
virtual DotType evaluateDot(const NodeArg &node, const StateArg &state) const override
virtual ValueType evaluate(const NodeArg &node, const StateArg &state) const override
virtual bool hasBlocks(const SubdomainID id) const override
Returns whether the functor is defined on this block.
virtual GradientType evaluateGradient(const ElemQpArg &qp, const StateArg &state) const override
FunctorEnvelope(const FunctorEnvelope &)=delete
virtual DotType evaluateDot(const ElemArg &elem, const StateArg &state) const override
Evaluate the functor time derivative with a given element.
std::unique_ptr< FunctorBase< T > > _owned
Our wrapped object.
virtual GradientType evaluateGradDot(const FaceArg &face, const StateArg &state) const override
virtual GradientType evaluateGradient(const ElemArg &elem, const StateArg &state) const override
Evaluate the functor gradient with a given element.
FunctorEnvelope & operator=(FunctorEnvelope &&)=delete
FunctorEnvelope(FunctorBase< T > &&)=delete
Prevent wrapping of a temporary object.
virtual std::string returnType() const override
FunctorEnvelope(const FunctorBase< T > &wrapped)
FunctorEnvelope(std::unique_ptr< FunctorBase< T > > &&wrapped)
virtual bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const override
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const override
Forward calls to wrapped object.
FunctorEnvelope & operator=(const FunctorEnvelope &)=delete
virtual GradientType evaluateGradient(const FaceArg &face, const StateArg &state) const override
bool supportsFaceArg() const override final
Whether this functor supports evaluation with FaceArg.
virtual DotType evaluateDot(const ElemSideQpArg &qp, const StateArg &state) const override
virtual GradientType evaluateGradient(const ElemPointArg &elem_point, const StateArg &state) const override
Evaluate the functor gradient with a given element and point.
A functor that serves as a placeholder during the simulation setup phase if a functor consumer reques...
ValueType evaluate(const FaceArg &, const StateArg &) const override
bool supportsElemSideQpArg() const override final
Whether this functor supports evaluation with ElemSideQpArg.
ValueType evaluate(const ElemQpArg &, const StateArg &) const override
bool supportsFaceArg() const override final
Whether this functor supports evaluation with FaceArg.
ValueType evaluate(const ElemSideQpArg &, const StateArg &) const override
ValueType evaluate(const ElemPointArg &, const StateArg &) const override
Evaluate the functor with a given element and point.
ValueType evaluate(const NodeArg &, const StateArg &) const override
bool hasFaceSide(const FaceInfo &fi, bool) const override
ValueType evaluate(const ElemArg &, const StateArg &) const override
Evaluate the functor with a given element.
static constexpr dof_id_type invalid_id
unsigned int n_points() const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
std::string stringify(const T &t)
conversion to string
FunctorEvaluationKind
An enumeration of possible functor evaluation kinds.
std::string demangle(const char *name)
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.
const libMesh::Elem * elem
The element.
const libMesh::QBase * qrule
The quadrature rule.
unsigned int qp
The quadrature point index.
Argument for requesting functor evaluation at quadrature point locations on an element side.
const libMesh::Elem * elem
The element.
unsigned int qp
The quadrature point index.
unsigned int side
The local side index.
const libMesh::QBase * qrule
The quadrature rule.
A structure defining a "face" evaluation calling argument for Moose functors.
This structure takes an evaluation kind as a template argument and defines a constant expression indi...
FunctorReturnType< T, FunctorEvaluationKind::Gradient >::type type
MetaPhysicL::ReplaceAlgebraicType< T, typenamelibMesh::TensorTools::IncrementRank< typenameMetaPhysicL::ValueType< T >::type >::type >::type type
A structure that defines the return type of a functor based on the type of the functor and the reques...
const std::set< SubdomainID > * subdomain_ids
Indicates what subdomains this argument should be associated with.
State argument for evaluating functors.
unsigned int state
The state.