https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
LayeredIntegralFunctor Class Reference

Computes layered element integrals of a functor. More...

#include <LayeredIntegralFunctor.h>

Inheritance diagram for LayeredIntegralFunctor:
[legend]

Public Types

using FunctorType = FunctorBase< Real >
 
using ValueType = Real
 
using GradientType = typename FunctorReturnType< Real, FunctorEvaluationKind::Gradient >::type
 This rigmarole makes it so that a user can create functors that return containers (std::vector, std::array).
 
using DotType = ValueType
 

Public Member Functions

 LayeredIntegralFunctor (const InputParameters &parameters)
 
virtual Real spatialValue (const Point &p) const override
 Given a Point return the integral value associated with the layer that point falls in.
 
virtual const std::vector< Point > spatialPoints () const override
 
virtual void initialize () override
 
virtual void execute () override
 
virtual void finalize () override
 
virtual void threadJoin (const UserObject &y) override
 
virtual bool hasBlocks (SubdomainID sub) const override
 Returns whether the functor is defined on this block.
 
template<typename SpatialArg >
Real evaluateTemplate (const SpatialArg &position, const Moose::StateArg &libmesh_dbg_var(state)) const
 
FunctorReturnType< Real, FET >::type genericEvaluate (const Space &r, const State &state) const
 Perform a generic evaluation based on the supplied template argument FET and supplied spatial and temporal arguments.
 
const MooseFunctorName & functorName () const
 Return the functor name.
 
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.
 
virtual bool isExtrapolatedBoundaryFace (const FaceInfo &, const Elem *, const StateArg &) const
 Returns whether this (sided) face is an extrapolated boundary face for this functor.
 
bool isInternalFace (const FaceInfo &) const
 Returns true if the face is an internal face.
 
virtual bool isConstant () const
 Returns true if this functor is a constant.
 
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.
 
virtual Real integralValue (const Point &p) const
 Given a Point return the integral value associated with the layer that point falls in.
 
virtual Real getLayerValue (unsigned int layer) const
 Get the value for a given layer.
 
virtual unsigned int getLayer (const Point &p) const
 Helper function to return the layer the point lies in.
 
const std::vector< Real > & getLayerCenters () const
 Get the center coordinates for the layers (along given direction)
 
unsigned int direction () const
 Get direction of the layers.
 
ValueType operator() (const ElemArg &elem, const StateArg &state) const
 Same as their evaluate overloads with the same arguments but allows for caching implementation.
 
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.
 
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.
 
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.
 
GradientType gradDot (const FaceArg &face, const StateArg &state) const
 
