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

#include <KokkosPostprocessor.h>

Inheritance diagram for Moose::Kokkos::Postprocessor:
[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

 Postprocessor (const MooseObject *moose_object)
 
 Postprocessor (const Postprocessor &object)
 Copy constructor for parallel dispatch.
 
virtual PostprocessorValue getValue () const =0
 This will get called to actually grab the final value the postprocessor has calculated.
 
const PostprocessorValue & getCurrentValue () const
 
const std::string & PPName () const
 Returns the name of the Postprocessor.
 
virtual bool hasBlocks (SubdomainID) const override
 Returns whether the functor is defined on this block.
 
bool supportsFaceArg () const override final
 Whether this functor supports evaluation with FaceArg.
 
bool supportsElemSideQpArg () const override final
 Whether this functor supports evaluation with ElemSideQpArg.
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 Builds hide lists for output objects NOT listed in the 'outputs' parameter.
 
const std::set< OutputName > & getOutputs ()
 Get the list of output objects that this class is restricted.
 
template<>
const Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
template<>
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 
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.
 
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
 
ValueType operator() (const PointArg &point, 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
 
GradientType gradient (const PointArg &point, 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
 
DotType dot (const PointArg &point, 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
 
GradientType gradDot (const PointArg &point, const StateArg &state) const
 

Static Public Member Functions

static InputParameters validParams ()
 
static std::string deduceFunctorName (const std::string &name, const InputParameters &params)
 Helper to look up a functor name through the input parameter keys.
 

Protected Member Functions

std::string deduceFunctorName (const std::string &name) const
 Small helper to look up a functor name through the input parameter keys.
 
template<typename T >
const Moose::Functor< T > & getFunctor (const std::string &name)
 Retrieves a functor from the subproblem.
 
template<typename T >
const Moose::Functor< T > & getFunctor (const std::string &name, THREAD_ID tid)
 Retrieves a functor from the subproblem.
 
template<typename T >
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem)
 Retrieves a functor from the passed-in subproblem.
 
template<typename T >
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 Retrieves a functor from the passed-in subproblem.
 
bool isFunctor (const std::string &name) const
 Checks the subproblem for the given functor.
 
bool isFunctor (const std::string &name, const SubProblem &subproblem) const
 Checks the passed-in subproblem for the given functor.
 
Moose::ElemArg makeElemArg (const Elem *elem, bool correct_skewnewss=false) const
 Helper method to create an elemental argument for a functor that includes whether to perform skewness corrections.
 
template<typename T >
void checkFunctorSupportsSideIntegration (const std::string &name, bool qp_integration)
 Throws error if the functor does not support the requested side integration.
 
template<typename T >
const Moose::Functor< T > & getFunctorByName (const std::string &name)
 Retrieves a functor from the subproblem.
 
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 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
 
virtual GradientType evaluateGradDot (const PointArg &, const StateArg &) const
 

Protected Attributes

const std::string & _pp_name
 Post-processor name.
 
const PostprocessorValue & _current_value
 The current value, which is the Reporter value that changes when we execute UOs in the problem.
 

Private 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
 
using PointArg = Moose::PointArg
 

Private Member Functions

const PostprocessorValue & declareValue (const MooseObject &moose_object)
 Internal method to be used to declare the value and store it within _current_value in the constructor.
 
ValueType evaluate (const ElemArg &elem, const Moose::StateArg &state) const override final
 Evaluate the functor with a given element.
 
ValueType evaluate (const FaceArg &face, const Moose::StateArg &state) const override final
 
ValueType evaluate (const ElemQpArg &qp, const Moose::StateArg &state) const override final
 
ValueType evaluate (const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final
 
ValueType evaluate (const ElemPointArg &elem_point, const Moose::StateArg &state) const override final
 Evaluate the functor with a given element and point.
 
ValueType evaluate (const NodeArg &node, const Moose::StateArg &state) const override final
 
ValueType evaluate (const PointArg &point, const Moose::StateArg &state) const override final
 Evaluate the functor at a physical point without any mesh information.
 
GradientType evaluateGradient (const ElemArg &elem, const Moose::StateArg &state) const override final
 Evaluate the functor gradient with a given element.
 
GradientType evaluateGradient (const FaceArg &face, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const ElemQpArg &qp, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const ElemPointArg &elem_point, const Moose::StateArg &state) const override final
 Evaluate the functor gradient with a given element and point.
 
GradientType evaluateGradient (const NodeArg &node, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const PointArg &point, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const ElemArg &elem, const Moose::StateArg &state) const override final
 Evaluate the functor time derivative with a given element.
 
DotType evaluateDot (const FaceArg &face, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const ElemQpArg &qp, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const ElemPointArg &elem_point, const Moose::StateArg &state) const override final
 Evaluate the functor time derivative with a given element and point.
 
DotType evaluateDot (const NodeArg &node, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const PointArg &point, const Moose::StateArg &state) const override final
 
void evaluateDotWarning () const
 Internal method for giving a one-time warning for calling an evaluateDot() method.
 
virtual bool isADObject () const override
 Whether this interface is for an AD object.
 
template<typename T >
const Moose::Functor< T > & getFunctorByName (const std::string &name, SubProblem &subproblem, THREAD_ID tid)
 Retrieves a functor from the passed-in subproblem.
 
template<typename T >
const Moose::Functor< T > * defaultFunctor (const std::string &name)
 Helper function to parse default functor values.
 
template<>
const Moose::Functor< Real > * defaultFunctor (const std::string &name)
 
template<>
const Moose::Functor< ADReal > * defaultFunctor (const std::string &name)
 
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
 

Private Attributes

const MooseObject & _pp_moose_object
 MOOSE object.
 
MooseApp & _oi_moose_app
 Reference the the MooseApp; neede for access to the OutputWarehouse.
 
OutputWarehouse & _oi_output_warehouse
 Reference to the OutputWarehouse for populating the Output object hide lists.
 
std::set< OutputName > _oi_outputs
 The set of Output object names listed in the 'outputs' parameter.
 
const InputParameters & _fi_params
 Parameters of the object with this interface.
 
const std::string _fi_name
 The name of the object that this interface belongs to.
 
SubProblem *const _fi_subproblem
 Pointer to subproblem if the subproblem pointer parameter was set.
 
const THREAD_ID _fi_tid
 Current threaded it.
 
std::vector< std::unique_ptr< Moose::Functor< Real > > > _default_real_functors
 Storage vector for Moose::Functor<Real> default objects.
 
std::vector< std::unique_ptr< Moose::Functor< ADReal > > > _default_ad_real_functors
 Storage vector for Moose::Functor<ADReal> default objects.
 
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
 

Detailed Description

Definition at line 17 of file KokkosPostprocessor.h.

Member Typedef Documentation

◆ DotType

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

Definition at line 150 of file MooseFunctor.h.

◆ ElemArg

using Postprocessor::ElemArg = Moose::ElemArg
privateinherited

Definition at line 89 of file Postprocessor.h.

◆ ElemPointArg

Definition at line 93 of file Postprocessor.h.

◆ ElemQpArg

using Postprocessor::ElemQpArg = Moose::ElemQpArg
privateinherited

Definition at line 90 of file Postprocessor.h.

◆ ElemSideQpArg

Definition at line 91 of file Postprocessor.h.

◆ FaceArg

using Postprocessor::FaceArg = Moose::FaceArg
privateinherited

Definition at line 92 of file Postprocessor.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

using Postprocessor::NodeArg = Moose::NodeArg
privateinherited

Definition at line 94 of file Postprocessor.h.

◆ PointArg

using Postprocessor::PointArg = Moose::PointArg
privateinherited

Definition at line 95 of file Postprocessor.h.

◆ ValueType

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

Definition at line 141 of file MooseFunctor.h.

Constructor & Destructor Documentation

◆ Postprocessor() [1/2]

Moose::Kokkos::Postprocessor::Postprocessor ( const MooseObject *  moose_object)

◆ Postprocessor() [2/2]

Moose::Kokkos::Postprocessor::Postprocessor ( const Postprocessor &  object)

Copy constructor for parallel dispatch.

Member Function Documentation

◆ buildOutputHideVariableList()

void OutputInterface::buildOutputHideVariableList ( std::set< std::string >  variable_names)
inherited

Builds hide lists for output objects NOT listed in the 'outputs' parameter.

Parameters
variable_namesA set of variables for which the 'outputs' parameter controls

By default this is called by the constructor and passes the block name as the list of variables. This needs to be called explicitly if the build_list flag is set to False in the constructor. The latter cases is needed by the Material object to work correctly with the automatic material output capability.

Definition at line 68 of file OutputInterface.C.

69{
70 // Set of available names
71 const std::set<OutputName> & avail = _oi_output_warehouse.getOutputNames();
72
73 // Check for 'none'; hide variables on all outputs
74 if (_oi_outputs.find("none") != _oi_outputs.end())
75 for (const auto & name : avail)
76 _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
77
78 // Check for empty and 'all' in 'outputs' parameter; do not perform any variable restrictions in
79 // these cases
80 else if (_oi_outputs.empty() || _oi_outputs.find("all") != _oi_outputs.end())
81 return;
82
83 // Limit the variable output to Output objects listed
84 else
85 {
86 // Create a list of outputs where the variable should be hidden
87 std::set<OutputName> hide;
88 std::set_difference(avail.begin(),
89 avail.end(),
90 _oi_outputs.begin(),
91 _oi_outputs.end(),
92 std::inserter(hide, hide.begin()));
93
94 // If 'outputs' is specified add the object name to the list of items to hide
95 for (const auto & name : hide)
96 _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
97 }
98}
OutputWarehouse & _oi_output_warehouse
Reference to the OutputWarehouse for populating the Output object hide lists.
std::set< OutputName > _oi_outputs
The set of Output object names listed in the 'outputs' parameter.
const std::set< OutputName > & getOutputNames()
Get a complete set of all output object names.
std::string name(const ElemQuality q)

Referenced by ReporterTransferInterface::hideVariableHelper(), and OutputInterface::OutputInterface().

◆ 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 284 of file MooseFunctor.h.

778{
779#if DEBUG
780 const Elem * const elem = face.face_side;
781 const FaceInfo * const fi = face.fi;
782 mooseAssert(fi, "face info should be non-null");
783 bool check_elem_def = false;
784 bool check_neighbor_def = false;
785 // We check if the functor is defined on both sides of the face
786 if (!elem)
787 {
788 if (!hasFaceSide(*fi, true))
789 check_neighbor_def = true;
790 else if (!hasFaceSide(*fi, false))
791 check_elem_def = true;
792 }
793 else if (elem == fi->elemPtr())
794 check_elem_def = true;
795 else
796 {
797 mooseAssert(elem == fi->neighborPtr(), "This has to match something");
798 check_neighbor_def = true;
799 }
800
801 if (check_elem_def && !hasFaceSide(*fi, true))
802 {
803 std::string additional_message = "It is not defined on the neighbor side either.";
804 if (hasFaceSide(*fi, false))
805 additional_message = "It is however defined on the neighbor side.";
806 additional_message += " Face centroid: " + Moose::stringify(fi->faceCentroid());
807 mooseError(_functor_name,
808 " is not defined on the element side of the face information, but a face argument "
809 "producer "
810 "(e.g. residual object, postprocessor, etc.) has requested evaluation there.\n",
811 additional_message);
812 }
813 if (check_neighbor_def && !hasFaceSide(*fi, false))
814 {
815 std::string additional_message = "It is not defined on the element side either.";
816 if (hasFaceSide(*fi, true))
817 additional_message = "It is however defined on the element side.";
818 additional_message += " Face centroid: " + Moose::stringify(fi->faceCentroid());
820 _functor_name,
821 " is not defined on the neighbor side of the face information, but a face argument "
822 "producer (e.g. residual object, postprocessor, etc.) has requested evaluation there.\n",
823 additional_message);
824 }
825#endif
826}
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:65
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

◆ checkFunctorSupportsSideIntegration()

template<typename T >
void FunctorInterface::checkFunctorSupportsSideIntegration ( const std::string &  name,
bool  qp_integration 
)
protectedinherited

Throws error if the functor does not support the requested side integration.

Parameters
[in]nameName of functor or functor parameter
[in]qp_integrationTrue if performing qp integration, false if face info

Definition at line 261 of file FunctorInterface.h.

262{
263 const std::string functor_name = deduceFunctorName(name);
264 const auto & functor = getFunctor<T>(name);
265 if (qp_integration)
266 {
267 if (!functor.supportsElemSideQpArg())
268 mooseError("Quadrature point integration was requested, but the functor '",
269 functor_name,
270 "' does not support this.");
271 }
272 else
273 {
274 if (!functor.supportsFaceArg())
275 mooseError("Face info integration was requested, but the functor '",
276 functor_name,
277 "' does not support this.");
278 }
279}
static std::string deduceFunctorName(const std::string &name, const InputParameters &params)
Helper to look up a functor name through the input parameter keys.

◆ clearCacheData()

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

clear cache data

Definition at line 528 of file MooseFunctor.h.

831{
832 for (auto & map_pr : _qp_to_value)
833 for (auto & pr : map_pr.second)
834 pr.first = false;
835
836 for (auto & map_pr : _side_qp_to_value)
837 {
838 auto & side_vector = map_pr.second;
839 for (auto & qp_vector : side_vector)
840 for (auto & pr : qp_vector)
841 pr.first = false;
842 }
843
845 _current_qp_map_value = nullptr;
848
849 _elem_arg_to_value.clear();
850 _face_arg_to_value.clear();
851 _node_arg_to_value.clear();
852}
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

◆ customSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 237 of file MooseFunctor.h.

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

◆ declareValue()

const PostprocessorValue & Postprocessor::declareValue ( const MooseObject &  moose_object)
privateinherited

Internal method to be used to declare the value and store it within _current_value in the constructor.

Definition at line 49 of file Postprocessor.C.

50{
51 auto & fe_problem =
52 *moose_object.parameters().getCheckedPointerParam<FEProblemBase *>("_fe_problem_base");
53
55
56 const bool is_thread_0 = moose_object.parameters().get<THREAD_ID>("_tid") == 0;
57 mooseAssert(is_thread_0 ==
58 !fe_problem.getReporterData().hasReporterValue<PostprocessorValue>(r_name),
59 "Postprocessor Reporter threaded value declaration mismatch");
60
61 // Declare the Reporter value on thread 0 only; this lets us add error checking to
62 // make sure that it really is added only once
63 if (is_thread_0)
64 fe_problem.getReporterData(ReporterData::WriteKey())
66 r_name, REPORTER_MODE_UNSET, moose_object);
67
68 // At this point, thread 0 should have declared the value and getting it should be valid
69 return fe_problem.getReporterData().getReporterValue<PostprocessorValue>(r_name);
70}
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
unsigned int THREAD_ID
Definition MooseTypes.h:237
const ReporterMode REPORTER_MODE_UNSET
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
A ReporterName that represents a Postprocessor.
const std::string & _pp_name
Post-processor name.

◆ deduceFunctorName() [1/2]

std::string FunctorInterface::deduceFunctorName ( const std::string &  name) const
protectedinherited

Small helper to look up a functor name through the input parameter keys.

Definition at line 71 of file FunctorInterface.C.

72{
73 return deduceFunctorName(name, _fi_params);
74}
const InputParameters & _fi_params
Parameters of the object with this interface.

◆ deduceFunctorName() [2/2]

std::string FunctorInterface::deduceFunctorName ( const std::string &  name,
const InputParameters &  params 
)
staticinherited

Helper to look up a functor name through the input parameter keys.

Parameters
nameThe input parameter name that we are trying to deduce the functor name for
paramsThe input parameters object that we will be checking for parameters named name
Returns
The functor name

Definition at line 39 of file FunctorInterface.C.

40{
41 if (params.isParamValid(name))
42 {
43 if (params.have_parameter<MooseFunctorName>(name))
44 return params.get<MooseFunctorName>(name);
45 // variables, functor material properties, functions, and post-processors are also functors
46 else if (params.have_parameter<MaterialPropertyName>(name))
47 return params.get<MaterialPropertyName>(name);
48 else if (params.have_parameter<VariableName>(name))
49 return params.get<VariableName>(name);
50 else if (params.have_parameter<std::vector<VariableName>>(name))
51 {
52 const auto & var_names = params.get<std::vector<VariableName>>(name);
53 if (var_names.size() != 1)
54 mooseError("We only support a single variable name for retrieving a functor");
55 return var_names[0];
56 }
57 else if (params.have_parameter<NonlinearVariableName>(name))
58 return params.get<NonlinearVariableName>(name);
59 else if (params.have_parameter<FunctionName>(name))
60 return params.get<FunctionName>(name);
61 else if (params.have_parameter<PostprocessorName>(name))
62 return params.get<PostprocessorName>(name);
63 else
64 mooseError("Invalid parameter type for retrieving a functor");
65 }
66 else
67 return name;
68}
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...

Referenced by FunctorInterface::checkFunctorSupportsSideIntegration(), FunctorInterface::deduceFunctorName(), FunctorInterface::getFunctor(), and FunctorInterface::isFunctor().

◆ defaultFunctor() [1/5]

template<typename T >
const Moose::Functor< T > * FunctorInterface::defaultFunctor ( const std::string &  name)
privateinherited

Helper function to parse default functor values.

This is implemented as a specialization for supported types and returns NULL in all other cases.

Definition at line 254 of file FunctorInterface.h.

255{
256 return nullptr;
257}

◆ defaultFunctor() [2/5]

template<>
const Moose::Functor< Real > * FunctorInterface::defaultFunctor ( const std::string &  name)
privateinherited

◆ defaultFunctor() [3/5]

template<>
const Moose::Functor< ADReal > * FunctorInterface::defaultFunctor ( const std::string &  name)
privateinherited

◆ defaultFunctor() [4/5]

template<>
const Moose::Functor< Real > * FunctorInterface::defaultFunctor ( const std::string &  name)
inherited

Definition at line 78 of file FunctorInterface.C.

79{
80 std::istringstream ss(name);
81 Real real_value;
82
83 // check if the string parsed cleanly into a Real number
84 if (ss >> real_value && ss.eof())
85 {
86 _default_real_functors.emplace_back(std::make_unique<Moose::Functor<Real>>(
87 std::make_unique<Moose::ConstantFunctor<Real>>(real_value)));
88 auto & default_property = _default_real_functors.back();
89 return default_property.get();
90 }
91
92 return nullptr;
93}
std::vector< std::unique_ptr< Moose::Functor< Real > > > _default_real_functors
Storage vector for Moose::Functor<Real> default objects.
Class template for creating constant functors.
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ defaultFunctor() [5/5]

template<>
const Moose::Functor< ADReal > * FunctorInterface::defaultFunctor ( const std::string &  name)
inherited

Definition at line 97 of file FunctorInterface.C.

98{
99 std::istringstream ss(name);
100 Real real_value;
101
102 // check if the string parsed cleanly into a Real number
103 if (ss >> real_value && ss.eof())
104 {
105 _default_ad_real_functors.emplace_back(std::make_unique<Moose::Functor<ADReal>>(
106 std::make_unique<Moose::ConstantFunctor<ADReal>>(real_value)));
107 auto & default_property = _default_ad_real_functors.back();
108 return default_property.get();
109 }
110
111 return nullptr;
112}
std::vector< std::unique_ptr< Moose::Functor< ADReal > > > _default_ad_real_functors
Storage vector for Moose::Functor<ADReal> default objects.

◆ dot() [1/7]

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 211 of file MooseFunctor.h.

939{
940 return evaluateDot(elem, state);
941}
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.

◆ dot() [2/7]

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

Definition at line 215 of file MooseFunctor.h.

968{
969 return evaluateDot(elem_point, state);
970}

◆ dot() [3/7]

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

Definition at line 213 of file MooseFunctor.h.

954{
955 return evaluateDot(elem_qp, state);
956}

◆ dot() [4/7]

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

Definition at line 214 of file MooseFunctor.h.

961{
962 return evaluateDot(elem_side_qp, state);
963}

◆ dot() [5/7]

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

Definition at line 212 of file MooseFunctor.h.

946{
947 checkFace(face);
948 return evaluateDot(face, state);
949}
void checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.

◆ dot() [6/7]

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

Definition at line 216 of file MooseFunctor.h.

975{
976 return evaluateDot(node, state);
977}

◆ dot() [7/7]

FunctorBase< Real >::DotType Moose::FunctorBase< Real >::dot ( const PointArg &  point,
const StateArg &  state 
) const
inherited

Definition at line 217 of file MooseFunctor.h.

982{
983 return evaluateDot(point, state);
984}

◆ evaluate() [1/7]

Postprocessor::ValueType Postprocessor::evaluate ( const ElemArg &  elem,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited

Evaluate the functor with a given element.

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

Implements Moose::FunctorBase< Real >.

Definition at line 73 of file Postprocessor.C.

74{
75 return getCurrentValue();
76}
const PostprocessorValue & getCurrentValue() const

◆ evaluate() [2/7]

Postprocessor::ValueType Postprocessor::evaluate ( const ElemPointArg &  elem_point,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited

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 98 of file Postprocessor.C.

100{
101 return getCurrentValue();
102}

◆ evaluate() [3/7]

Postprocessor::ValueType Postprocessor::evaluate ( const ElemQpArg &  qp,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited
Parameters
qpSee the ElemQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor evaluated at the requested state and space

Implements Moose::FunctorBase< Real >.

Definition at line 85 of file Postprocessor.C.

86{
87 return getCurrentValue();
88}

◆ evaluate() [4/7]

Postprocessor::ValueType Postprocessor::evaluate ( const ElemSideQpArg &  side_qp,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited
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 91 of file Postprocessor.C.

93{
94 return getCurrentValue();
95}

◆ evaluate() [5/7]

Postprocessor::ValueType Postprocessor::evaluate ( const FaceArg &  face,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited
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 79 of file Postprocessor.C.

80{
81 return getCurrentValue();
82}

◆ evaluate() [6/7]

Postprocessor::ValueType Postprocessor::evaluate ( const NodeArg &  node,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited

Implements Moose::FunctorBase< Real >.

Definition at line 105 of file Postprocessor.C.

106{
107 return getCurrentValue();
108}

◆ evaluate() [7/7]

Postprocessor::ValueType Postprocessor::evaluate ( const PointArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited

Evaluate the functor at a physical point without any mesh information.

Functors that need mesh information, e.g. field variables, do not support this

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 111 of file Postprocessor.C.

112{
113 return getCurrentValue();
114}

◆ evaluateDot() [1/7]

Postprocessor::DotType Postprocessor::evaluateDot ( const ElemArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited

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

Definition at line 165 of file Postprocessor.C.

166{
168 return 0;
169}
void evaluateDotWarning() const
Internal method for giving a one-time warning for calling an evaluateDot() method.

◆ evaluateDot() [2/7]

Postprocessor::DotType Postprocessor::evaluateDot ( const ElemPointArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited

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

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 194 of file Postprocessor.C.

196{
198 return 0;
199}

◆ evaluateDot() [3/7]

Postprocessor::DotType Postprocessor::evaluateDot ( const ElemQpArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited
Parameters
qpSee the ElemQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor time derivative evaluated at the requested state and space

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 179 of file Postprocessor.C.

180{
182 return 0;
183}

◆ evaluateDot() [4/7]

Postprocessor::DotType Postprocessor::evaluateDot ( const ElemSideQpArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited
Parameters
side_qpSee the ElemSideQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor time derivative evaluated at the requested state and space

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 186 of file Postprocessor.C.

188{
190 return 0;
191}

◆ evaluateDot() [5/7]

Postprocessor::DotType Postprocessor::evaluateDot ( const FaceArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited
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< Real >.

Definition at line 172 of file Postprocessor.C.

173{
175 return 0;
176}

◆ evaluateDot() [6/7]

Postprocessor::DotType Postprocessor::evaluateDot ( const NodeArg &  node,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 202 of file Postprocessor.C.

203{
205 return 0;
206}

◆ evaluateDot() [7/7]

Postprocessor::DotType Postprocessor::evaluateDot ( const PointArg &  point,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 209 of file Postprocessor.C.

210{
212 return 0;
213}

◆ evaluateDotWarning()

void Postprocessor::evaluateDotWarning ( ) const
privateinherited

Internal method for giving a one-time warning for calling an evaluateDot() method.

Definition at line 216 of file Postprocessor.C.

217{
218 mooseDoOnce(_pp_moose_object.mooseWarning(
219 "The time derivative functor operator was called on this post-processor.\n\nA zero value "
220 "will always be returned, even if the post-processor value changes with time."));
221}
const MooseObject & _pp_moose_object
MOOSE object.
void mooseWarning(Args &&... args) const

Referenced by Postprocessor::evaluateDot(), Postprocessor::evaluateDot(), Postprocessor::evaluateDot(), Postprocessor::evaluateDot(), Postprocessor::evaluateDot(), Postprocessor::evaluateDot(), and Postprocessor::evaluateDot().

◆ evaluateGradDot() [1/7]

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 468 of file MooseFunctor.h.

469 {
470 mooseError("Element gradient-dot not implemented for functor " + functorName());
471 }
const MooseFunctorName & functorName() const
Return the functor name.

◆ evaluateGradDot() [2/7]

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 508 of file MooseFunctor.h.

509 {
510 mooseError("Element-point gradient-dot not implemented for functor " + functorName());
511 }

◆ evaluateGradDot() [3/7]

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 488 of file MooseFunctor.h.

489 {
490 mooseError("Element quadrature point gradient-dot not implemented for functor " +
491 functorName());
492 }

◆ evaluateGradDot() [4/7]

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 499 of file MooseFunctor.h.

500 {
501 mooseError("Element side quadrature point gradient-dot not implemented for functor " +
502 functorName());
503 }

◆ evaluateGradDot() [5/7]

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 478 of file MooseFunctor.h.

479 {
480 mooseError("Face gradient-dot not implemented for functor " + functorName());
481 }

◆ evaluateGradDot() [6/7]

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

Definition at line 513 of file MooseFunctor.h.

514 {
515 mooseError("Gradient-dot at node not implemented for functor " + functorName());
516 }

◆ evaluateGradDot() [7/7]

virtual GradientType Moose::FunctorBase< Real >::evaluateGradDot ( const PointArg &  ,
const StateArg &   
) const
inlineprotectedvirtualinherited

Definition at line 518 of file MooseFunctor.h.

519 {
520 mooseError("Gradient-dot at point not implemented for functor " + functorName());
521 }

◆ evaluateGradient() [1/7]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const ElemArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited

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

Definition at line 117 of file Postprocessor.C.

119{
120 return 0;
121}

◆ evaluateGradient() [2/7]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const ElemPointArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited

Evaluate the functor gradient with a given element and point.

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 144 of file Postprocessor.C.

146{
147 return 0;
148}

◆ evaluateGradient() [3/7]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const ElemQpArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited
Parameters
qpSee the ElemQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient evaluated at the requested state and space

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 130 of file Postprocessor.C.

132{
133 return 0;
134}

◆ evaluateGradient() [4/7]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const ElemSideQpArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited
Parameters
side_qpSee the ElemSideQpArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient evaluated at the requested state and space

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 137 of file Postprocessor.C.

139{
140 return 0;
141}

◆ evaluateGradient() [5/7]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const FaceArg &  ,
const Moose::StateArg &   
) const
finaloverrideprivatevirtualinherited
Parameters
faceSee the FaceArg doxygen
stateSee the StateArg doxygen
Returns
The functor gradient evaluated at the requested state and space

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 124 of file Postprocessor.C.

125{
126 return 0;
127}

◆ evaluateGradient() [6/7]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const NodeArg &  node,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 151 of file Postprocessor.C.

153{
154 return 0;
155}

◆ evaluateGradient() [7/7]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const PointArg &  point,
const Moose::StateArg &  state 
) const
finaloverrideprivatevirtualinherited

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 158 of file Postprocessor.C.

160{
161 return 0;
162}

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

1050{
1051 if constexpr (FET == FunctorEvaluationKind::Value)
1052 return (*this)(r, state);
1053 else if constexpr (FET == FunctorEvaluationKind::Gradient)
1054 return gradient(r, state);
1055 else if constexpr (FET == FunctorEvaluationKind::Dot)
1056 return dot(r, state);
1057 else
1058 return gradDot(r, state);
1059}
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...

◆ getCurrentValue()

const PostprocessorValue & Postprocessor::getCurrentValue ( ) const
inlineinherited
Returns
The "current" value of this Postprocessor.

Your sanity would tell you... why not just call getValue()? Well - the intention of getValue() is to be called by the problem when the UserObjects are executed, and not by other things. This enables the control of when this Postprocessor is updated, which could be very important. If the implementation of getValue() is such that it actually computes a new value (instead of one that is called in finalize()), you could potentially call getValue() and not get the value as it was at the last time this PP was executed.

What this does instead is gives you the value that was last set as this PP was executed by the problem. That is, the value that every object that uses the PostprocessorInterface will get you.

Definition at line 63 of file Postprocessor.h.

63{ return _current_value; }
const PostprocessorValue & _current_value
The current value, which is the Reporter value that changes when we execute UOs in the problem.

Referenced by Postprocessor::evaluate(), Postprocessor::evaluate(), Postprocessor::evaluate(), Postprocessor::evaluate(), Postprocessor::evaluate(), Postprocessor::evaluate(), and Postprocessor::evaluate().

◆ getFunctor() [1/4]

template<typename T >
const Moose::Functor< T > & FunctorInterface::getFunctor ( const std::string &  name)
protectedinherited

Retrieves a functor from the subproblem.

This method also leverages the ability to create default functors if the user passed an integer or real in the input file

Parameters
nameThe name of the functor to retrieve. This should match the functor parameter name, \emph not the actual name of the functor created in the input file
Returns
The functor

Definition at line 217 of file FunctorInterface.h.

218{
219 mooseAssert(_fi_subproblem, "This must be non-null");
220 return getFunctor<T>(name, *_fi_subproblem, _fi_tid);
221}
const THREAD_ID _fi_tid
Current threaded it.
SubProblem *const _fi_subproblem
Pointer to subproblem if the subproblem pointer parameter was set.

Referenced by GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), and ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl().

◆ getFunctor() [2/4]

template<typename T >
const Moose::Functor< T > & FunctorInterface::getFunctor ( const std::string &  name,
SubProblem &  subproblem 
)
protectedinherited

Retrieves a functor from the passed-in subproblem.

This method also leverages the ability to create default functors if the user passed an integer or real in the input file

Parameters
nameThe name of the functor to retrieve. This should match the functor parameter name, \emph not the actual name of the functor created in the input file
subproblemThe subproblem to query for the functor
Returns
The functor

Definition at line 202 of file FunctorInterface.h.

203{
204 return getFunctor<T>(name, subproblem, _fi_tid);
205}

◆ getFunctor() [3/4]

template<typename T >
const Moose::Functor< T > & FunctorInterface::getFunctor ( const std::string &  name,
SubProblem &  subproblem,
THREAD_ID  tid 
)
protectedinherited

Retrieves a functor from the passed-in subproblem.

This method also leverages the ability to create default functors if the user passed an integer or real in the input file

Parameters
nameThe name of the functor to retrieve. This should match the functor parameter name, \emph not the actual name of the functor created in the input file
subproblemThe subproblem to query for the functor
tidThe thread ID used to retrieve the functor from the subproblem
Returns
The functor

Definition at line 193 of file FunctorInterface.h.

194{
195 // Check if the supplied parameter is a valid input parameter key
196 std::string functor_name = deduceFunctorName(name);
197 return getFunctorByName<T>(functor_name, subproblem, tid);
198}

◆ getFunctor() [4/4]

template<typename T >
const Moose::Functor< T > & FunctorInterface::getFunctor ( const std::string &  name,
THREAD_ID  tid 
)
protectedinherited

Retrieves a functor from the subproblem.

This method also leverages the ability to create default functors if the user passed an integer or real in the input file

Parameters
nameThe name of the functor to retrieve. This should match the functor parameter name, \emph not the actual name of the functor created in the input file
tidThe thread ID used to retrieve the functor from this interface's subproblem
Returns
The functor

Definition at line 209 of file FunctorInterface.h.

210{
211 mooseAssert(_fi_subproblem, "This must be non-null");
212 return getFunctor<T>(name, *_fi_subproblem, tid);
213}

◆ getFunctorByName() [1/2]

template<typename T >
const Moose::Functor< T > & FunctorInterface::getFunctorByName ( const std::string &  name)
protectedinherited

Retrieves a functor from the subproblem.

This method also leverages the ability to create default functors if the user passed an integer or real in the input file

Parameters
nameThe name of the functor to retrieve. This should match the actual name of the functor created in the input file
Returns
The functor

Definition at line 225 of file FunctorInterface.h.

226{
227 mooseAssert(_fi_subproblem, "This must be non-null");
228 return getFunctorByName<T>(name, *_fi_subproblem, _fi_tid);
229}

◆ getFunctorByName() [2/2]

template<typename T >
const Moose::Functor< T > & FunctorInterface::getFunctorByName ( const std::string &  name,
SubProblem &  subproblem,
THREAD_ID  tid 
)
privateinherited

Retrieves a functor from the passed-in subproblem.

This method also leverages the ability to create default functors if the user passed an integer or real in the input file

Parameters
nameThe actual name of the functor to retrieve instead of the parameter name
subproblemThe subproblem to query for the functor
tidThe thread ID used to retrieve the functor from the subproblem
Returns
The functor

Definition at line 233 of file FunctorInterface.h.

236{
237 // Check if it's just a constant
238 const auto * const default_functor = defaultFunctor<T>(name);
239 if (default_functor)
240 return *default_functor;
241
242 return subproblem.getFunctor<T>(name, tid, _fi_name, isADObject());
243}
virtual bool isADObject() const =0
Whether this interface is for an AD object.
const std::string _fi_name
The name of the object that this interface belongs to.
const Moose::Functor< T > & getFunctor(const std::string &name, const THREAD_ID tid, const std::string &requestor_name, bool requestor_is_ad)

◆ getOutputs()

const std::set< OutputName > & OutputInterface::getOutputs ( )
inherited

Get the list of output objects that this class is restricted.

Returns
A set of OutputNames

Definition at line 101 of file OutputInterface.C.

102{
103 return _oi_outputs;
104}

◆ getValue()

virtual PostprocessorValue Postprocessor::getValue ( ) const
pure virtualinherited

This will get called to actually grab the final value the postprocessor has calculated.

Note that this should only be called by internal methods, namely the problem that actually sets the value globally for other things to use. If you want the value outside of one of these external methods, you should use getCurrentValue().

Implemented in KokkosExtremeValueBase< KokkosElementVariablePostprocessor >, KokkosExtremeValueBase< KokkosNodalVariablePostprocessor >, KokkosExtremeValueBase< KokkosSideVariablePostprocessor >, KokkosNodalL2Norm, KokkosNodalMaxValueId, KokkosNodalSum, KokkosSumPostprocessor, LibtorchControlValuePostprocessor, AverageElementSize, AverageNodalVariableValue, AverageVariableChange, ChainControlDataPostprocessor, ChangeOverFixedPointPostprocessor, ChangeOverTimePostprocessor, ConstantPostprocessor, CumulativeValuePostprocessor, DifferencePostprocessor, DiscreteVariableResidualNorm, ElementalVariableValue, ElementArrayL2Norm, ElementAverageFunctorPostprocessor, ElementAverageMaterialPropertyTempl< is_ad >, ElementAverageValue, ElementExtremeMaterialPropertyTempl< is_ad >, ElementH1SemiError, ElementIntegralPostprocessor, ElementL2Difference, ElementL2Error, ElementL2FunctorErrorTempl< is_ad >, ElementL2Norm, ElementMaxLevelPostProcessor, ElementSidesL2Norm, ElementVectorL2Error, ElementW1pError, EmptyPostprocessor, ExtremeValueBase< ElementPostprocessor >, ExtremeValueBase< ElementVariablePostprocessor >, ExtremeValueBase< NodalVariablePostprocessor >, ExtremeValueBase< SideVariablePostprocessor >, FindValueOnLine, FunctionElementAverage, FunctionSideAverage, FunctionValuePostprocessor, GreaterThanLessThanPostprocessor, InterfaceAverageVariableValuePostprocessor, InterfaceDiffusiveFluxAverageTempl< is_ad >, InterfaceIntegralPostprocessor, InternalSideIntegralPostprocessor, LinearCombinationPostprocessor, MatrixSymmetryCheck, MemoryUsage, NearestNodeNumber, NodalL2Error, NodalL2Norm, NodalMaxValue, NodalMaxValueId, NodalSum, NodalVariableValue, NumDOFs, NumElements, NumFailedTimeSteps, NumFixedPointIterations, NumLinearIterations, NumMeshDivisions, NumNodes, NumNonlinearIterations, NumPositions, NumRelationshipManagers, NumResidualEvaluations, NumTimeSteps, NumVars, PercentChangePostprocessor, PerfGraphData, PointValue, PostprocessorComparison, PseudoTimestep, Receiver, RelativeDifferencePostprocessor, RelativeSolutionDifferenceNorm, Residual, ScalarL2Error, ScalarVariable, ScalePostprocessor, SideAverageFunctorPostprocessor, SideAverageMaterialPropertyTempl< is_ad >, SideAverageValue, SideDiffusiveFluxAverageTempl< is_ad >, SideIntegralPostprocessor, SumPostprocessor, TagVectorSum, TimeExtremeValue, TimeIntegratedPostprocessor, TimePostprocessor, TimestepSize, TimeWindowedStatisticsPostProcessor, VariableResidual, VectorPostprocessorComparison, VectorPostprocessorComponent, VectorPostprocessorReductionValue, MFEMComplexL2Error, MFEMComplexVectorL2Error, MFEMComplexVectorPeriodAveragedPostprocessor, MFEMElementAverageValue, MFEML2Error, MFEMVectorBoundaryFluxIntegralPostprocessor, MFEMVectorFEInnerProductIntegralPostprocessor, MFEMVectorL2Error, ParsedPostprocessor, NumMeshDivisions, PseudoTimestep, and TagVectorSum.

◆ gradDot() [1/7]

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 225 of file MooseFunctor.h.

989{
990 return evaluateGradDot(elem, state);
991}
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.

◆ gradDot() [2/7]

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

Definition at line 229 of file MooseFunctor.h.

1018{
1019 return evaluateGradDot(elem_point, state);
1020}

◆ gradDot() [3/7]

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

Definition at line 227 of file MooseFunctor.h.

1004{
1005 return evaluateGradDot(elem_qp, state);
1006}

◆ gradDot() [4/7]

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

Definition at line 228 of file MooseFunctor.h.

1011{
1012 return evaluateGradDot(elem_side_qp, state);
1013}

◆ gradDot() [5/7]

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

Definition at line 226 of file MooseFunctor.h.

996{
997 checkFace(face);
998 return evaluateGradDot(face, state);
999}

◆ gradDot() [6/7]

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

Definition at line 230 of file MooseFunctor.h.

1025{
1026 return evaluateGradDot(node, state);
1027}

◆ gradDot() [7/7]

FunctorBase< Real >::GradientType Moose::FunctorBase< Real >::gradDot ( const PointArg &  point,
const StateArg &  state 
) const
inherited

Definition at line 231 of file MooseFunctor.h.

1032{
1033 return evaluateGradDot(point, state);
1034}

◆ gradient() [1/7]

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 197 of file MooseFunctor.h.

889{
890 return evaluateGradient(elem, state);
891}
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.

◆ gradient() [2/7]

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

Definition at line 201 of file MooseFunctor.h.

918{
919 return evaluateGradient(elem_point, state);
920}

◆ gradient() [3/7]

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

Definition at line 199 of file MooseFunctor.h.

904{
905 return evaluateGradient(elem_qp, state);
906}

◆ gradient() [4/7]

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

Definition at line 200 of file MooseFunctor.h.

911{
912 return evaluateGradient(elem_side_qp, state);
913}

◆ gradient() [5/7]

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

Definition at line 198 of file MooseFunctor.h.

896{
897 checkFace(face);
898 return evaluateGradient(face, state);
899}

◆ gradient() [6/7]

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

Definition at line 202 of file MooseFunctor.h.

925{
926 return evaluateGradient(node, state);
927}

◆ gradient() [7/7]

FunctorBase< Real >::GradientType Moose::FunctorBase< Real >::gradient ( const PointArg &  point,
const StateArg &  state 
) const
inherited

Definition at line 203 of file MooseFunctor.h.

932{
933 return evaluateGradient(point, state);
934}

◆ hasBlocks()

virtual bool Postprocessor::hasBlocks ( SubdomainID  ) const
inlineoverridevirtualinherited

Returns whether the functor is defined on this block.

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 70 of file Postprocessor.h.

70{ return true; }

◆ 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 272 of file MooseFunctor.h.

1039{
1040 if (fi_elem_side)
1041 return hasBlocks(fi.elem().subdomain_id());
1042 else
1043 return fi.neighborPtr() && hasBlocks(fi.neighbor().subdomain_id());
1044}
const Elem & elem() const
Definition FaceInfo.h:85
const Elem & neighbor() const
Definition FaceInfo.h:220
virtual bool hasBlocks(SubdomainID) const
Returns whether the functor is defined on this block.

◆ isADObject()

virtual bool NonADFunctorInterface::isADObject ( ) const
inlineoverrideprivatevirtualinherited

Whether this interface is for an AD object.

Implements FunctorInterface.

Definition at line 35 of file NonADFunctorInterface.h.

35{ return false; }

◆ isConstant()

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

Returns true if this functor is a constant.

Definition at line 270 of file MooseFunctor.h.

270{ 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 257 of file MooseFunctor.h.

258 {
259 mooseError("not implemented");
260 }

◆ isFunctor() [1/2]

bool FunctorInterface::isFunctor ( const std::string &  name) const
protectedinherited

Checks the subproblem for the given functor.

This will not query default functors potentially stored in this object, e.g. this method will return false if the user passed an int or real to the functor param in the input file

Parameters
nameThe name of the functor to check. This should match the functor parameter name, \emph not the actual name of the functor created in the input file
Returns
Whether the subproblem has the specified functor

Definition at line 124 of file FunctorInterface.C.

125{
126 mooseAssert(_fi_subproblem, "This must be non-null");
127 return isFunctor(name, *_fi_subproblem);
128}
bool isFunctor(const std::string &name) const
Checks the subproblem for the given functor.

Referenced by FunctorInterface::isFunctor().

◆ isFunctor() [2/2]

bool FunctorInterface::isFunctor ( const std::string &  name,
const SubProblem &  subproblem 
) const
protectedinherited

Checks the passed-in subproblem for the given functor.

This will not query default functors potentially stored in this object, e.g. this method will return false if the user passed an int or real to the functor param in the input file

Parameters
nameThe name of the functor to check. This should match the functor parameter name, \emph not the actual name of the functor created in the input file
subproblemThe subproblem to query for the functor
Returns
Whether the subproblem has the specified functor

Definition at line 115 of file FunctorInterface.C.

116{
117 // Check if the supplied parameter is a valid input parameter key
118 std::string functor_name = deduceFunctorName(name);
119
120 return subproblem.hasFunctor(functor_name, _fi_tid);
121}
bool hasFunctor(const std::string &name, const THREAD_ID tid) const
checks whether we have a functor corresponding to name on the thread id tid

◆ isInternalFace()

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

Returns true if the face is an internal face.

Definition at line 265 of file MooseFunctor.h.

604{
605 if (!fi.neighborPtr())
606 return false;
607
608 return hasBlocks(fi.elem().subdomain_id()) && hasBlocks(fi.neighborPtr()->subdomain_id());
609}

◆ jacobianSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 235 of file MooseFunctor.h.

873{
876}
const ExecFlagType EXEC_NONLINEAR
Definition Moose.C:34

◆ makeElemArg()

Moose::ElemArg FunctorInterface::makeElemArg ( const Elem *  elem,
bool  correct_skewnewss = false 
) const
protectedinherited

◆ operator()() [1/7]

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.

632{
633 if (_always_evaluate)
634 return evaluate(elem, state);
635
636 mooseAssert(state.state == 0,
637 "Cached evaluations are only currently supported for the current state.");
638
639 return queryFVArgCache(_elem_arg_to_value, elem);
640}
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/7]

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

Definition at line 187 of file MooseFunctor.h.

742{
743 return evaluate(elem_point, state);
744}

◆ operator()() [3/7]

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

Definition at line 185 of file MooseFunctor.h.

691{
692 if (_always_evaluate)
693 return evaluate(elem_qp, state);
694
695 const auto elem_id = elem_qp.elem->id();
696 if (elem_id != _current_qp_map_key)
697 {
698 _current_qp_map_key = elem_id;
700 }
701 auto & qp_data = *_current_qp_map_value;
702 const auto qp = elem_qp.qp;
703 const auto * const qrule = elem_qp.qrule;
704 mooseAssert(qrule, "qrule must be non-null");
705
706 return queryQpCache(qp, *qrule, qp_data, elem_qp, state);
707}
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/7]

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

Definition at line 186 of file MooseFunctor.h.

712{
713 if (_always_evaluate)
714 return evaluate(elem_side_qp, state);
715
716 const Elem * const elem = elem_side_qp.elem;
717 mooseAssert(elem, "elem must be non-null");
718 const auto elem_id = elem->id();
719 if (elem_id != _current_side_qp_map_key)
720 {
721 _current_side_qp_map_key = elem_id;
723 }
724 auto & side_qp_data = *_current_side_qp_map_value;
725 const auto side = elem_side_qp.side;
726 const auto qp = elem_side_qp.qp;
727 const auto * const qrule = elem_side_qp.qrule;
728 mooseAssert(qrule, "qrule must be non-null");
729
730 // Check and see whether we even have sized for this side
731 if (side >= side_qp_data.size())
732 side_qp_data.resize(elem->n_sides());
733
734 // Ok we were sized enough for our side
735 auto & qp_data = side_qp_data[side];
736 return queryQpCache(qp, *qrule, qp_data, elem_side_qp, state);
737}

◆ operator()() [5/7]

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

Definition at line 184 of file MooseFunctor.h.

645{
646 checkFace(face_in);
647
648 if (_always_evaluate)
649 return evaluate(face_in, state);
650
651 mooseAssert(state.state == 0,
652 "Cached evaluations are only currently supported for the current state.");
653
654 return queryFVArgCache(_face_arg_to_value, face_in);
655}

◆ operator()() [6/7]

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

Definition at line 188 of file MooseFunctor.h.

759{
760 mooseAssert(node.subdomain_ids, "Subdomain IDs must be supplied to the node argument");
761 return evaluate(node, state);
762}

◆ operator()() [7/7]

FunctorBase< Real >::ValueType Moose::FunctorBase< Real >::operator() ( const PointArg &  point,
const StateArg &  state 
) const
inherited

Definition at line 189 of file MooseFunctor.h.

767{
768 return evaluate(point, state);
769}

◆ PPName()

const std::string & Postprocessor::PPName ( ) const
inlineinherited

Returns the name of the Postprocessor.

Definition at line 68 of file Postprocessor.h.

68{ return _pp_name; }

◆ 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 544 of file MooseFunctor.h.

616{
617 // We don't want to evaluate if the key already exists, so instead we value initialize
618 auto [it, inserted] = cache_data.try_emplace(space, ValueType());
619 auto & value = it->second;
620
621 if (inserted)
622 // value not ready to go
623 // this function is only called from functions that assert we are in the current time state
624 value = evaluate(space, currentState());
625
626 return value;
627}
StateArg currentState()
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ 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 534 of file MooseFunctor.h.

665{
666 // Check and see whether we even have sized for this quadrature point. If we haven't then we
667 // must evaluate
668 if (qp >= qp_cache_data.size())
669 {
670 qp_cache_data.resize(qrule.n_points(), std::make_pair(false, ValueType()));
671 auto & pr = qp_cache_data[qp];
672 pr.second = evaluate(space, state);
673 pr.first = true;
674 return pr.second;
675 }
676
677 // We've already sized for this qp, so let's see whether we have a valid cache value
678 auto & pr = qp_cache_data[qp];
679 if (pr.first)
680 return pr.second;
681
682 // No valid cache value so evaluate
683 pr.second = evaluate(space, state);
684 pr.first = true;
685 return pr.second;
686}
unsigned int n_points() const

◆ residualSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 234 of file MooseFunctor.h.

865{
868}
const ExecFlagType EXEC_LINEAR
Definition Moose.C:32

◆ 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 242 of file MooseFunctor.h.

749{
750 if (clearance_schedule.count(EXEC_ALWAYS))
751 _always_evaluate = true;
752
753 _clearance_schedule = clearance_schedule;
754}
const ExecFlagType EXEC_ALWAYS
Definition Moose.C:54
bool _always_evaluate
Boolean to check if we always need evaluation.

◆ supportsElemSideQpArg()

bool Postprocessor::supportsElemSideQpArg ( ) const
inlinefinaloverridevirtualinherited

Whether this functor supports evaluation with ElemSideQpArg.

Implements Moose::FunctorBase< Real >.

Definition at line 73 of file Postprocessor.h.

73{ return true; }

◆ supportsFaceArg()

bool Postprocessor::supportsFaceArg ( ) const
inlinefinaloverridevirtualinherited

Whether this functor supports evaluation with FaceArg.

Implements Moose::FunctorBase< Real >.

Definition at line 72 of file Postprocessor.h.

72{ return true; }

◆ timestepSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function, MemoryUsage, and NumNonlinearIterations.

Definition at line 236 of file MooseFunctor.h.

857{
860}
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition Moose.C:38

◆ validParams()

static InputParameters Moose::Kokkos::Postprocessor::validParams ( )
static

Member Data Documentation

◆ _always_evaluate

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

Boolean to check if we always need evaluation.

Definition at line 551 of file MooseFunctor.h.

◆ _clearance_schedule

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

How often to clear the material property cache.

Definition at line 548 of file MooseFunctor.h.

◆ _current_qp_map_key

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

Current key for qp map cache.

Definition at line 557 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 560 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 573 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 576 of file MooseFunctor.h.

◆ _current_value

const PostprocessorValue& Postprocessor::_current_value
protectedinherited

The current value, which is the Reporter value that changes when we execute UOs in the problem.

Definition at line 80 of file Postprocessor.h.

Referenced by Postprocessor::getCurrentValue().

◆ _default_ad_real_functors

std::vector<std::unique_ptr<Moose::Functor<ADReal> > > FunctorInterface::_default_ad_real_functors
privateinherited

Storage vector for Moose::Functor<ADReal> default objects.

Definition at line 188 of file FunctorInterface.h.

Referenced by FunctorInterface::defaultFunctor().

◆ _default_real_functors

std::vector<std::unique_ptr<Moose::Functor<Real> > > FunctorInterface::_default_real_functors
privateinherited

Storage vector for Moose::Functor<Real> default objects.

Definition at line 185 of file FunctorInterface.h.

Referenced by FunctorInterface::defaultFunctor().

◆ _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 589 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 592 of file MooseFunctor.h.

◆ _fi_name

const std::string FunctorInterface::_fi_name
privateinherited

The name of the object that this interface belongs to.

Definition at line 176 of file FunctorInterface.h.

Referenced by FunctorInterface::getFunctorByName().

◆ _fi_params

const InputParameters& FunctorInterface::_fi_params
privateinherited

Parameters of the object with this interface.

Definition at line 173 of file FunctorInterface.h.

Referenced by FunctorInterface::deduceFunctorName().

◆ _fi_subproblem

SubProblem* const FunctorInterface::_fi_subproblem
privateinherited

Pointer to subproblem if the subproblem pointer parameter was set.

Definition at line 179 of file FunctorInterface.h.

Referenced by FunctorInterface::getFunctor(), FunctorInterface::getFunctor(), FunctorInterface::getFunctorByName(), and FunctorInterface::isFunctor().

◆ _fi_tid

const THREAD_ID FunctorInterface::_fi_tid
privateinherited

◆ _functor_name

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

name of the functor

Definition at line 598 of file MooseFunctor.h.

◆ _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 595 of file MooseFunctor.h.

◆ _oi_moose_app

MooseApp& OutputInterface::_oi_moose_app
privateinherited

Reference the the MooseApp; neede for access to the OutputWarehouse.

Definition at line 72 of file OutputInterface.h.

◆ _oi_output_warehouse

OutputWarehouse& OutputInterface::_oi_output_warehouse
privateinherited

Reference to the OutputWarehouse for populating the Output object hide lists.

Definition at line 75 of file OutputInterface.h.

Referenced by OutputInterface::buildOutputHideVariableList().

◆ _oi_outputs

std::set<OutputName> OutputInterface::_oi_outputs
privateinherited

The set of Output object names listed in the 'outputs' parameter.

Definition at line 78 of file OutputInterface.h.

Referenced by OutputInterface::buildOutputHideVariableList(), and OutputInterface::getOutputs().

◆ _pp_moose_object

const MooseObject& Postprocessor::_pp_moose_object
privateinherited

MOOSE object.

Definition at line 138 of file Postprocessor.h.

Referenced by Postprocessor::evaluateDotWarning().

◆ _pp_name

const std::string& Postprocessor::_pp_name
protectedinherited

Post-processor name.

Definition at line 77 of file Postprocessor.h.

Referenced by Postprocessor::declareValue(), and Postprocessor::PPName().

◆ _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 567 of file MooseFunctor.h.

◆ _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 586 of file MooseFunctor.h.


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