https://mooseframework.inl.gov
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Moose::VectorCompositeFunctor< T > Class Template Reference

A functor that returns a vector composed of its component functor evaluations. More...

#include <VectorCompositeFunctor.h>

Inheritance diagram for Moose::VectorCompositeFunctor< T >:
[legend]

Public Types

template<typename U >
using FunctorBase = FunctorBase< U >
 
using FunctorType = FunctorBase< VectorValue< T > >
 
using ValueType = VectorValue< T >
 
using GradientType = typename FunctorReturnType< VectorValue< 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

 VectorCompositeFunctor (const MooseFunctorName &name, const FunctorBase< T > &x_comp, const FunctorBase< T > &y_comp, const FunctorBase< T > &z_comp)
 From xyz component constructor. More...
 
 VectorCompositeFunctor (const MooseFunctorName &name, const FunctorBase< T > &x_comp, const FunctorBase< T > &y_comp)
 From xy component constructor. More...
 
 VectorCompositeFunctor (const MooseFunctorName &name, const FunctorBase< T > &x_comp)
 From x component constructor. More...
 
virtual bool hasBlocks (SubdomainID sub_id) const override
 Returns whether the functor is defined on this block. More...
 
bool supportsFaceArg () const override
 Whether this functor supports evaluation with FaceArg. More...
 
bool supportsElemSideQpArg () const override
 Whether this functor supports evaluation with ElemSideQpArg. More...
 
FunctorReturnType< VectorValue< 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...
 
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
 

Protected Member Functions

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 StateArg doxygen

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 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

ValueType evaluate (const ElemArg &elem_arg, const StateArg &state) const override
 Evaluate the functor with a given element. More...
 
ValueType evaluate (const FaceArg &face, const StateArg &state) const override
 
ValueType evaluate (const ElemQpArg &elem_qp, const StateArg &state) const override
 
ValueType evaluate (const ElemSideQpArg &elem_side_qp, const StateArg &state) const override
 
ValueType evaluate (const ElemPointArg &elem_point_arg, const StateArg &state) const override
 Evaluate the functor with a given element and point. More...
 
ValueType evaluate (const NodeArg &node_arg, const StateArg &state) const override
 
GradientType evaluateGradient (const ElemArg &elem_arg, const StateArg &state) const override
 Evaluate the functor gradient with a given element. More...
 
DotType evaluateDot (const FaceArg &face_arg, const StateArg &state) const override
 
DotType evaluateDot (const ElemArg &elem_arg, const StateArg &state) const override
 Evaluate the functor time derivative with a given element. More...
 

Private Attributes

std::unique_ptr< ConstantFunctor< T > > _y_constant
 Possible holder of constant-0 y-component functor. More...
 
std::unique_ptr< ConstantFunctor< T > > _z_constant
 Possible holder of constant-0 z-component functor. More...
 
const FunctorBase< T > & _x_comp
 The x-component functor. More...
 
const FunctorBase< T > & _y_comp
 The y-component functor. More...
 
const FunctorBase< T > & _z_comp
 The z-component functor. More...
 
const bool _has_y
 Whether the user supplied a y-functor. More...
 
const bool _has_z
 Whether the user supplied a z-functor. More...
 

Detailed Description

template<typename T>
class Moose::VectorCompositeFunctor< T >

A functor that returns a vector composed of its component functor evaluations.

Definition at line 23 of file VectorCompositeFunctor.h.

Member Typedef Documentation

◆ DotType

using Moose::FunctorBase< VectorValue< T > >::DotType = ValueType
inherited

Definition at line 150 of file MooseFunctor.h.

◆ FunctorBase

template<typename T >
template<typename U >
using Moose::VectorCompositeFunctor< T >::FunctorBase = FunctorBase<U>

Definition at line 27 of file VectorCompositeFunctor.h.

◆ FunctorType

using Moose::FunctorBase< VectorValue< T > >::FunctorType = FunctorBase<VectorValue< T > >
inherited

Definition at line 140 of file MooseFunctor.h.

◆ GradientType

using Moose::FunctorBase< VectorValue< T > >::GradientType = typename FunctorReturnType<VectorValue< T > , FunctorEvaluationKind::Gradient>::type
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.

◆ ValueType

using Moose::FunctorBase< VectorValue< T > >::ValueType = VectorValue< T >
inherited

Definition at line 141 of file MooseFunctor.h.

Constructor & Destructor Documentation

◆ VectorCompositeFunctor() [1/3]

template<typename T >
Moose::VectorCompositeFunctor< T >::VectorCompositeFunctor ( const MooseFunctorName &  name,
const FunctorBase< T > &  x_comp,
const FunctorBase< T > &  y_comp,
const FunctorBase< T > &  z_comp 
)

From xyz component constructor.

Definition at line 104 of file VectorCompositeFunctor.h.

108  : FunctorBase<VectorValue<T>>(name),
109  _x_comp(x_comp),
110  _y_comp(y_comp),
111  _z_comp(z_comp),
112  _has_y(true),
113  _has_z(true)
114 {
115 }
std::string name(const ElemQuality q)
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const bool _has_y
Whether the user supplied a y-functor.
const bool _has_z
Whether the user supplied a z-functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ VectorCompositeFunctor() [2/3]