GradientType gradDot (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradDot (const NodeArg &node, const StateArg &state) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

using ElemArg = Moose::ElemArg
 
using ElemQpArg = Moose::ElemQpArg
 
using ElemSideQpArg = Moose::ElemSideQpArg
 
using FaceArg = Moose::FaceArg
 
using ElemPointArg = Moose::ElemPointArg
 
using NodeArg = Moose::NodeArg
 

Protected Member Functions

virtual Real evaluate (const ElemArg &elem, const Moose::StateArg &state) const override
 Evaluate the functor with a given element.
 
virtual Real evaluate (const FaceArg &face, const Moose::StateArg &state) const override final
 
virtual Real evaluate (const ElemQpArg &qp, const Moose::StateArg &state) const override
 
virtual Real evaluate (const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final
 
virtual Real evaluate (const ElemPointArg &elem_point, const Moose::StateArg &state) const override final
 Evaluate the functor with a given element and point.
 
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 bool supportsElemSideQpArg () const override final
 Whether this functor supports evaluation with ElemSideQpArg.
 
void setLayerValue (unsigned int layer, Real value)
 Set the value for a particular layer.
 
bool layerHasValue (unsigned int layer) const
 Whether or not a layer has a value.
 
void getBounds ()
 Compute bounds, restricted to blocks if given.
 
void computeLayerCenters ()
 Compute the center points for each layer.
 
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 ElemArg &, const StateArg &) const
 Evaluate the functor gradient with a given element.
 
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.
 
virtual GradientType evaluateGradient (const NodeArg &, const StateArg &) const
 
virtual DotType evaluateDot (const ElemArg &, const StateArg &) const
 Evaluate the functor time derivative with a given element.
 
virtual DotType evaluateDot (const FaceArg &, const StateArg &) const
 
virtual DotType evaluateDot (const ElemQpArg &, const StateArg &) const
 
virtual DotType evaluateDot (const ElemSideQpArg &, const StateArg &) const
 
virtual DotType evaluateDot (const ElemPointArg &, const StateArg &) const
 Evaluate the functor time derivative with a given element and point.
 
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.
 
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.
 
virtual GradientType evaluateGradDot (const NodeArg &, const StateArg &) const
 

Protected Attributes

std::string _layered_base_name
 Name of this object.
 
const InputParameters_layered_base_params
 Params for this object.
 
MooseEnum _direction_enum
 The MooseEnum direction the layers are going in.
 
unsigned int _direction
 The component direction the layers are going in. We cache this for speed (so we're not always going through the MooseEnum)
 
bool _interval_based
 Whether or not this object is based on equally spaced intervals or "bounds".
 
unsigned int _num_layers
 Number of layers to split the mesh into.
 
std::vector< Real > _layer_bounds
 The boundaries of the layers.
 
unsigned int _sample_type
 How to sample the values.
 
unsigned int _average_radius
 How many layers both above and below the found layer will be used in the average.
 
bool _using_displaced_mesh
 true if this object operates on the displaced mesh, otherwise false
 
std::vector< Real > _layer_centers
 center coordinates of each layer
 
Real _direction_min
 
Real _direction_max
 
std::vector< Real > & _layer_values
 Value of the integral for each layer.
 
std::vector< int > & _layer_has_value
 Whether or not each layer has had any value summed into it.
 
bool _cumulative
 Whether the values are cumulative over the layers.
 
const bool _positive_cumulative_direction
 Whether the cumulative values should be summed in the positive or negative direction.
 

Private Member Functions

template<typename SpatialArg >
Real evaluateTemplate (const SpatialArg &position, const Moose::StateArg &state) const
 
void clearCacheData ()
 clear cache data
 
ValueType queryQpCache (unsigned int qp, const libMesh::QBase &qrule, std::vector< std::pair< bool, Real > > &qp_cache_data, const SpaceArg &space, const StateArg &state) const
 check a qp cache and if invalid then evaluate
 
ValueType queryFVArgCache (std::map< SpaceArg, ValueType > &cache_data, const SpaceArg &space) const
 check a finite volume spatial argument cache and if invalid then evaluate
 
template<typename T , typename... Args>
T & declareRestartableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "restartable" and initialize it.
 
template<typename T , typename... Args>
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 Declares a piece of "managed" restartable data and initialize it.
 
template<typename T , typename... Args>
const T & getRestartableData (const std::string &data_name) const
 Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object.
 
template<typename T , typename... Args>
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 Declare a piece of data as "restartable" and initialize it.
 
template<typename T , typename... Args>
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "recoverable" and initialize it.
 
template<typename T , typename... Args>
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 Declare a piece of data as "restartable".
 
template<typename T , typename... Args>
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 Declare a piece of data as "restartable".
 
std::string restartableName (const std::string &data_name) const
 Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix.
 
RestartableDataValueregisterRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 Helper function for actually registering the restartable data.
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 Helper function for actually registering the restartable data.
 
template<typename T , typename... Args>
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 Helper function for declaring restartable data.
 

Private Attributes

std::set< ExecFlagType_clearance_schedule
 How often to clear the material property cache.
 
bool _always_evaluate
 Boolean to check if we always need evaluation.
 
dof_id_type _current_qp_map_key
 Current key for qp map cache.
 
std::vector< std::pair< bool, ValueType > > * _current_qp_map_value
 Current value for qp map cache.
 
std::unordered_map< dof_id_type, std::vector< std::pair< bool, ValueType > > > _qp_to_value
 Cached element quadrature point functor property evaluations.
 
dof_id_type _current_side_qp_map_key
 Current key for side-qp map cache.
 
std::vector< std::vector< std::pair< bool, ValueType > > > * _current_side_qp_map_value
 Current value for side-qp map cache.
 
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.
 
std::map< ElemArg, ValueType_elem_arg_to_value
 Map from element arguments to their cached evaluations.
 
std::map< FaceArg, ValueType_face_arg_to_value
 Map from face arguments to their cached evaluations.
 
std::map< NodeArg, ValueType_node_arg_to_value
 Map from nodal arguments to their cached evaluations.
 
MooseFunctorName _functor_name
 name of the functor
 
SubProblem_layered_base_subproblem
 Subproblem for the child object.
 
std::vector< SubdomainID_layer_bounding_blocks
 List of SubdomainIDs, if given.
 
bool _has_direction_max_min
 whether the max/min coordinate in the direction is known from user input
 
MooseApp_restartable_app
 Reference to the application.
 
const std::string _restartable_system_name
 The system name this object is in.
 
const THREAD_ID _restartable_tid
 The thread ID for this object.
 
const bool _restartable_read_only
 Flag for toggling read only status (see ReporterData)
 
const RestartableDataMapName _metaname
 Restartable metadata name.
 
std::string _restartable_name
 The name of the object.
 

Detailed Description

Computes layered element integrals of a functor.

Definition at line 18 of file LayeredIntegralFunctor.h.

Member Typedef Documentation

◆ DotType

using Moose::FunctorBase< Real >::DotType = ValueType
inherited

Definition at line 150 of file MooseFunctor.h.

◆ ElemArg

template<typename UserObjectType >
using SpatialUserObjectFunctor< UserObjectType >::ElemArg = Moose::ElemArg
protectedinherited

Definition at line 29 of file SpatialUserObjectFunctor.h.

◆ ElemPointArg

template<typename UserObjectType >
using SpatialUserObjectFunctor< UserObjectType >::ElemPointArg = Moose::ElemPointArg
protectedinherited

Definition at line 33 of file SpatialUserObjectFunctor.h.

◆ ElemQpArg

template<typename UserObjectType >
using SpatialUserObjectFunctor< UserObjectType >::ElemQpArg = Moose::ElemQpArg
protectedinherited

Definition at line 30 of file SpatialUserObjectFunctor.h.

◆ ElemSideQpArg

template<typename UserObjectType >
using SpatialUserObjectFunctor< UserObjectType >::ElemSideQpArg = Moose::ElemSideQpArg
protectedinherited

Definition at line 31 of file SpatialUserObjectFunctor.h.

◆ FaceArg

template<typename UserObjectType >
using SpatialUserObjectFunctor< UserObjectType >::FaceArg = Moose::FaceArg
protectedinherited

Definition at line 32 of file SpatialUserObjectFunctor.h.

◆ FunctorType

using Moose::FunctorBase< Real >::FunctorType = FunctorBase<Real >
inherited

Definition at line 140 of file MooseFunctor.h.

◆ GradientType

using Moose::FunctorBase< Real >::GradientType = typename FunctorReturnType<Real , 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.

◆ NodeArg

template<typename UserObjectType >
using SpatialUserObjectFunctor< UserObjectType >::NodeArg = Moose::NodeArg
protectedinherited

Definition at line 34 of file SpatialUserObjectFunctor.h.

◆ ValueType

using Moose::FunctorBase< Real >::ValueType = Real
inherited

Definition at line 141 of file MooseFunctor.h.

Constructor & Destructor Documentation

◆ LayeredIntegralFunctor()

LayeredIntegralFunctor::LayeredIntegralFunctor ( const InputParameters parameters)

Definition at line 22 of file LayeredIntegralFunctor.C.

24{
25}
Base class for computing layered side integrals.

Member Function Documentation

◆ checkFace()

void Moose::FunctorBase< Real >::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 \emph 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 280 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());
772 mooseError(_functor_name,
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());
785 _functor_name,
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
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition FaceInfo.h:38
const Elem * neighborPtr() const
Definition FaceInfo.h:88
const Elem * elemPtr() const
Definition FaceInfo.h:86
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
Definition FaceInfo.h:75
virtual bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const override
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:64
const libMesh::Elem * face_side
A member that can be used to indicate whether there is a sidedness to this face.
const FaceInfo * fi
a face information object which defines our location in space

◆ clearCacheData()

void Moose::FunctorBase< Real >::clearCacheData ( )
privateinherited

clear cache data

Definition at line 500 of file MooseFunctor.h.

796{
797 for (auto & map_pr : _qp_to_value)
798 for (auto & pr : map_pr.second)
799 pr.first = false;
800
801 for (auto & map_pr : _side_qp_to_value)
802 {
803 auto & side_vector = map_pr.second;
804 for (auto & qp_vector : side_vector)
805 for (auto & pr : qp_vector)
806 pr.first = false;
807 }
808
810 _current_qp_map_value = nullptr;
813
814 _elem_arg_to_value.clear();
815 _face_arg_to_value.clear();
816 _node_arg_to_value.clear();
817}
for(PetscInt i=0;i< nvars;++i)
dof_id_type _current_qp_map_key
Current key for qp map cache.
std::map< ElemArg, ValueType > _elem_arg_to_value
Map from element arguments to their cached evaluations.
std::unordered_map< dof_id_type, std::vector< std::pair< bool, ValueType > > > _qp_to_value
Cached element quadrature point functor property evaluations.
std::map< FaceArg, ValueType > _face_arg_to_value
Map from face arguments to their cached evaluations.
std::vector< std::vector< std::pair< bool, ValueType > > > * _current_side_qp_map_value
Current value for side-qp map cache.
std::map< NodeArg, ValueType > _node_arg_to_value
Map from nodal arguments to their cached evaluations.
std::vector< std::pair< bool, ValueType > > * _current_qp_map_value
Current value for qp map cache.
dof_id_type _current_side_qp_map_key
Current key for side-qp map cache.
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.
static constexpr dof_id_type invalid_id

◆ computeLayerCenters()

void LayeredBase::computeLayerCenters ( )
protectedinherited

Compute the center points for each layer.

Definition at line 442 of file LayeredBase.C.

443{
445
446 if (_interval_based)
447 {
449
450 for (const auto i : make_range(_num_layers))
451 _layer_centers[i] = (i + 0.5) * dx;
452 }
453 else
454 {
455 for (const auto i : make_range(_num_layers))
456 _layer_centers[i] = 0.5 * (_layer_bounds[i + 1] + _layer_bounds[i]);
457 }
458}
unsigned int _num_layers
Number of layers to split the mesh into.
bool _interval_based
Whether or not this object is based on equally spaced intervals or "bounds".
Real _direction_max
std::vector< Real > _layer_centers
center coordinates of each layer
Real _direction_min
std::vector< Real > _layer_bounds
The boundaries of the layers.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)

Referenced by LayeredBase::LayeredBase().

◆ customSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 233 of file MooseFunctor.h.

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

◆ declareManagedRestartableDataWithContext()

