www.mooseframework.org
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
Postprocessor Class Referenceabstract

Base class for all Postprocessors. More...

#include <Postprocessor.h>

Inheritance diagram for 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). More...
 
using DotType = ValueType
 

Public Member Functions

 Postprocessor (const MooseObject *moose_object)
 
virtual PostprocessorValue getValue () const =0
 This will get called to actually grab the final value the postprocessor has calculated. More...
 
const PostprocessorValuegetCurrentValue () const
 
const std::string & PPName () const
 Returns the name of the Postprocessor. More...
 
virtual bool hasBlocks (SubdomainID) const override
 Returns whether the functor is defined on this block. More...
 
void buildOutputHideVariableList (std::set< std::string > variable_names)
 Builds hide lists for output objects NOT listed in the 'outputs' parameter. More...
 
const std::set< OutputName > & getOutputs ()
 Get the list of output objects that this class is restricted. More...
 
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. More...
 
const MooseFunctorName & functorName () const
 Return the functor name. More...
 
virtual void residualSetup () override
 
virtual void jacobianSetup () override
 
virtual void timestepSetup () override
 
virtual void customSetup (const ExecFlagType &exec_type) override
 
void setCacheClearanceSchedule (const std::set< ExecFlagType > &clearance_schedule)
 Set how often to clear the functor evaluation cache. More...
 
virtual bool isExtrapolatedBoundaryFace (const FaceInfo &, const Elem *, const StateArg &) const
 Returns whether this (sided) face is an extrapolated boundary face for this functor. More...
 
bool isInternalFace (const FaceInfo &) const
 Returns true if the face is an internal face. More...
 
virtual bool isConstant () const
 Returns true if this functor is a constant. More...
 
virtual bool hasFaceSide (const FaceInfo &fi, const bool fi_elem_side) const override
 
Moose::FaceArg checkFace (const Moose::FaceArg &face) const
 Examines the incoming face argument. More...
 
ValueType operator() (const ElemArg &elem, const StateArg &state) const
 Same as their evaluate overloads with the same arguments but allows for caching implementation. More...
 
ValueType operator() (const FaceArg &face, const StateArg &state) const
 
ValueType operator() (const ElemQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemSideQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemPointArg &elem_point, const StateArg &state) const
 
ValueType operator() (const NodeArg &node, const StateArg &state) const
 
GradientType gradient (const ElemArg &elem, const StateArg &state) const
 Same as their evaluateGradient overloads with the same arguments but allows for caching implementation. More...
 
GradientType gradient (const FaceArg &face, const StateArg &state) const
 