template<typename T >
Moose::VectorCompositeFunctor< T >::VectorCompositeFunctor ( const MooseFunctorName &  name,
const FunctorBase< T > &  x_comp,
const FunctorBase< T > &  y_comp 
)

From xy component constructor.

Definition at line 118 of file VectorCompositeFunctor.h.

121  : FunctorBase<VectorValue<T>>(name),
122  _z_constant(std::make_unique<ConstantFunctor>(T(0))),
123  _x_comp(x_comp),
124  _y_comp(y_comp),
126  _has_y(true),
127  _has_z(false)
128 {
129 }
std::string name(const ElemQuality q)
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const bool _has_y
Whether the user supplied a y-functor.
std::unique_ptr< ConstantFunctor< T > > _z_constant
Possible holder of constant-0 z-component functor.
const bool _has_z
Whether the user supplied a z-functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ VectorCompositeFunctor() [3/3]

template<typename T >
Moose::VectorCompositeFunctor< T >::VectorCompositeFunctor ( const MooseFunctorName &  name,
const FunctorBase< T > &  x_comp 
)

From x component constructor.

Definition at line 132 of file VectorCompositeFunctor.h.

134  : FunctorBase<VectorValue<T>>(name),
135  _y_constant(std::make_unique<ConstantFunctor>(T(0))),
136  _z_constant(std::make_unique<ConstantFunctor>(T(0))),
137  _x_comp(x_comp),
140  _has_y(false),
141  _has_z(false)
142 {
143 }
std::string name(const ElemQuality q)
std::unique_ptr< ConstantFunctor< T > > _y_constant
Possible holder of constant-0 y-component functor.
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const bool _has_y
Whether the user supplied a y-functor.
std::unique_ptr< ConstantFunctor< T > > _z_constant
Possible holder of constant-0 z-component functor.
const bool _has_z
Whether the user supplied a z-functor.
const FunctorBase< T > & _x_comp
The x-component functor.

Member Function Documentation

◆ checkFace()

void Moose::FunctorBase< VectorValue< T > >::checkFace ( const Moose::FaceArg face) const
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

Parameters
faceThe face argument created by the face argument producer, likely a residual object
Returns
A face with possibly changed sidedness depending on whether we aren't defined on both sides of the face

Definition at line 738 of file MooseFunctor.h.

743 {
744 #if DEBUG
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;
750  // We check if the functor is defined on both sides of the face
751  if (!elem)
752  {
753  if (!hasFaceSide(*fi, true))
754  check_neighbor_def = true;
755  else if (!hasFaceSide(*fi, false))
756  check_elem_def = true;
757  }
758  else if (elem == fi->elemPtr())
759  check_elem_def = true;
760  else
761  {
762  mooseAssert(elem == fi->neighborPtr(), "This has to match something");
763  check_neighbor_def = true;
764  }
765 
766  if (check_elem_def && !hasFaceSide(*fi, true))
767  {
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.";
771  additional_message += " Face centroid: " + Moose::stringify(fi->faceCentroid());
773  " is not defined on the element side of the face information, but a face argument "
774  "producer "
775  "(e.g. residual object, postprocessor, etc.) has requested evaluation there.\n",
776  additional_message);
777  }
778  if (check_neighbor_def && !hasFaceSide(*fi, false))
779  {
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.";
783  additional_message += " Face centroid: " + Moose::stringify(fi->faceCentroid());
784  mooseError(
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",
788  additional_message);
789  }
790 #endif
791 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const libMesh::Elem * face_side
A member that can be used to indicate whether there is a sidedness to this face.
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
Definition: FaceInfo.h:75
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:37
const Elem * neighborPtr() const
Definition: FaceInfo.h:88
MooseFunctorName _functor_name
name of the functor
Definition: MooseFunctor.h:570
const FaceInfo * fi
a face information object which defines our location in space
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
const Elem * elemPtr() const
Definition: FaceInfo.h:86
virtual bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const override
Definition: MooseFunctor.h:982

◆ customSetup()

void Moose::FunctorBase< VectorValue< T > >::customSetup ( const ExecFlagType exec_type)
overridevirtualinherited

Implements Moose::FunctorAbstract.

Definition at line 845 of file MooseFunctor.h.

846 {
847  if (_clearance_schedule.count(exec_type))
848  clearCacheData();
849 }
void clearCacheData()
clear cache data
Definition: MooseFunctor.h:795
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:520

◆ dot() [1/6]

FunctorBase< VectorValue< T > >::DotType Moose::FunctorBase< VectorValue< T > >::dot ( const ElemArg elem,
const StateArg state 
) const
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 896 of file MooseFunctor.h.