template<typename T , typename... Args>
Restartable::ManagedValue< T > Restartable::declareManagedRestartableDataWithContext ( const std::string &  data_name,
void *  context,
Args &&...  args 
)
protectedinherited

Declares a piece of "managed" restartable data and initialize it.

Here, "managed" restartable data means that the caller can destruct this data upon destruction of the return value of this method. Therefore, this ManagedValue<T> wrapper should survive after the final calls to dataStore() for it. That is... at the very end.

This is needed for objects whose destruction ordering is important, and enables natural c++ destruction in reverse construction order of the object that declares it.

See delcareRestartableData and declareRestartableDataWithContext for more information.

Definition at line 283 of file Restartable.h.

286{
287 auto & data_ptr =
288 declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...);
289 return Restartable::ManagedValue<T>(data_ptr);
290}
Wrapper class for restartable data that is "managed.
Definition Restartable.h:43

◆ declareRecoverableData()

template<typename T , typename... Args>
T & Restartable::declareRecoverableData ( const std::string &  data_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "recoverable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

Note - this data will NOT be restored on Restart!

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
argsArguments to forward to the constructor of the data

Definition at line 358 of file Restartable.h.

359{
360 const auto full_name = restartableName(data_name);
361
363
364 return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
365}
std::string restartableName(const std::string &data_name) const
Gets the name of a piece of restartable data given a data name, adding the system name and object nam...
Definition Restartable.C:78
void registerRestartableNameWithFilterOnApp(const std::string &name, Moose::RESTARTABLE_FILTER filter)
Helper function for actually registering the restartable data.
Definition Restartable.C:71

◆ declareRestartableData()

template<typename T , typename... Args>
T & Restartable::declareRestartableData ( const std::string &  data_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
argsArguments to forward to the constructor of the data

Definition at line 276 of file Restartable.h.

277{
278 return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
279}

◆ declareRestartableDataHelper()

template<typename T , typename... Args>
RestartableData< T > & Restartable::declareRestartableDataHelper ( const std::string &  data_name,
void *  context,
Args &&...  args 
) const
privateinherited

Helper function for declaring restartable data.

We use this function to reduce code duplication when returning const/nonconst references to the data.

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions
argsArguments to forward to the constructor of the data

Definition at line 310 of file Restartable.h.

313{
314 const auto full_name = restartableName(data_name);
315
316 // Here we will create the RestartableData even though we may not use this instance.
317 // If it's already in use, the App will return a reference to the existing instance and we'll
318 // return that one instead. We might refactor this to have the app create the RestartableData
319 // at a later date.
320 auto data_ptr =
321 std::make_unique<RestartableData<T>>(full_name, context, std::forward<Args>(args)...);
322 auto & restartable_data_ref = static_cast<RestartableData<T> &>(
323 registerRestartableDataOnApp(std::move(data_ptr), _restartable_tid));
324
325 return restartable_data_ref;
326}
Concrete definition of a parameter value for a specified type.
const THREAD_ID _restartable_tid
The thread ID for this object.
RestartableDataValue & registerRestartableDataOnApp(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
Helper function for actually registering the restartable data.
Definition Restartable.C:63

◆ declareRestartableDataWithContext()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithContext ( const std::string &  data_name,
void *  context,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions
argsArguments to forward to the constructor of the data

Definition at line 301 of file Restartable.h.

304{
305 return declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...).set();
306}

◆ declareRestartableDataWithObjectName()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithObjectName ( const std::string &  data_name,
const std::string &  object_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
argsArguments to forward to the constructor of the data

Definition at line 330 of file Restartable.h.

333{
334 return declareRestartableDataWithObjectNameWithContext<T>(
335 data_name, object_name, nullptr, std::forward<Args>(args)...);
336}

◆ declareRestartableDataWithObjectNameWithContext()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithObjectNameWithContext ( const std::string &  data_name,
const std::string &  object_name,
void *  context,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
contextContext pointer that will be passed to the load and store functions
argsArguments to forward to the constructor of the data

Definition at line 340 of file Restartable.h.

344{
345 std::string old_name = _restartable_name;
346
347 _restartable_name = object_name;
348
349 T & value = declareRestartableDataWithContext<T>(data_name, context, std::forward<Args>(args)...);
350
351 _restartable_name = old_name;
352
353 return value;
354}
std::string _restartable_name
The name of the object.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ direction()

unsigned int LayeredBase::direction ( ) const
inlineinherited

Get direction of the layers.

Returns
layer direction

Definition at line 73 of file LayeredBase.h.

73{ return _direction; }
unsigned int _direction
The component direction the layers are going in. We cache this for speed (so we're not always going t...

◆ dot() [1/6]

FunctorBase< Real >::DotType Moose::FunctorBase< Real >::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 209 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.

◆ dot() [2/6]

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

Definition at line 213 of file MooseFunctor.h.

926{
927 return evaluateDot(elem_point, state);
928}

◆ dot() [3/6]

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

Definition at line 211 of file MooseFunctor.h.

912{
913 return evaluateDot(elem_qp, state);
914}

◆ dot() [4/6]

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

Definition at line 212 of file MooseFunctor.h.

919{
920 return evaluateDot(elem_side_qp, state);
921}

◆ dot() [5/6]

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

Definition at line 210 of file MooseFunctor.h.

904{
905 checkFace(face);
906 return evaluateDot(face, state);
907}
void checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.

◆ dot() [6/6]

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

Definition at line 214 of file MooseFunctor.h.

933{
934 return evaluateDot(node, state);
935}

◆ evaluate() [1/6]

template<typename UserObjectType >
Real SpatialUserObjectFunctor< UserObjectType >::evaluate ( const ElemArg elem,
const Moose::StateArg state 
) const
overrideprotectedvirtualinherited

Evaluate the functor with a given element.

Some example implementations of this method could compute an element-average or evaluate at the element centroid

Implements Moose::FunctorBase< Real >.

Reimplemented in ExtraIDIntegralVectorPostprocessor.

Definition at line 85 of file SpatialUserObjectFunctor.h.

87{
88 return evaluateTemplate(elem, state);
89}
Real evaluateTemplate(const SpatialArg &position, const Moose::StateArg &state) const

◆ evaluate() [2/6]

template<typename UserObjectType >
Real SpatialUserObjectFunctor< UserObjectType >::evaluate ( const ElemPointArg elem_point,
const Moose::StateArg state 
) const
finaloverrideprotectedvirtualinherited

Evaluate the functor with a given element and point.

Some example implementations of this method could perform a two-term Taylor expansion using cell-centered value and gradient

Implements Moose::FunctorBase< Real >.

Definition at line 117 of file SpatialUserObjectFunctor.h.

119{
120 return evaluateTemplate(elem_point, state);
121}

◆ evaluate() [3/6]

template<typename UserObjectType >
Real SpatialUserObjectFunctor< UserObjectType >::evaluate ( const ElemQpArg qp,
const Moose::StateArg state 
) const
overrideprotectedvirtualinherited
Parameters
qpSee the ElemQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor evaluated at the requested state and space

Implements Moose::FunctorBase< Real >.

Reimplemented in ExtraIDIntegralVectorPostprocessor.

Definition at line 101 of file SpatialUserObjectFunctor.h.

103{
104 return evaluateTemplate(qp, state);
105}

◆ evaluate() [4/6]

template<typename UserObjectType >
Real SpatialUserObjectFunctor< UserObjectType >::evaluate ( const ElemSideQpArg side_qp,
const Moose::StateArg state 
) const
finaloverrideprotectedvirtualinherited
Parameters
side_qpSee the ElemSideQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor evaluated at the requested state and space

Implements Moose::FunctorBase< Real >.

Definition at line 109 of file SpatialUserObjectFunctor.h.

111{
112 return evaluateTemplate(elem_side_qp, state);
113}

◆ evaluate() [5/6]

template<typename UserObjectType >
Real SpatialUserObjectFunctor< UserObjectType >::evaluate ( const FaceArg face,
const Moose::StateArg state 
) const
finaloverrideprotectedvirtualinherited
Parameters
faceSee the FaceArg doxygen
stateSee the StateArg doxygen
Returns
The functor evaluated at the requested state and space

Implements Moose::FunctorBase< Real >.

Definition at line 93 of file SpatialUserObjectFunctor.h.

95{
96 return evaluateTemplate(face, state);
97}

◆ evaluate() [6/6]

template<typename UserObjectType >
Real SpatialUserObjectFunctor< UserObjectType >::evaluate ( const NodeArg node,
const Moose::StateArg state 
) const
finaloverrideprotectedvirtualinherited

Implements Moose::FunctorBase< Real >.

Definition at line 125 of file SpatialUserObjectFunctor.h.

127{
128 return evaluateTemplate(node, state);
129}

◆ evaluateDot() [1/6]

virtual DotType Moose::FunctorBase< Real >::evaluateDot ( const ElemArg ,
const StateArg  
) const
inlineprotectedvirtualinherited

Evaluate the functor time derivative with a given element.

Some example implementations of this method could compute an element-average or evaluate at the element centroid

Reimplemented in Function, and Postprocessor.

Definition at line 391 of file MooseFunctor.h.

392 {
393 mooseError("Element time derivative not implemented for functor " + functorName());
394 }
const MooseFunctorName & functorName() const
Return the functor name.

◆ evaluateDot() [2/6]

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

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

Reimplemented in Function, and Postprocessor.

Definition at line 431 of file MooseFunctor.h.

432 {
433 mooseError("Element-point time derivative not implemented for functor " + functorName());
434 }

◆ evaluateDot() [3/6]

virtual DotType Moose::FunctorBase< Real >::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

Reimplemented in Function, and Postprocessor.

Definition at line 411 of file MooseFunctor.h.

412 {
413 mooseError("Element quadrature point time derivative not implemented for functor " +
414 functorName());
415 }

◆ evaluateDot() [4/6]

virtual DotType Moose::FunctorBase< Real >::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

Reimplemented in Function, and Postprocessor.

Definition at line 422 of file MooseFunctor.h.

423 {
424 mooseError("Element side quadrature point time derivative not implemented for functor " +
425 functorName());
426 }

◆ evaluateDot() [5/6]

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

Reimplemented in Function, and Postprocessor.

Definition at line 401 of file MooseFunctor.h.

402 {
403 mooseError("Face time derivative not implemented for functor " + functorName());
404 }

◆ evaluateDot() [6/6]

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

Reimplemented in Function, and Postprocessor.

Definition at line 436 of file MooseFunctor.h.

437 {
438 mooseError("Time derivative at node not implemented for functor " + functorName());
439 }

◆ evaluateGradDot() [1/6]

virtual GradientType Moose::FunctorBase< Real >::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 }

◆ evaluateGradDot() [2/6]

virtual GradientType Moose::FunctorBase< Real >::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 }

◆ evaluateGradDot() [3/6]

virtual GradientType Moose::FunctorBase< Real >::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 }

◆ evaluateGradDot() [4/6]

virtual GradientType Moose::FunctorBase< Real >::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 }

◆ evaluateGradDot() [5/6]

virtual GradientType Moose::FunctorBase< Real >::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 }

◆ evaluateGradDot() [6/6]

virtual GradientType Moose::FunctorBase< Real >::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 }

◆ evaluateGradient() [1/6]

virtual GradientType Moose::FunctorBase< Real >::evaluateGradient ( const ElemArg ,
const StateArg  
) const
inlineprotectedvirtualinherited

Evaluate the functor gradient with a given element.

Some example implementations of this method could compute an element-average or evaluate at the element centroid

Reimplemented in Function, and Postprocessor.

Definition at line 338 of file MooseFunctor.h.

339 {
340 mooseError("Element gradient not implemented for functor " + functorName());
341 }

◆ evaluateGradient() [2/6]

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

Evaluate the functor gradient with a given element and point.

Reimplemented in Function, and Postprocessor.

Definition at line 377 of file MooseFunctor.h.

378 {
379 mooseError("Element-point gradient not implemented for functor " + functorName());
380 }

◆ evaluateGradient() [3/6]

virtual GradientType Moose::FunctorBase< Real >::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

Reimplemented in Function, and Postprocessor.

Definition at line 358 of file MooseFunctor.h.

359 {
360 mooseError("Element quadrature point gradient not implemented for functor " + functorName());
361 }

◆ evaluateGradient() [4/6]

virtual GradientType Moose::FunctorBase< Real >::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

Reimplemented in Function, and Postprocessor.

Definition at line 368 of file MooseFunctor.h.

369 {
370 mooseError("Element side quadrature point gradient not implemented for functor " +
371 functorName());
372 }

◆ evaluateGradient() [5/6]

virtual GradientType Moose::FunctorBase< Real >::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

Reimplemented in Function, and Postprocessor.

Definition at line 348 of file MooseFunctor.h.

349 {
350 mooseError("Face gradient not implemented for functor " + functorName());
351 }

◆ evaluateGradient() [6/6]

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

Reimplemented in Function, and Postprocessor.

Definition at line 382 of file MooseFunctor.h.

383 {
384 mooseError("Gradient at node not implemented for functor " + functorName());
385 }

◆ evaluateTemplate() [1/2]

template<typename UserObjectType >
template<typename SpatialArg >
Real SpatialUserObjectFunctor< UserObjectType >::evaluateTemplate ( const SpatialArg &  position,
const Moose::StateArg libmesh_dbg_varstate 
) const
inherited

Definition at line 76 of file SpatialUserObjectFunctor.h.

78{
79 mooseAssert(state.state == 0, "We do not currently support evaluating at old states");
80 return this->spatialValue(position.getPoint());
81}

◆ evaluateTemplate() [2/2]

template<typename UserObjectType >
template<typename SpatialArg >
Real SpatialUserObjectFunctor< UserObjectType >::evaluateTemplate ( const SpatialArg &  position,
const Moose::StateArg state 
) const
privateinherited

◆ execute()

void LayeredIntegralBase< ElementIntegralFunctorUserObject >::execute ( )
overridevirtualinherited

Definition at line 37 of file LayeredIntegralBase.h.

76{
77 const auto integral_value = computeIntegral();
78
79 const auto layer = getLayer(_current_elem->vertex_average());
80
81 setLayerValue(layer, getLayerValue(layer) + integral_value);
82}
virtual Real getLayerValue(unsigned int layer) const
Get the value for a given layer.
virtual unsigned int getLayer(const Point &p) const
Helper function to return the layer the point lies in.
void setLayerValue(unsigned int layer, Real value)
Set the value for a particular layer.

◆ finalize()

void LayeredIntegralBase< ElementIntegralFunctorUserObject >::finalize ( )
overridevirtualinherited

Reimplemented from LayeredBase.

Definition at line 38 of file LayeredIntegralBase.h.

87{
89}
virtual void finalize()

◆ functorName()

const MooseFunctorName & Moose::FunctorBase< Real >::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

◆ genericEvaluate()

FunctorReturnType< Real , FET >::type Moose::FunctorBase< Real >::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 172 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}
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 ElemArg &elem, const StateArg &state) const
Same as their evaluateGradient overloads with the same arguments but allows for caching implementatio...
GradientType gradDot(const ElemArg &elem, const StateArg &state) const
Same as their evaluateGradDot overloads with the same arguments but allows for caching implementation...

◆ getBounds()

void LayeredBase::getBounds ( )
protectedinherited

Compute bounds, restricted to blocks if given.

Definition at line 468 of file LayeredBase.C.

469{
470 if (_layer_bounding_blocks.size() == 0)
471 {
473 _direction_min = bounding_box.min()(_direction);
474 _direction_max = bounding_box.max()(_direction);
475 }
476 else
477 {
478 _direction_min = std::numeric_limits<Real>::infinity();
479 _direction_max = -std::numeric_limits<Real>::infinity();
480
482
483 for (auto & elem_ptr : *mesh.getActiveLocalElementRange())
484 {
485 auto subdomain_id = elem_ptr->subdomain_id();
486
487 if (std::find(_layer_bounding_blocks.begin(), _layer_bounding_blocks.end(), subdomain_id) ==
489 continue;
490
491 for (auto & node : elem_ptr->node_ref_range())
492 {
493 _direction_min = std::min(_direction_min, node(_direction));
494 _direction_max = std::max(_direction_max, node(_direction));
495 }
496 }
497
498 mesh.comm().min(_direction_min);
499 mesh.comm().max(_direction_max);
500 }
501}
SubProblem & _layered_base_subproblem
Subproblem for the child object.
std::vector< SubdomainID > _layer_bounding_blocks
List of SubdomainIDs, if given.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
virtual MooseMesh & mesh()=0
MeshBase & mesh
libMesh::BoundingBox create_bounding_box(const MeshBase &mesh)

Referenced by LayeredBase::initialize(), and LayeredBase::LayeredBase().

◆ getLayer()

unsigned int LayeredBase::getLayer ( const Point &  p) const
virtualinherited

Helper function to return the layer the point lies in.

Parameters
pThe point.
Returns
The layer the Point is found in.

Definition at line 402 of file LayeredBase.C.

403{
404 Real direction_x = p(_direction);
405
406 if (direction_x < _direction_min)
407 return 0;
408
409 if (_interval_based)
410 {
411 unsigned int layer =
412 std::floor(((direction_x - _direction_min) / (_direction_max - _direction_min)) *
413 static_cast<Real>(_num_layers));
414
415 if (layer >= _num_layers)
416 layer = _num_layers - 1;
417
418 return layer;
419 }
420 else // Figure out what layer we are in from the bounds
421 {
422 // This finds the first entry in the vector that is larger than what we're looking for
423 std::vector<Real>::const_iterator one_higher =
424 std::upper_bound(_layer_bounds.begin(), _layer_bounds.end(), direction_x);
425
426 if (one_higher == _layer_bounds.end())
427 {
428 return static_cast<unsigned int>(
429 _layer_bounds.size() -
430 2); // Just return the last layer. -2 because layers are "in-between" bounds
431 }
432 else if (one_higher == _layer_bounds.begin())
433 return 0; // Return the first layer
434 else
435 // The -1 is because the interval that we fall in is just _before_ the number that is bigger
436 // (which is what we found
437 return static_cast<unsigned int>(std::distance(_layer_bounds.begin(), one_higher - 1));
438 }
439}

Referenced by FunctionLayeredIntegral::execute(), LayeredExtremumMaterialProperty::execute(), and LayeredBase::integralValue().

◆ getLayerCenters()

const std::vector< Real > & LayeredBase::getLayerCenters ( ) const
inlineinherited

Get the center coordinates for the layers (along given direction)

Definition at line 67 of file LayeredBase.h.

67{ return _layer_centers; }

Referenced by NearestPointBase< UserObjectType, BaseType >::spatialPoints().

◆ getLayerValue()

Real LayeredBase::getLayerValue ( unsigned int  layer) const
virtualinherited

Get the value for a given layer.

Parameters
layerThe layer index
Returns
The value for the given layer

Definition at line 347 of file LayeredBase.C.

348{
349 if (layer >= _layer_values.size())
350 mooseError("Layer '", layer, "' not found in '", _layered_base_name, "'.");
351 return _layer_values[layer];
352}
std::string _layered_base_name
Name of this object.
std::vector< Real > & _layer_values
Value of the integral for each layer.

Referenced by FunctionLayeredIntegral::execute(), LayeredExtremumMaterialProperty::execute(), LayeredBase::finalize(), LayeredExtremumMaterialProperty::finalize(), LayeredBase::threadJoin(), and LayeredExtremumMaterialProperty::threadJoin().

◆ getRestartableData()

template<typename T , typename... Args>
const T & Restartable::getRestartableData ( const std::string &  data_name) const
protectedinherited

Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object.

Forwarded arguments are not allowed in this case because we assume that the object is restarted and we won't need different constructors to initialize it.

NOTE: This returns a const reference! Make sure you store it in a const reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)

Definition at line 294 of file Restartable.h.

295{
296 return declareRestartableDataHelper<T>(data_name, nullptr).get();
297}

◆ gradDot() [1/6]

FunctorBase< Real >::GradientType Moose::FunctorBase< Real >::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 222 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.

◆ gradDot() [2/6]

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

Definition at line 226 of file MooseFunctor.h.

969{
970 return evaluateGradDot(elem_point, state);
971}

◆ gradDot() [3/6]

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

Definition at line 224 of file MooseFunctor.h.

955{
956 return evaluateGradDot(elem_qp, state);
957}

◆ gradDot() [4/6]

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

Definition at line 225 of file MooseFunctor.h.

962{
963 return evaluateGradDot(elem_side_qp, state);
964}

◆ gradDot() [5/6]

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

Definition at line 223 of file MooseFunctor.h.

947{
948 checkFace(face);
949 return evaluateGradDot(face, state);
950}

◆ gradDot() [6/6]

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

Definition at line 227 of file MooseFunctor.h.

976{
977 return evaluateGradDot(node, state);
978}

◆ gradient() [1/6]

FunctorBase< Real >::GradientType Moose::FunctorBase< Real >::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 196 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.

◆ gradient() [2/6]

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

Definition at line 200 of file MooseFunctor.h.

883{
884 return evaluateGradient(elem_point, state);
885}

◆ gradient() [3/6]

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

Definition at line 198 of file MooseFunctor.h.

869{
870 return evaluateGradient(elem_qp, state);
871}

◆ gradient() [4/6]

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

Definition at line 199 of file MooseFunctor.h.

876{
877 return evaluateGradient(elem_side_qp, state);
878}

◆ gradient() [5/6]

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

Definition at line 197 of file MooseFunctor.h.

861{
862 checkFace(face);
863 return evaluateGradient(face, state);
864}

◆ gradient() [6/6]

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

Definition at line 201 of file MooseFunctor.h.

890{
891 return evaluateGradient(node, state);
892}

◆ hasBlocks()

template<typename UserObjectType >
bool SpatialUserObjectFunctor< UserObjectType >::hasBlocks ( SubdomainID  ) const
overridevirtualinherited

Returns whether the functor is defined on this block.

Reimplemented from Moose::FunctorBase< Real >.

Reimplemented in MeshDivisionFunctorReductionVectorPostprocessor.

Definition at line 133 of file SpatialUserObjectFunctor.h.

134{
135 if constexpr (std::is_base_of<BlockRestrictable, UserObjectType>::value)
136 return UserObjectType::hasBlocks(sub_id);
137 else
139}
virtual bool hasBlocks(SubdomainID) const
Returns whether the functor is defined on this block.

◆ hasFaceSide()

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

Implements FaceArgInterface.

Reimplemented in InterfaceIntegralVariableValuePostprocessor, InternalSideIntegralVariablePostprocessor, SideIntegralFunctorPostprocessorTempl< is_ad >, SideIntegralFunctorPostprocessorTempl< false >, and SideIntegralVariablePostprocessor.

Definition at line 268 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}
const Elem & elem() const
Definition FaceInfo.h:85
const Elem & neighbor() const
Definition FaceInfo.h:220

◆ initialize()

void LayeredIntegralBase< ElementIntegralFunctorUserObject >::initialize ( )
overridevirtualinherited

Reimplemented from LayeredBase.

Definition at line 36 of file LayeredIntegralBase.h.

68{
69 UserObjectType::initialize();
71}
virtual void initialize()

◆ integralValue()

Real LayeredBase::integralValue ( const Point &  p) const
virtualinherited

Given a Point return the integral value associated with the layer that point falls in.

Parameters
pThe point to look for in the layers.

Definition at line 236 of file LayeredBase.C.

237{
238 unsigned int layer = getLayer(p);
239
240 int higher_layer = -1;
241 int lower_layer = -1;
242
243 for (unsigned int i = layer; i < _layer_values.size(); i++)
244 {
245 if (_layer_has_value[i])
246 {
247 higher_layer = i;
248 break;
249 }
250 }
251
252 for (int i = layer - 1; i >= 0; i--)
253 {
254 if (_layer_has_value[i])
255 {
256 lower_layer = i;
257 break;
258 }
259 }
260
261 if (higher_layer == -1 && lower_layer == -1)
262 return 0; // TODO: We could error here but there are startup dependency problems
263
264 switch (_sample_type)
265 {
266 case 0: // direct
267 {
268 if (higher_layer == -1) // Didn't find a higher layer
269 return _layer_values[lower_layer];
270
271 if (unsigned(higher_layer) == layer) // constant in a layer
272 return _layer_values[higher_layer];
273
274 if (lower_layer == -1) // Didn't find a lower layer
275 return _layer_values[higher_layer];
276
277 return (_layer_values[higher_layer] + _layer_values[lower_layer]) / 2;
278 }
279 case 1: // interpolate
280 {
281 if (higher_layer == -1) // Didn't find a higher layer
282 return _layer_values[lower_layer];
283
284 Real layer_length = (_direction_max - _direction_min) / _num_layers;
285 Real lower_coor = _direction_min;
286 Real lower_value = 0;
287 if (lower_layer != -1)
288 {
289 lower_coor += (lower_layer + 1) * layer_length;
290 lower_value = _layer_values[lower_layer];
291 }
292
293 // Interpolate between the two points
294 Real higher_value = _layer_values[higher_layer];
295
296 // Linear interpolation
297 return lower_value +
298 (higher_value - lower_value) * (p(_direction) - lower_coor) / layer_length;
299 }
300 case 2: // average
301 {
302 Real total = 0;
303 unsigned int num_values = 0;
304
305 if (higher_layer != -1)
306 {
307 for (const auto i : make_range(_average_radius))
308 {
309 int current_layer = higher_layer + i;
310
311 if ((size_t)current_layer >= _layer_values.size())
312 break;
313
314 if (_layer_has_value[current_layer])
315 {
316 total += _layer_values[current_layer];
317 num_values += 1;
318 }
319 }
320 }
321
322 if (lower_layer != -1)
323 {
324 for (const auto i : make_range(_average_radius))
325 {
326 int current_layer = lower_layer - i;
327
328 if (current_layer < 0)
329 break;
330
331 if (_layer_has_value[current_layer])
332 {
333 total += _layer_values[current_layer];
334 num_values += 1;
335 }
336 }
337 }
338
339 return total / num_values;
340 }
341 default:
342 mooseError("Unknown sample type!");
343 }
344}
std::vector< int > & _layer_has_value
Whether or not each layer has had any value summed into it.
unsigned int _sample_type
How to sample the values.
unsigned int _average_radius
How many layers both above and below the found layer will be used in the average.

Referenced by FunctionLayeredIntegral::spatialValue(), LayeredExtremumMaterialProperty::spatialValue(), and LayeredIntegralBase< UserObjectType >::spatialValue().

◆ isConstant()

virtual bool Moose::FunctorBase< Real >::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< Real >::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 }

◆ isInternalFace()

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

Returns true if the face is an internal face.

Definition at line 261 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}

◆ jacobianSetup()

void Moose::FunctorBase< Real >::jacobianSetup ( )
overridevirtualinherited

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 231 of file MooseFunctor.h.

838{
841}
const ExecFlagType EXEC_NONLINEAR
Definition Moose.C:33

◆ layerHasValue()

bool LayeredBase::layerHasValue ( unsigned int  layer) const
inlineprotectedinherited

Whether or not a layer has a value.

Definition at line 90 of file LayeredBase.h.

90{ return _layer_has_value[layer]; }

◆ operator()() [1/6]

FunctorBase< Real >::ValueType Moose::FunctorBase< Real >::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 183 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}
T evaluate(Real, const Point &)
The general evaluation method is not defined.
ValueType queryFVArgCache(std::map< SpaceArg, ValueType > &cache_data, const SpaceArg &space) const
check a finite volume spatial argument cache and if invalid then evaluate

◆ operator()() [2/6]

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

Definition at line 187 of file MooseFunctor.h.

714{
715 return evaluate(elem_point, state);
716}

◆ operator()() [3/6]

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

Definition at line 185 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}
ValueType queryQpCache(unsigned int qp, const libMesh::QBase &qrule, std::vector< std::pair< bool, Real > > &qp_cache_data, const SpaceArg &space, const StateArg &state) const
check a qp cache and if invalid then evaluate

◆ operator()() [4/6]

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

Definition at line 186 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}

◆ operator()() [5/6]

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

Definition at line 184 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}

◆ operator()() [6/6]

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

Definition at line 188 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}

◆ queryFVArgCache()

FunctorBase< Real >::ValueType Moose::FunctorBase< Real >::queryFVArgCache ( std::map< SpaceArg, ValueType > &  cache_data,
const SpaceArg &  space 
) const
privateinherited

check a finite volume spatial argument cache and if invalid then evaluate

Definition at line 516 of file MooseFunctor.h.

588{
589 // We don't want to evaluate if the key already exists, so instead we value initialize
590 auto [it, inserted] = cache_data.try_emplace(space, ValueType());
591 auto & value = it->second;
592
593 if (inserted)
594 // value not ready to go
595 // this function is only called from functions that assert we are in the current time state
596 value = evaluate(space, currentState());
597
598 return value;
599}
StateArg currentState()

◆ queryQpCache()

FunctorBase< Real >::ValueType Moose::FunctorBase< Real >::queryQpCache ( unsigned int  qp,
const libMesh::QBase qrule,
std::vector< std::pair< bool, Real > > &  qp_cache_data,
const SpaceArg &  space,
const StateArg state 
) const
privateinherited

check a qp cache and if invalid then evaluate

Definition at line 506 of file MooseFunctor.h.

637{
638 // Check and see whether we even have sized for this quadrature point. If we haven't then we
639 // must evaluate
640 if (qp >= qp_cache_data.size())
641 {
642 qp_cache_data.resize(qrule.n_points(), std::make_pair(false, ValueType()));
643 auto & pr = qp_cache_data[qp];
644 pr.second = evaluate(space, state);
645 pr.first = true;
646 return pr.second;
647 }
648
649 // We've already sized for this qp, so let's see whether we have a valid cache value
650 auto & pr = qp_cache_data[qp];
651 if (pr.first)
652 return pr.second;
653
654 // No valid cache value so evaluate
655 pr.second = evaluate(space, state);
656 pr.first = true;
657 return pr.second;
658}
unsigned int n_points() const

◆ registerRestartableDataOnApp()

RestartableDataValue & Restartable::registerRestartableDataOnApp ( std::unique_ptr< RestartableDataValue data,
THREAD_ID  tid 
) const
privateinherited

Helper function for actually registering the restartable data.

Definition at line 63 of file Restartable.C.

65{
67 std::move(data), tid, _restartable_read_only, _metaname);
68}
RestartableDataValue & registerRestartableData(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
Definition MooseApp.C:2449
const RestartableDataMapName _metaname
Restartable metadata name.
const bool _restartable_read_only
Flag for toggling read only status (see ReporterData)
MooseApp & _restartable_app
Reference to the application.

Referenced by Restartable::declareRestartableDataHelper().

◆ registerRestartableNameWithFilterOnApp()

void Restartable::registerRestartableNameWithFilterOnApp ( const std::string &  name,
Moose::RESTARTABLE_FILTER  filter 
)
privateinherited

Helper function for actually registering the restartable data.

Definition at line 71 of file Restartable.C.

73{
75}
void registerRestartableNameWithFilter(const std::string &name, Moose::RESTARTABLE_FILTER filter)
NOTE: This is an internal function meant for MOOSE use only!
Definition MooseApp.C:1701

Referenced by Restartable::declareRecoverableData().

◆ residualSetup()

void Moose::FunctorBase< Real >::residualSetup ( )
overridevirtualinherited

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 230 of file MooseFunctor.h.

830{
833}
const ExecFlagType EXEC_LINEAR
Definition Moose.C:31

◆ restartableName()

std::string Restartable::restartableName ( const std::string &  data_name) const
protectedinherited

Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix.

This should only be used in this interface and in testing.

Definition at line 78 of file Restartable.C.

79{
80 return _restartable_system_name + "/" + _restartable_name + "/" + data_name;
81}
const std::string _restartable_system_name
The system name this object is in.

Referenced by Restartable::declareRecoverableData(), and Restartable::declareRestartableDataHelper().

◆ setCacheClearanceSchedule()

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

Set how often to clear the functor evaluation cache.

Definition at line 238 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:53
bool _always_evaluate
Boolean to check if we always need evaluation.

◆ setLayerValue()

void LayeredBase::setLayerValue ( unsigned int  layer,
Real  value 
)
protectedinherited

Set the value for a particular layer.

Parameters
layerThe layer you are setting the value for
valueThe value to set

Definition at line 461 of file LayeredBase.C.

462{
463 _layer_values[layer] = value;
464 _layer_has_value[layer] = true;
465}

Referenced by FunctionLayeredIntegral::execute(), LayeredExtremumMaterialProperty::execute(), LayeredBase::finalize(), LayeredExtremumMaterialProperty::finalize(), LayeredExtremumMaterialProperty::initialize(), LayeredBase::threadJoin(), and LayeredExtremumMaterialProperty::threadJoin().

◆ spatialPoints()

const std::vector< Point > LayeredIntegralBase< ElementIntegralFunctorUserObject >::spatialPoints ( ) const
overridevirtualinherited

Definition at line 34 of file LayeredIntegralBase.h.

102{
103 std::vector<Point> points;
104
105 for (const auto & l : _layer_centers)
106 {
107 Point pt(0.0, 0.0, 0.0);
108 pt(_direction) = l;
109 points.push_back(pt);
110 }
111
112 return points;
113}

◆ spatialValue()

virtual Real LayeredIntegralBase< ElementIntegralFunctorUserObject >::spatialValue ( const Point &  p) const
inlineoverridevirtualinherited

Given a Point return the integral value associated with the layer that point falls in.

Parameters
pThe point to look for in the layers.

Definition at line 32 of file LayeredIntegralBase.h.

32{ return integralValue(p); }
virtual Real integralValue(const Point &p) const
Given a Point return the integral value associated with the layer that point falls in.

◆ supportsElemSideQpArg()

template<typename UserObjectType >
virtual bool SpatialUserObjectFunctor< UserObjectType >::supportsElemSideQpArg ( ) const
inlinefinaloverrideprotectedvirtualinherited

Whether this functor supports evaluation with ElemSideQpArg.

Implements Moose::FunctorBase< Real >.

Definition at line 46 of file SpatialUserObjectFunctor.h.

46{ return true; }

◆ supportsFaceArg()

template<typename UserObjectType >
virtual bool SpatialUserObjectFunctor< UserObjectType >::supportsFaceArg ( ) const
inlinefinaloverrideprotectedvirtualinherited

Whether this functor supports evaluation with FaceArg.

Implements Moose::FunctorBase< Real >.

Definition at line 45 of file SpatialUserObjectFunctor.h.

45{ return true; }

◆ threadJoin()

void LayeredIntegralBase< ElementIntegralFunctorUserObject >::threadJoin ( const UserObject y)
overridevirtualinherited

Reimplemented from LayeredBase.

Definition at line 39 of file LayeredIntegralBase.h.

94{
95 UserObjectType::threadJoin(y);
97}
virtual void threadJoin(const UserObject &y)

◆ timestepSetup()

void Moose::FunctorBase< Real >::timestepSetup ( )
overridevirtualinherited

Implements Moose::FunctorAbstract.

Reimplemented in Function, MemoryUsage, and NumNonlinearIterations.

Definition at line 232 of file MooseFunctor.h.

822{
825}
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition Moose.C:37

◆ validParams()

InputParameters LayeredIntegralFunctor::validParams ( )
static

Definition at line 15 of file LayeredIntegralFunctor.C.

16{
18 params.addClassDescription("Computes layered element integrals of a functor.");
19 return params;
20}
static InputParameters validParams()

Member Data Documentation

◆ _always_evaluate

bool Moose::FunctorBase< Real >::_always_evaluate
privateinherited

Boolean to check if we always need evaluation.

Definition at line 523 of file MooseFunctor.h.

◆ _average_radius

unsigned int LayeredBase::_average_radius
protectedinherited

How many layers both above and below the found layer will be used in the average.

Definition at line 127 of file LayeredBase.h.

Referenced by LayeredBase::integralValue().

◆ _clearance_schedule

std::set<ExecFlagType> Moose::FunctorBase< Real >::_clearance_schedule
privateinherited

How often to clear the material property cache.

Definition at line 520 of file MooseFunctor.h.

◆ _cumulative

bool LayeredBase::_cumulative
protectedinherited

Whether the values are cumulative over the layers.

Definition at line 145 of file LayeredBase.h.

Referenced by LayeredBase::finalize(), LayeredExtremumMaterialProperty::finalize(), and LayeredBase::LayeredBase().

◆ _current_qp_map_key

dof_id_type Moose::FunctorBase< Real >::_current_qp_map_key
mutableprivateinherited

Current key for qp map cache.

Definition at line 529 of file MooseFunctor.h.

◆ _current_qp_map_value

std::vector<std::pair<bool, ValueType> >* Moose::FunctorBase< Real >::_current_qp_map_value
mutableprivateinherited

Current value for qp map cache.

Definition at line 532 of file MooseFunctor.h.

◆ _current_side_qp_map_key

dof_id_type Moose::FunctorBase< Real >::_current_side_qp_map_key
mutableprivateinherited

Current key for side-qp map cache.

Definition at line 545 of file MooseFunctor.h.

◆ _current_side_qp_map_value

std::vector<std::vector<std::pair<bool, ValueType> > >* Moose::FunctorBase< Real >::_current_side_qp_map_value
mutableprivateinherited

Current value for side-qp map cache.

Definition at line 548 of file MooseFunctor.h.

◆ _direction

unsigned int LayeredBase::_direction
protectedinherited

The component direction the layers are going in. We cache this for speed (so we're not always going through the MooseEnum)

Definition at line 112 of file LayeredBase.h.

Referenced by LayeredBase::direction(), LayeredBase::getBounds(), LayeredBase::getLayer(), LayeredBase::integralValue(), FunctionLayeredIntegral::spatialPoints(), and LayeredExtremumMaterialProperty::spatialPoints().

◆ _direction_enum

MooseEnum LayeredBase::_direction_enum
protectedinherited

The MooseEnum direction the layers are going in.

Definition at line 109 of file LayeredBase.h.

◆ _direction_max

Real LayeredBase::_direction_max
protectedinherited

◆ _direction_min

Real LayeredBase::_direction_min
protectedinherited

◆ _elem_arg_to_value

std::map<ElemArg, ValueType> Moose::FunctorBase< Real >::_elem_arg_to_value
mutableprivateinherited

Map from element arguments to their cached evaluations.

Definition at line 561 of file MooseFunctor.h.

◆ _face_arg_to_value

std::map<FaceArg, ValueType> Moose::FunctorBase< Real >::_face_arg_to_value
mutableprivateinherited

Map from face arguments to their cached evaluations.

Definition at line 564 of file MooseFunctor.h.

◆ _functor_name

MooseFunctorName Moose::FunctorBase< Real >::_functor_name
privateinherited

name of the functor

Definition at line 570 of file MooseFunctor.h.

◆ _has_direction_max_min

bool LayeredBase::_has_direction_max_min
privateinherited

whether the max/min coordinate in the direction is known from user input

Definition at line 158 of file LayeredBase.h.

Referenced by LayeredBase::LayeredBase().

◆ _interval_based

bool LayeredBase::_interval_based
protectedinherited

Whether or not this object is based on equally spaced intervals or "bounds".

Definition at line 115 of file LayeredBase.h.

Referenced by LayeredBase::computeLayerCenters(), LayeredBase::getLayer(), and LayeredBase::LayeredBase().

◆ _layer_bounding_blocks

std::vector<SubdomainID> LayeredBase::_layer_bounding_blocks
privateinherited

List of SubdomainIDs, if given.

Definition at line 155 of file LayeredBase.h.

Referenced by LayeredBase::getBounds(), and LayeredBase::LayeredBase().

◆ _layer_bounds

std::vector<Real> LayeredBase::_layer_bounds
protectedinherited

The boundaries of the layers.

Definition at line 121 of file LayeredBase.h.

Referenced by LayeredBase::computeLayerCenters(), LayeredBase::getLayer(), and LayeredBase::LayeredBase().

◆ _layer_centers

std::vector<Real> LayeredBase::_layer_centers
protectedinherited

◆ _layer_has_value

std::vector<int>& LayeredBase::_layer_has_value
protectedinherited

◆ _layer_values

std::vector<Real>& LayeredBase::_layer_values
protectedinherited

◆ _layered_base_name

std::string LayeredBase::_layered_base_name
protectedinherited

Name of this object.

Definition at line 103 of file LayeredBase.h.

Referenced by LayeredBase::getLayerValue().

◆ _layered_base_params

const InputParameters& LayeredBase::_layered_base_params
protectedinherited

Params for this object.

Definition at line 106 of file LayeredBase.h.

Referenced by LayeredBase::LayeredBase().

◆ _layered_base_subproblem

SubProblem& LayeredBase::_layered_base_subproblem
privateinherited

Subproblem for the child object.

Definition at line 152 of file LayeredBase.h.

Referenced by LayeredBase::finalize(), LayeredBase::getBounds(), and LayeredBase::LayeredBase().

◆ _metaname

const RestartableDataMapName Restartable::_metaname
privateinherited

Restartable metadata name.

Definition at line 247 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _node_arg_to_value

std::map<NodeArg, ValueType> Moose::FunctorBase< Real >::_node_arg_to_value
mutableprivateinherited

Map from nodal arguments to their cached evaluations.

Definition at line 567 of file MooseFunctor.h.

◆ _num_layers

unsigned int LayeredBase::_num_layers
protectedinherited

◆ _positive_cumulative_direction

const bool LayeredBase::_positive_cumulative_direction
protectedinherited

Whether the cumulative values should be summed in the positive or negative direction.

Definition at line 148 of file LayeredBase.h.

Referenced by LayeredBase::finalize(), and LayeredExtremumMaterialProperty::finalize().

◆ _qp_to_value

std::unordered_map<dof_id_type, std::vector<std::pair<bool, ValueType> > > Moose::FunctorBase< Real >::_qp_to_value
mutableprivateinherited

Cached element quadrature point functor property evaluations.

The map key is the element id. The map values should have size corresponding to the number of quadrature points on the element. The vector elements are pairs. The first member of the pair indicates whether a cached value has been computed. The second member of the pair is the (cached) value. If the boolean is false, then the value cannot be trusted

Definition at line 539 of file MooseFunctor.h.

◆ _restartable_app

MooseApp& Restartable::_restartable_app
protectedinherited

Reference to the application.

Definition at line 234 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().

◆ _restartable_name

std::string Restartable::_restartable_name
privateinherited

The name of the object.

Definition at line 250 of file Restartable.h.

Referenced by Restartable::declareRestartableDataWithObjectNameWithContext(), and Restartable::restartableName().

◆ _restartable_read_only

const bool Restartable::_restartable_read_only
protectedinherited

Flag for toggling read only status (see ReporterData)

Definition at line 243 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _restartable_system_name

const std::string Restartable::_restartable_system_name
protectedinherited

The system name this object is in.

Definition at line 237 of file Restartable.h.

Referenced by Restartable::restartableName().

◆ _restartable_tid

const THREAD_ID Restartable::_restartable_tid
protectedinherited

The thread ID for this object.

Definition at line 240 of file Restartable.h.

Referenced by Restartable::declareRestartableDataHelper().

◆ _sample_type

unsigned int LayeredBase::_sample_type
protectedinherited

How to sample the values.

Definition at line 124 of file LayeredBase.h.

Referenced by LayeredBase::integralValue(), and LayeredBase::LayeredBase().

◆ _side_qp_to_value

std::unordered_map<dof_id_type, std::vector<std::vector<std::pair<bool, ValueType> > > > Moose::FunctorBase< Real >::_side_qp_to_value
mutableprivateinherited

Cached element quadrature point functor property evaluations.

The map key is the element id. The map values are a multi-dimensional vector (or vector of vectors) with the first index corresponding to the side and the second index corresponding to the quadrature point index. The elements returned after double indexing are pairs. The first member of the pair indicates whether a cached value has been computed. The second member of the pair is the (cached) value. If the boolean is false, then the value cannot be trusted

Definition at line 558 of file MooseFunctor.h.

◆ _using_displaced_mesh

bool LayeredBase::_using_displaced_mesh
protectedinherited

true if this object operates on the displaced mesh, otherwise false

Definition at line 130 of file LayeredBase.h.

Referenced by LayeredBase::initialize().


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