GradientType gradient (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradient (const NodeArg &node, const StateArg &state) const
 
DotType dot (const ElemArg &elem, const StateArg &state) const
 Same as their evaluateDot overloads with the same arguments but allows for caching implementation. More...
 
DotType dot (const FaceArg &face, const StateArg &state) const
 
DotType dot (const ElemQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemSideQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemPointArg &elem_point, const StateArg &state) const
 
DotType dot (const NodeArg &node, const StateArg &state) const
 
GradientType gradDot (const ElemArg &elem, const StateArg &state) const
 Same as their evaluateGradDot overloads with the same arguments but allows for caching implementation. More...
 
GradientType gradDot (const FaceArg &face, const StateArg &state) const
 
GradientType gradDot (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradDot (const NodeArg &node, const StateArg &state) const
 

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

Protected Member Functions

std::string deduceFunctorName (const std::string &name) const
 Small helper to look up a functor name through the input parameter keys. More...
 
template<typename T >
const Moose::Functor< T > & getFunctor (const std::string &name)
 Retrieves a functor from the subproblem. More...
 
template<typename T >
const Moose::Functor< T > & getFunctor (const std::string &name, THREAD_ID tid)
 Retrieves a functor from the subproblem. More...
 
template<typename T >
const Moose::Functor< T > & getFunctor (const std::string &name, SubProblem &subproblem)
 Retrieves a functor from the passed-in subproblem. More...
 
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. More...
 
bool isFunctor (const std::string &name) const
 Checks the subproblem for the given functor. More...
 
bool isFunctor (const std::string &name, const SubProblem &subproblem) const
 Checks the passed-in subproblem for the given functor. More...
 
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. More...
 
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. More...
 
virtual GradientType evaluateGradDot (const FaceArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemSideQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemPointArg &, const StateArg &) const
 Evaluate the functor gradient-dot with a given element and point. More...
 
virtual GradientType evaluateGradDot (const NodeArg &, const StateArg &) const
 

Protected Attributes

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

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
 

Private Member Functions

const PostprocessorValuedeclareValue (const MooseObject &moose_object)
 Internal method to be used to declare the value and store it within _current_value in the constructor. More...
 
ValueType evaluate (const ElemArg &elem, const Moose::StateArg &state) const override final
 Evaluate the functor with a given element. More...
 
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. More...
 
ValueType evaluate (const NodeArg &node, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const ElemArg &elem, const Moose::StateArg &state) const override final
 Evaluate the functor gradient with a given element. More...
 
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. More...
 
GradientType evaluateGradient (const NodeArg &node, 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. More...
 
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. More...
 
DotType evaluateDot (const NodeArg &node, const Moose::StateArg &state) const override final
 
void evaluateDotWarning () const
 Internal method for giving a one-time warning for calling an evaluateDot() method. More...
 

Private Attributes

const MooseObject_pp_moose_object
 MOOSE object. More...
 

Detailed Description

Base class for all Postprocessors.

Defines a name and sets up the virtual getValue() interface which must be overridden by derived classes.

Definition at line 23 of file Postprocessor.h.

Member Typedef Documentation

◆ DotType

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

Definition at line 150 of file MooseFunctor.h.

◆ ElemArg

Definition at line 79 of file Postprocessor.h.

◆ ElemPointArg

Definition at line 83 of file Postprocessor.h.

◆ ElemQpArg

Definition at line 80 of file Postprocessor.h.

◆ ElemSideQpArg

Definition at line 81 of file Postprocessor.h.

◆ FaceArg

Definition at line 82 of file Postprocessor.h.

◆ FunctorType

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

Definition at line 84 of file Postprocessor.h.

◆ ValueType

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

Definition at line 141 of file MooseFunctor.h.

Constructor & Destructor Documentation

◆ Postprocessor()

Postprocessor::Postprocessor ( const MooseObject moose_object)

Definition at line 30 of file Postprocessor.C.

31  : OutputInterface(moose_object->parameters()),
32  NonADFunctorInterface(moose_object),
33  Moose::FunctorBase<Real>(moose_object->name()),
34  _pp_name(moose_object->name()),
35  _current_value(declareValue(*moose_object)),
36  _pp_moose_object(*moose_object)
37 {
38 }
OutputInterface(const InputParameters &parameters, bool build_list=true)
Handles &#39;outputs&#39; parameter for objects that desire control of variable outputs.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
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...
Definition: Postprocessor.C:41
const std::string & _pp_name
Post-processor name.
Definition: Postprocessor.h:67
const PostprocessorValue & _current_value
The current value, which is the Reporter value that changes when we execute UOs in the problem...
Definition: Postprocessor.h:70
const MooseObject & _pp_moose_object
MOOSE object.
NonADFunctorInterface(const MooseObject *moose_object)
const InputParameters & parameters() const
Get the parameters of the object.

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 61 of file OutputInterface.C.

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

62 {
63  // Set of available names
64  const std::set<OutputName> & avail = _oi_output_warehouse.getOutputNames();
65 
66  // Check for 'none'; hide variables on all outputs
67  if (_oi_outputs.find("none") != _oi_outputs.end())
68  for (const auto & name : avail)
69  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
70 
71  // Check for empty and 'all' in 'outputs' parameter; do not perform any variable restrictions in
72  // these cases
73  else if (_oi_outputs.empty() || _oi_outputs.find("all") != _oi_outputs.end())
74  return;
75 
76  // Limit the variable output to Output objects listed
77  else
78  {
79  // Create a list of outputs where the variable should be hidden
80  std::set<OutputName> hide;
81  std::set_difference(avail.begin(),
82  avail.end(),
83  _oi_outputs.begin(),
84  _oi_outputs.end(),
85  std::inserter(hide, hide.begin()));
86 
87  // If 'outputs' is specified add the object name to the list of items to hide
88  for (const auto & name : hide)
89  _oi_output_warehouse.addInterfaceHideVariables(name, variable_names);
90  }
91 }
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 &#39;outputs&#39; parameter.
const std::set< OutputName > & getOutputNames()
Get a complete set of all output object names.
void addInterfaceHideVariables(const std::string &output_name, const std::set< std::string > &variable_names)
Insert variable names for hiding via the OutoutInterface.

◆ checkFace()

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

714 {
715  const Elem * const elem = face.face_side;
716  const FaceInfo * const fi = face.fi;
717  mooseAssert(fi, "face info should be non-null");
718  auto ret_face = face;
719  bool check_elem_def = false;
720  bool check_neighbor_def = false;
721  if (!elem)
722  {
723  if (!hasFaceSide(*fi, true))
724  {
725  ret_face.face_side = fi->neighborPtr();
726  check_neighbor_def = true;
727  }
728  else if (!hasFaceSide(*fi, false))
729  {
730  ret_face.face_side = fi->elemPtr();
731  check_elem_def = true;
732  }
733  }
734  else if (elem == fi->elemPtr())
735  check_elem_def = true;
736  else
737  {
738  mooseAssert(elem == fi->neighborPtr(), "This has to match something");
739  check_neighbor_def = true;
740  }
741 
742  if (check_elem_def && !hasFaceSide(*fi, true))
743  {
744  std::string additional_message = "It is not defined on the neighbor side either.";
745  if (hasFaceSide(*fi, false))
746  additional_message = "It is however defined on the neighbor side.";
747  additional_message += " Face centroid: " + Moose::stringify(fi->faceCentroid());
749  " is not defined on the element side of the face information, but a face argument "
750  "producer "
751  "(e.g. residual object, postprocessor, etc.) has requested evaluation there.\n",
752  additional_message);
753  }
754  if (check_neighbor_def && !hasFaceSide(*fi, false))
755  {
756  std::string additional_message = "It is not defined on the element side either.";
757  if (hasFaceSide(*fi, true))
758  additional_message = "It is however defined on the element side.";
759  additional_message += " Face centroid: " + Moose::stringify(fi->faceCentroid());
760  mooseError(
762  " is not defined on the neighbor side of the face information, but a face argument "
763  "producer (e.g. residual object, postprocessor, etc.) has requested evaluation there.\n",
764  additional_message);
765  }
766 
767  return ret_face;
768 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
Definition: FaceInfo.h:70
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:35
const Elem * neighborPtr() const
Definition: FaceInfo.h:83
MooseFunctorName _functor_name
name of the functor
Definition: MooseFunctor.h:549
const FaceInfo * fi
a face information object which defines our location in space
const Elem * face_side
A member that can be used to indicate whether there is a sidedness to this face.
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
const Elem * elemPtr() const
Definition: FaceInfo.h:81
virtual bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const override
Definition: MooseFunctor.h:956

◆ customSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 822 of file MooseFunctor.h.

823 {
824  if (_clearance_schedule.count(exec_type))
825  clearCacheData();
826 }
void clearCacheData()
clear cache data
Definition: MooseFunctor.h:772
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

◆ declareValue()

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

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

Definition at line 41 of file Postprocessor.C.

42 {
43  auto & fe_problem =
44  *moose_object.parameters().getCheckedPointerParam<FEProblemBase *>("_fe_problem_base");
45 
46  const PostprocessorReporterName r_name(_pp_name);
47 
48  const bool is_thread_0 = moose_object.parameters().get<THREAD_ID>("_tid") == 0;
49  mooseAssert(is_thread_0 ==
50  !fe_problem.getReporterData().hasReporterValue<PostprocessorValue>(r_name),
51  "Postprocessor Reporter threaded value declaration mismatch");
52 
53  // Declare the Reporter value on thread 0 only; this lets us add error checking to
54  // make sure that it really is added only once
55  if (is_thread_0)
56  fe_problem.getReporterData(ReporterData::WriteKey())
58  r_name, REPORTER_MODE_UNSET, moose_object);
59 
60  // At this point, thread 0 should have declared the value and getting it should be valid
61  return fe_problem.getReporterData().getReporterValue<PostprocessorValue>(r_name);
62 }
const ReporterMode REPORTER_MODE_UNSET
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...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const std::string & _pp_name
Post-processor name.
Definition: Postprocessor.h:67
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:191
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int THREAD_ID
Definition: MooseTypes.h:198

◆ deduceFunctorName() [1/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 28 of file FunctorInterface.C.

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

29 {
30  if (params.isParamValid(name))
31  {
32  if (params.have_parameter<MooseFunctorName>(name))
33  return params.get<MooseFunctorName>(name);
34  // variables, functor material properties, functions, and post-processors are also functors
35  else if (params.have_parameter<MaterialPropertyName>(name))
36  return params.get<MaterialPropertyName>(name);
37  else if (params.have_parameter<VariableName>(name))
38  return params.get<VariableName>(name);
39  else if (params.have_parameter<std::vector<VariableName>>(name))
40  {
41  const auto & var_names = params.get<std::vector<VariableName>>(name);
42  if (var_names.size() != 1)
43  mooseError("We only support a single variable name for retrieving a functor");
44  return var_names[0];
45  }
46  else if (params.have_parameter<NonlinearVariableName>(name))
47  return params.get<NonlinearVariableName>(name);
48  else if (params.have_parameter<FunctionName>(name))
49  return params.get<FunctionName>(name);
50  else if (params.have_parameter<PostprocessorName>(name))
51  return params.get<PostprocessorName>(name);
52  else
53  mooseError("Invalid parameter type for retrieving a functor");
54  }
55  else
56  return name;
57 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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.
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, i.e.

◆ deduceFunctorName() [2/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 60 of file FunctorInterface.C.

61 {
62  return deduceFunctorName(name, _fi_params);
63 }
const InputParameters & _fi_params
Parameters of the object with this interface.
static std::string deduceFunctorName(const std::string &name, const InputParameters &params)
Helper to look up a functor name through the input parameter keys.

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

873 {
874  return evaluateDot(elem, state);
875 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:373

◆ dot() [2/6]

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

Definition at line 879 of file MooseFunctor.h.

880 {
881  return evaluateDot(checkFace(face), state);
882 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:373
Moose::FaceArg checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
Definition: MooseFunctor.h:713

◆ dot() [3/6]

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

Definition at line 886 of file MooseFunctor.h.

887 {
888  return evaluateDot(elem_qp, state);
889 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:373

◆ dot() [4/6]

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

Definition at line 893 of file MooseFunctor.h.

894 {
895  return evaluateDot(elem_side_qp, state);
896 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:373

◆ dot() [5/6]

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

Definition at line 900 of file MooseFunctor.h.

901 {
902  return evaluateDot(elem_point, state);
903 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:373

◆ dot() [6/6]

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

Definition at line 907 of file MooseFunctor.h.

908 {
909  return evaluateDot(node, state);
910 }
virtual DotType evaluateDot(const ElemArg &, const StateArg &) const
Evaluate the functor time derivative with a given element.
Definition: MooseFunctor.h:373

◆ evaluate() [1/6]

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

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

66 {
67  return getCurrentValue();
68 }
const PostprocessorValue & getCurrentValue() const
Definition: Postprocessor.h:56

◆ evaluate() [2/6]

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

72 {
73  return getCurrentValue();
74 }
const PostprocessorValue & getCurrentValue() const
Definition: Postprocessor.h:56

◆ evaluate() [3/6]

Postprocessor::ValueType Postprocessor::evaluate ( const ElemQpArg qp,
const Moose::StateArg state 
) const
finaloverrideprivatevirtual
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 77 of file Postprocessor.C.

78 {
79  return getCurrentValue();
80 }
const PostprocessorValue & getCurrentValue() const
Definition: Postprocessor.h:56

◆ evaluate() [4/6]

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

85 {
86  return getCurrentValue();
87 }
const PostprocessorValue & getCurrentValue() const
Definition: Postprocessor.h:56

◆ evaluate() [5/6]

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

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

92 {
93  return getCurrentValue();
94 }
const PostprocessorValue & getCurrentValue() const
Definition: Postprocessor.h:56

◆ evaluate() [6/6]

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

Implements Moose::FunctorBase< Real >.

Definition at line 97 of file Postprocessor.C.

98 {
99  return getCurrentValue();
100 }
const PostprocessorValue & getCurrentValue() const
Definition: Postprocessor.h:56

◆ evaluateDot() [1/6]

Postprocessor::DotType Postprocessor::evaluateDot ( const ElemArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual

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

145 {
147  return 0;
148 }
void evaluateDotWarning() const
Internal method for giving a one-time warning for calling an evaluateDot() method.

◆ evaluateDot() [2/6]

Postprocessor::DotType Postprocessor::evaluateDot ( const FaceArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual
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 151 of file Postprocessor.C.

152 {
154  return 0;
155 }
void evaluateDotWarning() const
Internal method for giving a one-time warning for calling an evaluateDot() method.

◆ evaluateDot() [3/6]

Postprocessor::DotType Postprocessor::evaluateDot ( const ElemQpArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual
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 158 of file Postprocessor.C.

159 {
161  return 0;
162 }
void evaluateDotWarning() const
Internal method for giving a one-time warning for calling an evaluateDot() method.

◆ evaluateDot() [4/6]

Postprocessor::DotType Postprocessor::evaluateDot ( const ElemSideQpArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual
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 165 of file Postprocessor.C.

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

◆ evaluateDot() [5/6]

Postprocessor::DotType Postprocessor::evaluateDot ( const ElemPointArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual

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

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 173 of file Postprocessor.C.

175 {
177  return 0;
178 }
void evaluateDotWarning() const
Internal method for giving a one-time warning for calling an evaluateDot() method.

◆ evaluateDot() [6/6]

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

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 181 of file Postprocessor.C.

182 {
184  return 0;
185 }
void evaluateDotWarning() const
Internal method for giving a one-time warning for calling an evaluateDot() method.

◆ evaluateDotWarning()

void Postprocessor::evaluateDotWarning ( ) const
private

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

Definition at line 188 of file Postprocessor.C.

Referenced by evaluateDot().

189 {
190  mooseDoOnce(_pp_moose_object.mooseWarning(
191  "The time derivative functor operator was called on this post-processor.\n\nA zero value "
192  "will always be returned, even if the post-processor value changes with time."));
193 }
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
const MooseObject & _pp_moose_object
MOOSE object.

◆ 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

Reimplemented in Moose::FunctorEnvelope< Real >.

Definition at line 427 of file MooseFunctor.h.

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

◆ evaluateGradDot() [2/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

Reimplemented in Moose::FunctorEnvelope< Real >.

Definition at line 437 of file MooseFunctor.h.

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

◆ 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

Reimplemented in Moose::FunctorEnvelope< Real >.

Definition at line 447 of file MooseFunctor.h.

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

◆ 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

Reimplemented in Moose::FunctorEnvelope< Real >.

Definition at line 458 of file MooseFunctor.h.

459  {
460  mooseError("Element side quadrature point gradient-dot not implemented for functor " +
461  functorName());
462  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
const MooseFunctorName & functorName() const
Return the functor name.
Definition: MooseFunctor.h:168

◆ evaluateGradDot() [5/6]

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

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

Reimplemented in Moose::FunctorEnvelope< Real >.

Definition at line 467 of file MooseFunctor.h.

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

◆ evaluateGradDot() [6/6]

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

Reimplemented in Moose::FunctorEnvelope< Real >.

Definition at line 472 of file MooseFunctor.h.

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

◆ evaluateGradient() [1/6]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const ElemArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual

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

105 {
106  return 0;
107 }

◆ evaluateGradient() [2/6]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const FaceArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual
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 110 of file Postprocessor.C.

111 {
112  return 0;
113 }

◆ evaluateGradient() [3/6]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const ElemQpArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual
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 116 of file Postprocessor.C.

118 {
119  return 0;
120 }

◆ evaluateGradient() [4/6]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const ElemSideQpArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual
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 123 of file Postprocessor.C.

125 {
126  return 0;
127 }

◆ evaluateGradient() [5/6]

Postprocessor::GradientType Postprocessor::evaluateGradient ( const ElemPointArg ,
const Moose::StateArg  
) const
finaloverrideprivatevirtual

Evaluate the functor gradient with a given element and point.

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 130 of file Postprocessor.C.

132 {
133  return 0;
134 }

◆ evaluateGradient() [6/6]

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

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 137 of file Postprocessor.C.

139 {
140  return 0;
141 }

◆ functorName()

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

Return the functor name.

Definition at line 168 of file MooseFunctor.h.

168 { return _functor_name; }
MooseFunctorName _functor_name
name of the functor
Definition: MooseFunctor.h:549

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

968 {
969  if constexpr (FET == FunctorEvaluationKind::Value)
970  return (*this)(r, state);
971  else if constexpr (FET == FunctorEvaluationKind::Gradient)
972  return gradient(r, state);
973  else if constexpr (FET == FunctorEvaluationKind::Dot)
974  return dot(r, state);
975  else
976  return gradDot(r, state);
977 }
GradientType gradDot(const ElemArg &elem, const StateArg &state) const
Same as their evaluateGradDot overloads with the same arguments but allows for caching implementation...
Definition: MooseFunctor.h:914
DotType dot(const ElemArg &elem, const StateArg &state) const
Same as their evaluateDot overloads with the same arguments but allows for caching implementation...
Definition: MooseFunctor.h:872
GradientType gradient(const ElemArg &elem, const StateArg &state) const
Same as their evaluateGradient overloads with the same arguments but allows for caching implementatio...
Definition: MooseFunctor.h:830

◆ getCurrentValue()

const PostprocessorValue& Postprocessor::getCurrentValue ( ) const
inline
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 56 of file Postprocessor.h.

Referenced by evaluate().

56 { return _current_value; }
const PostprocessorValue & _current_value
The current value, which is the Reporter value that changes when we execute UOs in the problem...
Definition: Postprocessor.h:70

◆ 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, not the actual name of the functor created in the input file
Returns
The functor

Definition at line 191 of file FunctorInterface.h.

Referenced by MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl().

192 {
193  mooseAssert(_fi_subproblem, "This must be non-null");
194  return getFunctor<T>(name, *_fi_subproblem, _fi_tid);
195 }
std::string name(const ElemQuality q)
SubProblem *const _fi_subproblem
Pointer to subproblem if the subproblem pointer parameter was set.
const THREAD_ID _fi_tid
Current threaded it.

◆ getFunctor() [2/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, 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 183 of file FunctorInterface.h.

184 {
185  mooseAssert(_fi_subproblem, "This must be non-null");
186  return getFunctor<T>(name, *_fi_subproblem, tid);
187 }
std::string name(const ElemQuality q)
SubProblem *const _fi_subproblem
Pointer to subproblem if the subproblem pointer parameter was set.

◆ getFunctor() [3/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, 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 176 of file FunctorInterface.h.

177 {
178  return getFunctor<T>(name, subproblem, _fi_tid);
179 }
std::string name(const ElemQuality q)
const THREAD_ID _fi_tid
Current threaded it.

◆ getFunctor() [4/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, 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 167 of file FunctorInterface.h.

168 {
169  // Check if the supplied parameter is a valid input parameter key
170  std::string functor_name = deduceFunctorName(name);
171  return getFunctorByName<T>(functor_name, subproblem, tid);
172 }
static std::string deduceFunctorName(const std::string &name, const InputParameters &params)
Helper to look up a functor name through the input parameter keys.

◆ 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 94 of file OutputInterface.C.

95 {
96  return _oi_outputs;
97 }
std::set< OutputName > _oi_outputs
The set of Output object names listed in the &#39;outputs&#39; parameter.

◆ getValue()

virtual PostprocessorValue Postprocessor::getValue ( ) const
pure virtual

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 LibtorchControlValuePostprocessor, TimeExtremeValue, RelativeSolutionDifferenceNorm, Receiver, RelativeDifferencePostprocessor, VectorPostprocessorComparison, PostprocessorComparison, ElementW1pError, NumNonlinearIterations, ScalarL2Error, NodalVariableValue, TagVectorSum, LinearCombinationPostprocessor, ElementExtremeMaterialPropertyTempl< is_ad >, FindValueOnLine, ElementalVariableValue, GreaterThanLessThanPostprocessor, MemoryUsage, ElementIntegralPostprocessor, FunctionValuePostprocessor, InternalSideIntegralPostprocessor, NumDOFs, NumMeshDivisions, PointValue, SideDiffusiveFluxAverageTempl< is_ad >, SideIntegralPostprocessor, CumulativeValuePostprocessor, ElementAverageValue, InterfaceDiffusiveFluxAverageTempl< is_ad >, InterfaceIntegralPostprocessor, NodalL2Norm, NumPositions, SideAverageValue, AverageElementSize, ChangeOverFixedPointPostprocessor, ChangeOverTimePostprocessor, DifferencePostprocessor, ElementAverageMaterialPropertyTempl< is_ad >, ElementH1SemiError, ElementVectorL2Error, NumFixedPointIterations, ParsedPostprocessor, SideAverageMaterialPropertyTempl< is_ad >, NearestNodeNumber, NodalL2Error, NodalMaxValue, NodalSum, NumFailedTimeSteps, NumNodes, NumResidualEvaluations, PercentChangePostprocessor, PseudoTimestep, Residual, TimePostprocessor, TimestepSize, ConstantPostprocessor, FunctionElementAverage, FunctionSideAverage, InterfaceAverageVariableValuePostprocessor, NodalMaxValueId, ScalarVariable, ScalePostprocessor, TimeIntegratedPostprocessor, ElementL2FunctorErrorTempl< is_ad >, ElementSidesL2Norm, NumVars, AverageNodalVariableValue, ElementL2Difference, NumElems, NumLinearIterations, NumRelationshipManagers, PerfGraphData, VariableResidual, VectorPostprocessorComponent, VectorPostprocessorReductionValue, ElementL2Error, EmptyPostprocessor, ExtremeValueBase< ElementPostprocessor >, ExtremeValueBase< ElementVariablePostprocessor >, ExtremeValueBase< NodalVariablePostprocessor >, ExtremeValueBase< SideVariablePostprocessor >, ElementArrayL2Norm, and ElementL2Norm.

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

915 {
916  return evaluateGradDot(elem, state);
917 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:427

◆ gradDot() [2/6]

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

Definition at line 921 of file MooseFunctor.h.

922 {
923  return evaluateGradDot(checkFace(face), state);
924 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:427
Moose::FaceArg checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
Definition: MooseFunctor.h:713

◆ gradDot() [3/6]

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

Definition at line 928 of file MooseFunctor.h.

929 {
930  return evaluateGradDot(elem_qp, state);
931 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:427

◆ gradDot() [4/6]

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

Definition at line 935 of file MooseFunctor.h.

936 {
937  return evaluateGradDot(elem_side_qp, state);
938 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:427

◆ gradDot() [5/6]

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

Definition at line 942 of file MooseFunctor.h.

943 {
944  return evaluateGradDot(elem_point, state);
945 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:427

◆ gradDot() [6/6]

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

Definition at line 949 of file MooseFunctor.h.

950 {
951  return evaluateGradDot(node, state);
952 }
virtual GradientType evaluateGradDot(const ElemArg &, const StateArg &) const
Evaluate the functor gradient-dot with a given element.
Definition: MooseFunctor.h:427

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

831 {
832  return evaluateGradient(elem, state);
833 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:320

◆ gradient() [2/6]

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

Definition at line 837 of file MooseFunctor.h.

838 {
839  return evaluateGradient(checkFace(face), state);
840 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:320
Moose::FaceArg checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
Definition: MooseFunctor.h:713

◆ gradient() [3/6]

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

Definition at line 844 of file MooseFunctor.h.

845 {
846  return evaluateGradient(elem_qp, state);
847 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:320

◆ gradient() [4/6]

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

Definition at line 851 of file MooseFunctor.h.

852 {
853  return evaluateGradient(elem_side_qp, state);
854 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:320

◆ gradient() [5/6]

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

Definition at line 858 of file MooseFunctor.h.

859 {
860  return evaluateGradient(elem_point, state);
861 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:320

◆ gradient() [6/6]

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

Definition at line 865 of file MooseFunctor.h.

866 {
867  return evaluateGradient(node, state);
868 }
virtual GradientType evaluateGradient(const ElemArg &, const StateArg &) const
Evaluate the functor gradient with a given element.
Definition: MooseFunctor.h:320

◆ hasBlocks()

virtual bool Postprocessor::hasBlocks ( SubdomainID  ) const
inlineoverridevirtual

Returns whether the functor is defined on this block.

Reimplemented from Moose::FunctorBase< Real >.

Definition at line 63 of file Postprocessor.h.

63 { return true; }

◆ hasFaceSide()

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

Implements FaceArgInterface.

Reimplemented in Moose::FunctorEnvelope< Real >, InternalSideIntegralVariablePostprocessor, InterfaceIntegralVariableValuePostprocessor, SideIntegralVariablePostprocessor, and SideIntegralFunctorPostprocessorTempl< is_ad >.

Definition at line 956 of file MooseFunctor.h.

957 {
958  if (fi_elem_side)
959  return hasBlocks(fi.elem().subdomain_id());
960  else
961  return fi.neighborPtr() && hasBlocks(fi.neighbor().subdomain_id());
962 }
virtual bool hasBlocks(SubdomainID) const
Returns whether the functor is defined on this block.
Definition: MooseFunctor.h:235
const Elem & elem() const
Definition: FaceInfo.h:80
const Elem * neighborPtr() const
Definition: FaceInfo.h:83
const Elem & neighbor() const
Definition: FaceInfo.h:205

◆ isConstant()

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

Returns true if this functor is a constant.

Reimplemented in Moose::FunctorEnvelope< Real >.

Definition at line 258 of file MooseFunctor.h.

258 { 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.

Reimplemented in Moose::FunctorEnvelope< Real >.

Definition at line 245 of file MooseFunctor.h.

246  {
247  mooseError("not implemented");
248  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284

◆ 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, not the actual name of the functor created in the input file
Returns
Whether the subproblem has the specified functor

Definition at line 113 of file FunctorInterface.C.

114 {
115  mooseAssert(_fi_subproblem, "This must be non-null");
116  return isFunctor(name, *_fi_subproblem);
117 }
SubProblem *const _fi_subproblem
Pointer to subproblem if the subproblem pointer parameter was set.
bool isFunctor(const std::string &name) const
Checks the subproblem for the given functor.

◆ 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, 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 104 of file FunctorInterface.C.

105 {
106  // Check if the supplied parameter is a valid input parameter key
107  std::string functor_name = deduceFunctorName(name);
108 
109  return subproblem.hasFunctor(functor_name, _fi_tid);
110 }
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
Definition: SubProblem.C:1215
const THREAD_ID _fi_tid
Current threaded it.
static std::string deduceFunctorName(const std::string &name, const InputParameters &params)
Helper to look up a functor name through the input parameter keys.

◆ isInternalFace()

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

Returns true if the face is an internal face.

Definition at line 554 of file MooseFunctor.h.

555 {
556  if (!fi.neighborPtr())
557  return false;
558 
559  return hasBlocks(fi.elem().subdomain_id()) && hasBlocks(fi.neighborPtr()->subdomain_id());
560 }
virtual bool hasBlocks(SubdomainID) const
Returns whether the functor is defined on this block.
Definition: MooseFunctor.h:235
const Elem & elem() const
Definition: FaceInfo.h:80
const Elem * neighborPtr() const
Definition: FaceInfo.h:83

◆ jacobianSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 814 of file MooseFunctor.h.

815 {
817  clearCacheData();
818 }
const ExecFlagType EXEC_NONLINEAR
Definition: Moose.C:30
void clearCacheData()
clear cache data
Definition: MooseFunctor.h:772
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

◆ makeElemArg()

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

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

583 {
584  if (_clearance_schedule.count(EXEC_ALWAYS))
585  return evaluate(elem, state);
586 
587  mooseAssert(state.state == 0,
588  "Cached evaluations are only currently supported for the current state.");
589 
590  return queryFVArgCache(_elem_arg_to_value, elem);
591 }
const ExecFlagType EXEC_ALWAYS
Definition: Moose.C:43
ValueType queryFVArgCache(std::map< SpaceArg, ValueType > &cache_data, const SpaceArg &space) const
check a finite volume spatial argument cache and if invalid then evaluate
Definition: MooseFunctor.h:565
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.
std::map< ElemArg, ValueType > _elem_arg_to_value
Map from element arguments to their cached evaluations.
Definition: MooseFunctor.h:540
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

◆ operator()() [2/6]

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

Definition at line 595 of file MooseFunctor.h.

596 {
597  const auto face = checkFace(face_in);
598 
599  if (_clearance_schedule.count(EXEC_ALWAYS))
600  return evaluate(face, state);
601 
602  mooseAssert(state.state == 0,
603  "Cached evaluations are only currently supported for the current state.");
604 
605  return queryFVArgCache(_face_arg_to_value, face);
606 }
std::map< FaceArg, ValueType > _face_arg_to_value
Map from face arguments to their cached evaluations.
Definition: MooseFunctor.h:543
const ExecFlagType EXEC_ALWAYS
Definition: Moose.C:43
ValueType queryFVArgCache(std::map< SpaceArg, ValueType > &cache_data, const SpaceArg &space) const
check a finite volume spatial argument cache and if invalid then evaluate
Definition: MooseFunctor.h:565
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.
Moose::FaceArg checkFace(const Moose::FaceArg &face) const
Examines the incoming face argument.
Definition: MooseFunctor.h:713
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

◆ operator()() [3/6]

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

Definition at line 641 of file MooseFunctor.h.

642 {
643  if (_clearance_schedule.count(EXEC_ALWAYS))
644  return evaluate(elem_qp, state);
645 
646  const auto elem_id = elem_qp.elem->id();
647  if (elem_id != _current_qp_map_key)
648  {
649  _current_qp_map_key = elem_id;
651  }
652  auto & qp_data = *_current_qp_map_value;
653  const auto qp = elem_qp.qp;
654  const auto * const qrule = elem_qp.qrule;
655  mooseAssert(qrule, "qrule must be non-null");
656 
657  return queryQpCache(qp, *qrule, qp_data, elem_qp, state);
658 }
dof_id_type _current_qp_map_key
Current key for qp map cache.
Definition: MooseFunctor.h:508
const ExecFlagType EXEC_ALWAYS
Definition: Moose.C:43
std::vector< std::pair< bool, ValueType > > * _current_qp_map_value
Current value for qp map cache.
Definition: MooseFunctor.h:511
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.
ValueType queryQpCache(unsigned int qp, const 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
Definition: MooseFunctor.h:611
std::unordered_map< dof_id_type, std::vector< std::pair< bool, ValueType > > > _qp_to_value
Cached element quadrature point functor property evaluations.
Definition: MooseFunctor.h:518
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

◆ operator()() [4/6]

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

Definition at line 662 of file MooseFunctor.h.

663 {
664  if (_clearance_schedule.count(EXEC_ALWAYS))
665  return evaluate(elem_side_qp, state);
666 
667  const Elem * const elem = elem_side_qp.elem;
668  mooseAssert(elem, "elem must be non-null");
669  const auto elem_id = elem->id();
670  if (elem_id != _current_side_qp_map_key)
671  {
672  _current_side_qp_map_key = elem_id;
674  }
675  auto & side_qp_data = *_current_side_qp_map_value;
676  const auto side = elem_side_qp.side;
677  const auto qp = elem_side_qp.qp;
678  const auto * const qrule = elem_side_qp.qrule;
679  mooseAssert(qrule, "qrule must be non-null");
680 
681  // Check and see whether we even have sized for this side
682  if (side >= side_qp_data.size())
683  side_qp_data.resize(elem->n_sides());
684 
685  // Ok we were sized enough for our side
686  auto & qp_data = side_qp_data[side];
687  return queryQpCache(qp, *qrule, qp_data, elem_side_qp, state);
688 }
const ExecFlagType EXEC_ALWAYS
Definition: Moose.C:43
std::unordered_map< dof_id_type, std::vector< std::vector< std::pair< bool, ValueType > > > > _side_qp_to_value
Cached element quadrature point functor property evaluations.
Definition: MooseFunctor.h:537
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.
dof_id_type _current_side_qp_map_key
Current key for side-qp map cache.
Definition: MooseFunctor.h:524
std::vector< std::vector< std::pair< bool, ValueType > > > * _current_side_qp_map_value
Current value for side-qp map cache.
Definition: MooseFunctor.h:527
ValueType queryQpCache(unsigned int qp, const 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
Definition: MooseFunctor.h:611
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

◆ operator()() [5/6]

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

Definition at line 692 of file MooseFunctor.h.

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

◆ operator()() [6/6]

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

Definition at line 706 of file MooseFunctor.h.

707 {
708  return evaluate(node, state);
709 }
virtual ValueType evaluate(const ElemArg &elem, const StateArg &state) const=0
Evaluate the functor with a given element.

◆ PPName()

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

Returns the name of the Postprocessor.

Definition at line 61 of file Postprocessor.h.

61 { return _pp_name; }
const std::string & _pp_name
Post-processor name.
Definition: Postprocessor.h:67

◆ residualSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function.

Definition at line 806 of file MooseFunctor.h.

807 {
808  if (_clearance_schedule.count(EXEC_LINEAR))
809  clearCacheData();
810 }
const ExecFlagType EXEC_LINEAR
Definition: Moose.C:29
void clearCacheData()
clear cache data
Definition: MooseFunctor.h:772
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

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

700 {
701  _clearance_schedule = clearance_schedule;
702 }
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

◆ timestepSetup()

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

Implements Moose::FunctorAbstract.

Reimplemented in Function, NumNonlinearIterations, and MemoryUsage.

Definition at line 798 of file MooseFunctor.h.

799 {
801  clearCacheData();
802 }
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition: Moose.C:33
void clearCacheData()
clear cache data
Definition: MooseFunctor.h:772
std::set< ExecFlagType > _clearance_schedule
How often to clear the material property cache.
Definition: MooseFunctor.h:502

◆ validParams()

InputParameters Postprocessor::validParams ( )
static

Definition at line 17 of file Postprocessor.C.

Referenced by ElementPostprocessor::validParams(), InternalSidePostprocessor::validParams(), NodalPostprocessor::validParams(), SidePostprocessor::validParams(), GeneralPostprocessor::validParams(), and InterfacePostprocessor::validParams().

18 {
20  params += OutputInterface::validParams();
22  ExecFlagEnum & exec_enum = params.set<ExecFlagEnum>("execute_on", true);
24 
25  params.addParamNamesToGroup("outputs", "Advanced");
26  params.registerBase("Postprocessor");
27  return params;
28 }
const ExecFlagType EXEC_TRANSFER
Definition: Moose.C:47
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
static InputParameters validParams()
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
Add additional execute_on flags to the list of possible flags.
Definition: ExecFlagEnum.h:82
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System...
static InputParameters validParams()
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...
static InputParameters validParams()
Definition: UserObject.C:18

Member Data Documentation

◆ _current_value

const PostprocessorValue& Postprocessor::_current_value
protected

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

Definition at line 70 of file Postprocessor.h.

Referenced by getCurrentValue().

◆ _pp_moose_object

const MooseObject& Postprocessor::_pp_moose_object
private

MOOSE object.

Definition at line 123 of file Postprocessor.h.

Referenced by evaluateDotWarning().

◆ _pp_name

const std::string& Postprocessor::_pp_name
protected

Post-processor name.

Definition at line 67 of file Postprocessor.h.

Referenced by declareValue(), and PPName().


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