897 {
898  return evaluateDot(elem, state);
899 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:391

◆ dot() [2/6]

FunctorBase< VectorValue< T > >::DotType Moose::FunctorBase< VectorValue< T > >::dot ( const FaceArg face,
const StateArg state 
) const
inherited

Definition at line 903 of file MooseFunctor.h.

904 {
905  checkFace(face);
906  return evaluateDot(face, state);
907 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:391
void checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
Definition: MooseFunctor.h:738

◆ dot() [3/6]

FunctorBase< VectorValue< T > >::DotType Moose::FunctorBase< VectorValue< T > >::dot ( const ElemQpArg qp,
const StateArg state 
) const
inherited

Definition at line 911 of file MooseFunctor.h.

912 {
913  return evaluateDot(elem_qp, state);
914 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:391

◆ dot() [4/6]

FunctorBase< VectorValue< T > >::DotType Moose::FunctorBase< VectorValue< T > >::dot ( const ElemSideQpArg qp,
const StateArg state 
) const
inherited

Definition at line 918 of file MooseFunctor.h.

919 {
920  return evaluateDot(elem_side_qp, state);
921 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:391

◆ dot() [5/6]

FunctorBase< VectorValue< T > >::DotType Moose::FunctorBase< VectorValue< T > >::dot ( const ElemPointArg elem_point,
const StateArg state 
) const
inherited

Definition at line 925 of file MooseFunctor.h.

926 {
927  return evaluateDot(elem_point, state);
928 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:391

◆ dot() [6/6]

FunctorBase< VectorValue< T > >::DotType Moose::FunctorBase< VectorValue< T > >::dot ( const NodeArg node,
const StateArg state 
) const
inherited

Definition at line 932 of file MooseFunctor.h.

933 {
934  return evaluateDot(node, state);
935 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:391

◆ evaluate() [1/6]

template<typename T >
VectorCompositeFunctor< T >::ValueType Moose::VectorCompositeFunctor< T >::evaluate ( const ElemArg elem,
const StateArg state 
) const
overrideprivatevirtual

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< VectorValue< T > >.

Definition at line 173 of file VectorCompositeFunctor.h.

174 {
175  return {_x_comp(elem_arg, state), _y_comp(elem_arg, state), _z_comp(elem_arg, state)};
176 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluate() [2/6]

template<typename T >
VectorCompositeFunctor< T >::ValueType Moose::VectorCompositeFunctor< T >::evaluate ( const FaceArg face,
const StateArg state 
) const
overrideprivatevirtual
Parameters
faceSee the FaceArg doxygen
stateSee the StateArg doxygen
Returns
The functor evaluated at the requested state and space

Implements Moose::FunctorBase< VectorValue< T > >.

Definition at line 180 of file VectorCompositeFunctor.h.

181 {
182  return {_x_comp(face, state), _y_comp(face, state), _z_comp(face, state)};
183 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluate() [3/6]

template<typename T >
VectorCompositeFunctor< T >::ValueType Moose::VectorCompositeFunctor< T >::evaluate ( const ElemQpArg qp,
const StateArg state 
) const
overrideprivatevirtual
Parameters
qpSee the ElemQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor evaluated at the requested state and space

Implements Moose::FunctorBase< VectorValue< T > >.

Definition at line 187 of file VectorCompositeFunctor.h.

188 {
189  return {_x_comp(elem_qp, state), _y_comp(elem_qp, state), _z_comp(elem_qp, state)};
190 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluate() [4/6]

template<typename T >
VectorCompositeFunctor< T >::ValueType Moose::VectorCompositeFunctor< T >::evaluate ( const ElemSideQpArg side_qp,
const StateArg state 
) const
overrideprivatevirtual
Parameters
side_qpSee the ElemSideQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor evaluated at the requested state and space

Implements Moose::FunctorBase< VectorValue< T > >.

Definition at line 194 of file VectorCompositeFunctor.h.

196 {
197  return {_x_comp(elem_side_qp, state), _y_comp(elem_side_qp, state), _z_comp(elem_side_qp, state)};
198 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluate() [5/6]

template<typename T >
VectorCompositeFunctor< T >::ValueType Moose::VectorCompositeFunctor< T >::evaluate ( const ElemPointArg elem_point,
const StateArg state 
) const
overrideprivatevirtual

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< VectorValue< T > >.

Definition at line 202 of file VectorCompositeFunctor.h.

204 {
205  return {_x_comp(elem_point_arg, state),
206  _y_comp(elem_point_arg, state),
207  _z_comp(elem_point_arg, state)};
208 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluate() [6/6]

template<typename T >
VectorCompositeFunctor< T >::ValueType Moose::VectorCompositeFunctor< T >::evaluate ( const NodeArg node_arg,
const StateArg state 
) const
overrideprivatevirtual

Implements Moose::FunctorBase< VectorValue< T > >.

Definition at line 212 of file VectorCompositeFunctor.h.

213 {
214  return {_x_comp(node_arg, state), _y_comp(node_arg, state), _z_comp(node_arg, state)};
215 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluateDot() [1/6]

template<typename T >
VectorCompositeFunctor< T >::DotType Moose::VectorCompositeFunctor< T >::evaluateDot ( const FaceArg ,
const StateArg  
) const
overrideprivatevirtual
Parameters
faceSee the FaceArg doxygen
stateSee the StateArg doxygen
Returns
The functor time derivative evaluated at the requested state and space

Reimplemented from Moose::FunctorBase< VectorValue< T > >.

Definition at line 228 of file VectorCompositeFunctor.h.

229 {
230  return {_x_comp.dot(face_arg, state), _y_comp.dot(face_arg, state), _z_comp.dot(face_arg, state)};
231 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluateDot() [2/6]

template<typename T >
VectorCompositeFunctor< T >::DotType Moose::VectorCompositeFunctor< T >::evaluateDot ( const ElemArg ,
const StateArg  
) const
overrideprivatevirtual

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< VectorValue< T > >.

Definition at line 235 of file VectorCompositeFunctor.h.

236 {
237  return {_x_comp.dot(elem_arg, state), _y_comp.dot(elem_arg, state), _z_comp.dot(elem_arg, state)};
238 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluateDot() [3/6]

virtual DotType Moose::FunctorBase< VectorValue< T > >::evaluateDot ( const ElemQpArg ,
const StateArg  
) const
inlineprotectedvirtualinherited
Parameters
qpSee the ElemQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor time derivative evaluated at the requested state and space

Definition at line 411 of file MooseFunctor.h.

412  {
413  mooseError("Element quadrature point time derivative not implemented for functor " +
414  functorName());
415  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateDot() [4/6]

virtual DotType Moose::FunctorBase< VectorValue< T > >::evaluateDot ( const ElemSideQpArg ,
const StateArg  
) const
inlineprotectedvirtualinherited
Parameters
side_qpSee the ElemSideQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor time derivative evaluated at the requested state and space

Definition at line 422 of file MooseFunctor.h.

423  {
424  mooseError("Element side quadrature point time derivative not implemented for functor " +
425  functorName());
426  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateDot() [5/6]

virtual DotType Moose::FunctorBase< VectorValue< T > >::evaluateDot ( const ElemPointArg ,
const StateArg  
) const
inlineprotectedvirtualinherited

Evaluate the functor time derivative with a given element and point.

Definition at line 431 of file MooseFunctor.h.

432  {
433  mooseError("Element-point time derivative not implemented for functor " + functorName());
434  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateDot() [6/6]

virtual DotType Moose::FunctorBase< VectorValue< T > >::evaluateDot ( const NodeArg ,
const StateArg  
) const
inlineprotectedvirtualinherited

Definition at line 436 of file MooseFunctor.h.

437  {
438  mooseError("Time derivative at node not implemented for functor " + functorName());
439  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradDot() [1/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradDot ( const ElemArg ,
const StateArg  
) const
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

Definition at line 445 of file MooseFunctor.h.

446  {
447  mooseError("Element gradient-dot not implemented for functor " + functorName());
448  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradDot() [2/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradDot ( const FaceArg ,
const StateArg  
) const
inlineprotectedvirtualinherited
Parameters
faceSee the FaceArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient-dot evaluated at the requested state and space

Definition at line 455 of file MooseFunctor.h.

456  {
457  mooseError("Face gradient-dot not implemented for functor " + functorName());
458  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradDot() [3/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradDot ( const ElemQpArg ,
const StateArg  
) const
inlineprotectedvirtualinherited
Parameters
qpSee the ElemQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient-dot evaluated at the requested state and space

Definition at line 465 of file MooseFunctor.h.

466  {
467  mooseError("Element quadrature point gradient-dot not implemented for functor " +
468  functorName());
469  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradDot() [4/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradDot ( const ElemSideQpArg ,
const StateArg  
) const
inlineprotectedvirtualinherited
Parameters
side_qpSee the ElemSideQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient-dot evaluated at the requested state and space

Definition at line 476 of file MooseFunctor.h.

477  {
478  mooseError("Element side quadrature point gradient-dot not implemented for functor " +
479  functorName());
480  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradDot() [5/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradDot ( const ElemPointArg ,
const StateArg  
) const
inlineprotectedvirtualinherited

Evaluate the functor gradient-dot with a given element and point.

Definition at line 485 of file MooseFunctor.h.

486  {
487  mooseError("Element-point gradient-dot not implemented for functor " + functorName());
488  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradDot() [6/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradDot ( const NodeArg ,
const StateArg  
) const
inlineprotectedvirtualinherited

Definition at line 490 of file MooseFunctor.h.

491  {
492  mooseError("Gradient-dot at node not implemented for functor " + functorName());
493  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradient() [1/6]

template<typename T >
VectorCompositeFunctor< T >::GradientType Moose::VectorCompositeFunctor< T >::evaluateGradient ( const ElemArg ,
const StateArg  
) const
overrideprivatevirtual

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< VectorValue< T > >.

Definition at line 219 of file VectorCompositeFunctor.h.

220 {
221  return {_x_comp.gradient(elem_arg, state),
222  _y_comp.gradient(elem_arg, state),
223  _z_comp.gradient(elem_arg, state)};
224 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ evaluateGradient() [2/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradient ( const FaceArg ,
const StateArg  
) const
inlineprotectedvirtualinherited
Parameters
faceSee the FaceArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient evaluated at the requested state and space

Definition at line 348 of file MooseFunctor.h.

349  {
350  mooseError("Face gradient not implemented for functor " + functorName());
351  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradient() [3/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradient ( const ElemQpArg ,
const StateArg  
) const
inlineprotectedvirtualinherited
Parameters
qpSee the ElemQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient evaluated at the requested state and space

Definition at line 358 of file MooseFunctor.h.

359  {
360  mooseError("Element quadrature point gradient not implemented for functor " + functorName());
361  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradient() [4/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradient ( const ElemSideQpArg ,
const StateArg  
) const
inlineprotectedvirtualinherited
Parameters
side_qpSee the ElemSideQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient evaluated at the requested state and space

Definition at line 368 of file MooseFunctor.h.

369  {
370  mooseError("Element side quadrature point gradient not implemented for functor " +
371  functorName());
372  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradient() [5/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradient ( const ElemPointArg ,
const StateArg  
) const
inlineprotectedvirtualinherited

Evaluate the functor gradient with a given element and point.

Definition at line 377 of file MooseFunctor.h.

378  {
379  mooseError("Element-point gradient not implemented for functor " + functorName());
380  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ evaluateGradient() [6/6]

virtual GradientType Moose::FunctorBase< VectorValue< T > >::evaluateGradient ( const NodeArg ,
const StateArg  
) const
inlineprotectedvirtualinherited

Definition at line 382 of file MooseFunctor.h.

383  {
384  mooseError("Gradient at node not implemented for functor " + functorName());
385  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:176

◆ functorName()

const MooseFunctorName& Moose::FunctorBase< VectorValue< T > >::functorName ( ) const
inlineinherited

Return the functor name.

Definition at line 176 of file MooseFunctor.h.

176 { return _functor_name; }
MooseFunctorName _functor_name
name of the functor
Definition: MooseFunctor.h:570

◆ genericEvaluate()

FunctorReturnType< VectorValue< T > , FET >::type Moose::FunctorBase< VectorValue< T > >::genericEvaluate ( const Space &  r,
const State &  state 
) const
inherited

Perform a generic evaluation based on the supplied template argument FET and supplied spatial and temporal arguments.

Definition at line 993 of file MooseFunctor.h.

994 {
995  if constexpr (FET == FunctorEvaluationKind::Value)
996  return (*this)(r, state);
997  else if constexpr (FET == FunctorEvaluationKind::Gradient)
998  return gradient(r, state);
999  else if constexpr (FET == FunctorEvaluationKind::Dot)
1000  return dot(r, state);
1001  else
1002  return gradDot(r, state);
1003 }
GradientType gradDot(const ElemArg &elem, const StateArg &state) const
Same as their evaluateGradDot overloads with the same arguments but allows for caching implementation...
Definition: MooseFunctor.h:939
DotType dot(const ElemArg &elem, const StateArg &state) const
Same as their evaluateDot overloads with the same arguments but allows for caching implementation...
Definition: MooseFunctor.h:896
GradientType gradient(const ElemArg &elem, const StateArg &state) const
Same as their evaluateGradient overloads with the same arguments but allows for caching implementatio...
Definition: MooseFunctor.h:853

◆ gradDot() [1/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradDot ( const ElemArg elem,
const StateArg state 
) const
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 939 of file MooseFunctor.h.

940 {
941  return evaluateGradDot(elem, state);
942 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:445

◆ gradDot() [2/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradDot ( const FaceArg face,
const StateArg state 
) const
inherited

Definition at line 946 of file MooseFunctor.h.

947 {
948  checkFace(face);
949  return evaluateGradDot(face, state);
950 }
void checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
Definition: MooseFunctor.h:738
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:445

◆ gradDot() [3/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradDot ( const ElemQpArg qp,
const StateArg state 
) const
inherited

Definition at line 954 of file MooseFunctor.h.

955 {
956  return evaluateGradDot(elem_qp, state);
957 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:445

◆ gradDot() [4/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradDot ( const ElemSideQpArg qp,
const StateArg state 
) const
inherited

Definition at line 961 of file MooseFunctor.h.

962 {
963  return evaluateGradDot(elem_side_qp, state);
964 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:445

◆ gradDot() [5/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradDot ( const ElemPointArg elem_point,
const StateArg state 
) const
inherited

Definition at line 968 of file MooseFunctor.h.

969 {
970  return evaluateGradDot(elem_point, state);
971 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:445

◆ gradDot() [6/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradDot ( const NodeArg node,
const StateArg state 
) const
inherited

Definition at line 975 of file MooseFunctor.h.

976 {
977  return evaluateGradDot(node, state);
978 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:445

◆ gradient() [1/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradient ( const ElemArg elem,
const StateArg state 
) const
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 853 of file MooseFunctor.h.

854 {
855  return evaluateGradient(elem, state);
856 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:338

◆ gradient() [2/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradient ( const FaceArg face,
const StateArg state 
) const
inherited

Definition at line 860 of file MooseFunctor.h.

861 {
862  checkFace(face);
863  return evaluateGradient(face, state);
864 }
void checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
Definition: MooseFunctor.h:738
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:338

◆ gradient() [3/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradient ( const ElemQpArg qp,
const StateArg state 
) const
inherited

Definition at line 868 of file MooseFunctor.h.

869 {
870  return evaluateGradient(elem_qp, state);
871 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:338

◆ gradient() [4/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradient ( const ElemSideQpArg qp,
const StateArg state 
) const
inherited

Definition at line 875 of file MooseFunctor.h.

876 {
877  return evaluateGradient(elem_side_qp, state);
878 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:338

◆ gradient() [5/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradient ( const ElemPointArg elem_point,
const StateArg state 
) const
inherited

Definition at line 882 of file MooseFunctor.h.

883 {
884  return evaluateGradient(elem_point, state);
885 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:338

◆ gradient() [6/6]

FunctorBase< VectorValue< T > >::GradientType Moose::FunctorBase< VectorValue< T > >::gradient ( const NodeArg node,
const StateArg state 
) const
inherited

Definition at line 889 of file MooseFunctor.h.

890 {
891  return evaluateGradient(node, state);
892 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:338

◆ hasBlocks()

template<typename T >
virtual bool Moose::VectorCompositeFunctor< T >::hasBlocks ( SubdomainID  ) const
inlineoverridevirtual

Returns whether the functor is defined on this block.

Reimplemented from Moose::FunctorBase< VectorValue< T > >.

Definition at line 53 of file VectorCompositeFunctor.h.

54  {
55  const bool ret = _x_comp.hasBlocks(sub_id);
56  if (_has_y)
57  mooseAssert(ret == _y_comp.hasBlocks(sub_id), "x and y block restriction don't agree");
58  if (_has_z)
59  mooseAssert(ret == _z_comp.hasBlocks(sub_id), "x and z block restriction don't agree");
60  return ret;
61  }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const bool _has_y
Whether the user supplied a y-functor.
const bool _has_z
Whether the user supplied a z-functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ hasFaceSide()

bool Moose::FunctorBase< VectorValue< T > >::hasFaceSide ( const FaceInfo fi,
const bool  fi_elem_side 
) const
overridevirtualinherited

Implements FaceArgInterface.

Definition at line 982 of file MooseFunctor.h.

983 {
984  if (fi_elem_side)
985  return hasBlocks(fi.elem().subdomain_id());
986  else
987  return fi.neighborPtr() && hasBlocks(fi.neighbor().subdomain_id());
988 }
virtual bool hasBlocks(SubdomainID) const
Returns whether the functor is defined on this block.
Definition: MooseFunctor.h:243
const Elem & elem() const
Definition: FaceInfo.h:85
const Elem * neighborPtr() const
Definition: FaceInfo.h:88
const Elem & neighbor() const
Definition: FaceInfo.h:220

◆ isConstant()

virtual bool Moose::FunctorBase< VectorValue< T > >::isConstant ( ) const
inlinevirtualinherited

Returns true if this functor is a constant.

Definition at line 266 of file MooseFunctor.h.

266 { return false; }

◆ isExtrapolatedBoundaryFace()

virtual bool Moose::FunctorBase< VectorValue< T > >::isExtrapolatedBoundaryFace ( const FaceInfo ,
const Elem *  ,
const StateArg  
) const
inlinevirtualinherited

Returns whether this (sided) face is an extrapolated boundary face for this functor.

Definition at line 253 of file MooseFunctor.h.

254  {
255  mooseError("not implemented");
256  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311

◆ isInternalFace()

bool Moose::FunctorBase< VectorValue< T > >::isInternalFace ( const FaceInfo fi) const
inherited

Returns true if the face is an internal face.

Definition at line 575 of file MooseFunctor.h.

576 {
577  if (!fi.neighborPtr())
578  return false;
579 
580  return hasBlocks(fi.elem().subdomain_id()) && hasBlocks(fi.neighborPtr()->subdomain_id());
581 }
virtual bool hasBlocks(SubdomainID) const
Returns whether the functor is defined on this block.
Definition: MooseFunctor.h:243
const Elem & elem() const
Definition: FaceInfo.h:85
const Elem * neighborPtr() const
Definition: FaceInfo.h:88

◆ jacobianSetup()

void Moose::FunctorBase< VectorValue< T > >::jacobianSetup ( )
overridevirtualinherited

Implements Moose::FunctorAbstract.

Definition at line 837 of file MooseFunctor.h.

838 {
840  clearCacheData();
841 }
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:33
void clearCacheData()
clear cache data
Definition: MooseFunctor.h:795
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:520

◆ operator()() [1/6]

FunctorBase< VectorValue< T > >::ValueType Moose::FunctorBase< VectorValue< T > >::operator() ( const ElemArg elem,
const StateArg state 
) const
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 603 of file MooseFunctor.h.

604 {
605  if (_always_evaluate)
606  return evaluate(elem, state);
607 
608  mooseAssert(state.state == 0,
609  "Cached evaluations are only currently supported for the current state.");
610 
611  return queryFVArgCache(_elem_arg_to_value, elem);
612 }
ValueType queryFVArgCache(std::map< SpaceArg, ValueType > &cache_data, const SpaceArg &space) const
check a finite volume spatial argument cache and if invalid then evaluate
Definition: MooseFunctor.h:586
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.
std::map< ElemArg, ValueType > _elem_arg_to_value
Map from element arguments to their cached evaluations.
Definition: MooseFunctor.h:561
bool _always_evaluate
Boolean to check if we always need evaluation.
Definition: MooseFunctor.h:523

◆ operator()() [2/6]

FunctorBase< VectorValue< T > >::ValueType Moose::FunctorBase< VectorValue< T > >::operator() ( const FaceArg face,
const StateArg state 
) const
inherited

Definition at line 616 of file MooseFunctor.h.

617 {
618  checkFace(face_in);
619 
620  if (_always_evaluate)
621  return evaluate(face_in, state);
622 
623  mooseAssert(state.state == 0,
624  "Cached evaluations are only currently supported for the current state.");
625 
626  return queryFVArgCache(_face_arg_to_value, face_in);
627 }
std::map< FaceArg, ValueType > _face_arg_to_value
Map from face arguments to their cached evaluations.
Definition: MooseFunctor.h:564
void checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
Definition: MooseFunctor.h:738
ValueType queryFVArgCache(std::map< SpaceArg, ValueType > &cache_data, const SpaceArg &space) const
check a finite volume spatial argument cache and if invalid then evaluate
Definition: MooseFunctor.h:586
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.
bool _always_evaluate
Boolean to check if we always need evaluation.
Definition: MooseFunctor.h:523

◆ operator()() [3/6]

FunctorBase< VectorValue< T > >::ValueType Moose::FunctorBase< VectorValue< T > >::operator() ( const ElemQpArg qp,
const StateArg state 
) const
inherited

Definition at line 662 of file MooseFunctor.h.

663 {
664  if (_always_evaluate)
665  return evaluate(elem_qp, state);
666 
667  const auto elem_id = elem_qp.elem->id();
668  if (elem_id != _current_qp_map_key)
669  {
670  _current_qp_map_key = elem_id;
672  }
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");
677 
678  return queryQpCache(qp, *qrule, qp_data, elem_qp, state);
679 }
dof_id_type _current_qp_map_key
Current key for qp map cache.
Definition: MooseFunctor.h:529
std::vector< std::pair< bool, ValueType > > * _current_qp_map_value
Current value for qp map cache.
Definition: MooseFunctor.h:532
ValueType queryQpCache(unsigned int qp, const libMesh::QBase &qrule, std::vector< std::pair< bool, VectorValue< T > >> &qp_cache_data, const SpaceArg &space, const StateArg &state) const
check a qp cache and if invalid then evaluate
Definition: MooseFunctor.h:632
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.
bool _always_evaluate
Boolean to check if we always need evaluation.
Definition: MooseFunctor.h:523
std::unordered_map< dof_id_type, std::vector< std::pair< bool, ValueType > > > _qp_to_value
Cached element quadrature point functor property evaluations.
Definition: MooseFunctor.h:539

◆ operator()() [4/6]

FunctorBase< VectorValue< T > >::ValueType Moose::FunctorBase< VectorValue< T > >::operator() ( const ElemSideQpArg qp,
const StateArg state 
) const
inherited

Definition at line 683 of file MooseFunctor.h.

684 {
685  if (_always_evaluate)
686  return evaluate(elem_side_qp, state);
687 
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)
692  {
693  _current_side_qp_map_key = elem_id;
695  }
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");
701 
702  // Check and see whether we even have sized for this side
703  if (side >= side_qp_data.size())
704  side_qp_data.resize(elem->n_sides());
705 
706  // Ok we were sized enough for our side
707  auto & qp_data = side_qp_data[side];
708  return queryQpCache(qp, *qrule, qp_data, elem_side_qp, state);
709 }
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.
Definition: MooseFunctor.h:558
ValueType queryQpCache(unsigned int qp, const libMesh::QBase &qrule, std::vector< std::pair< bool, VectorValue< T > >> &qp_cache_data, const SpaceArg &space, const StateArg &state) const
check a qp cache and if invalid then evaluate
Definition: MooseFunctor.h:632
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.
dof_id_type _current_side_qp_map_key
Current key for side-qp map cache.
Definition: MooseFunctor.h:545
std::vector< std::vector< std::pair< bool, ValueType > > > * _current_side_qp_map_value
Current value for side-qp map cache.
Definition: MooseFunctor.h:548
bool _always_evaluate
Boolean to check if we always need evaluation.
Definition: MooseFunctor.h:523

◆ operator()() [5/6]

FunctorBase< VectorValue< T > >::ValueType Moose::FunctorBase< VectorValue< T > >::operator() ( const ElemPointArg elem_point,
const StateArg state 
) const
inherited

Definition at line 713 of file MooseFunctor.h.

714 {
715  return evaluate(elem_point, state);
716 }
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.

◆ operator()() [6/6]

FunctorBase< VectorValue< T > >::ValueType Moose::FunctorBase< VectorValue< T > >::operator() ( const NodeArg node,
const StateArg state 
) const
inherited

Definition at line 730 of file MooseFunctor.h.

731 {
732  mooseAssert(node.subdomain_ids, "Subdomain IDs must be supplied to the node argument");
733  return evaluate(node, state);
734 }
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.

◆ residualSetup()

void Moose::FunctorBase< VectorValue< T > >::residualSetup ( )
overridevirtualinherited

Implements Moose::FunctorAbstract.

Definition at line 829 of file MooseFunctor.h.

830 {
831  if (_clearance_schedule.count(EXEC_LINEAR))
832  clearCacheData();
833 }
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:31
void clearCacheData()
clear cache data
Definition: MooseFunctor.h:795
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:520

◆ setCacheClearanceSchedule()

void Moose::FunctorBase< VectorValue< T > >::setCacheClearanceSchedule ( const std::set< ExecFlagType > &  clearance_schedule)
inherited

Set how often to clear the functor evaluation cache.

Definition at line 720 of file MooseFunctor.h.

721 {
722  if (clearance_schedule.count(EXEC_ALWAYS))
723  _always_evaluate = true;
724 
725  _clearance_schedule = clearance_schedule;
726 }
const ExecFlagType EXEC_ALWAYS
Definition: Moose.C:51
bool _always_evaluate
Boolean to check if we always need evaluation.
Definition: MooseFunctor.h:523
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:520

◆ supportsElemSideQpArg()

template<typename T >
bool Moose::VectorCompositeFunctor< T >::supportsElemSideQpArg ( ) const
overridevirtual

Whether this functor supports evaluation with ElemSideQpArg.

Implements Moose::FunctorBase< VectorValue< T > >.

Definition at line 160 of file VectorCompositeFunctor.h.

161 {
162  if (!_x_comp.supportsElemSideQpArg())
163  return false;
164  if (_has_y && !_y_comp.supportsElemSideQpArg())
165  return false;
166  if (_has_z && !_z_comp.supportsElemSideQpArg())
167  return false;
168  return true;
169 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const bool _has_y
Whether the user supplied a y-functor.
const bool _has_z
Whether the user supplied a z-functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ supportsFaceArg()

template<typename T >
bool Moose::VectorCompositeFunctor< T >::supportsFaceArg ( ) const
overridevirtual

Whether this functor supports evaluation with FaceArg.

Implements Moose::FunctorBase< VectorValue< T > >.

Definition at line 147 of file VectorCompositeFunctor.h.

148 {
149  if (!_x_comp.supportsFaceArg())
150  return false;
151  if (_has_y && !_y_comp.supportsFaceArg())
152  return false;
153  if (_has_z && !_z_comp.supportsFaceArg())
154  return false;
155  return true;
156 }
const FunctorBase< T > & _z_comp
The z-component functor.
const FunctorBase< T > & _y_comp
The y-component functor.
const bool _has_y
Whether the user supplied a y-functor.
const bool _has_z
Whether the user supplied a z-functor.
const FunctorBase< T > & _x_comp
The x-component functor.

◆ timestepSetup()

void Moose::FunctorBase< VectorValue< T > >::timestepSetup ( )
overridevirtualinherited

Implements Moose::FunctorAbstract.

Definition at line 821 of file MooseFunctor.h.

822 {
824  clearCacheData();
825 }
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:37
void clearCacheData()
clear cache data
Definition: MooseFunctor.h:795
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:520

Member Data Documentation

◆ _has_y

template<typename T >
const bool Moose::VectorCompositeFunctor< T >::_has_y
private

Whether the user supplied a y-functor.

Definition at line 97 of file VectorCompositeFunctor.h.

Referenced by Moose::VectorCompositeFunctor< T >::hasBlocks().

◆ _has_z

template<typename T >
const bool Moose::VectorCompositeFunctor< T >::_has_z
private

Whether the user supplied a z-functor.

Definition at line 100 of file VectorCompositeFunctor.h.

Referenced by Moose::VectorCompositeFunctor< T >::hasBlocks().

◆ _x_comp

template<typename T >
const FunctorBase<T>& Moose::VectorCompositeFunctor< T >::_x_comp
private

The x-component functor.

Definition at line 90 of file VectorCompositeFunctor.h.

Referenced by Moose::VectorCompositeFunctor< T >::hasBlocks().

◆ _y_comp

template<typename T >
const FunctorBase<T>& Moose::VectorCompositeFunctor< T >::_y_comp
private

The y-component functor.

Definition at line 92 of file VectorCompositeFunctor.h.

Referenced by Moose::VectorCompositeFunctor< T >::hasBlocks().

◆ _y_constant

template<typename T >
std::unique_ptr<ConstantFunctor<T> > Moose::VectorCompositeFunctor< T >::_y_constant
private

Possible holder of constant-0 y-component functor.

This will be allocated if the user only supplies one component functor during construction

Definition at line 83 of file VectorCompositeFunctor.h.

◆ _z_comp

template<typename T >
const FunctorBase<T>& Moose::VectorCompositeFunctor< T >::_z_comp
private

The z-component functor.

Definition at line 94 of file VectorCompositeFunctor.h.

Referenced by Moose::VectorCompositeFunctor< T >::hasBlocks().

◆ _z_constant

template<typename T >
std::unique_ptr<ConstantFunctor<T> > Moose::VectorCompositeFunctor< T >::_z_constant
private

Possible holder of constant-0 z-component functor.

This will be allocated if the user only supplies two component functors during construction

Definition at line 87 of file VectorCompositeFunctor.h.


The documentation for this class was generated from the following file: