Interface class for classes which interact with Postprocessors. More...
#include <PostprocessorInterface.h>
Public Member Functions | |
PostprocessorInterface (const MooseObject *moose_object) | |
PostprocessorInterface (const FEProblemBase *problem) | |
bool | isDefaultPostprocessorValue (const std::string ¶m_name, const unsigned int index=0) const |
Determine whether or not the Postprocessor is a default value. More... | |
bool | hasPostprocessor (const std::string ¶m_name, const unsigned int index=0) const |
Determine if the Postprocessor data exists. More... | |
bool | hasPostprocessorByName (const PostprocessorName &name) const |
Determine if the Postprocessor data exists. More... | |
std::size_t | coupledPostprocessors (const std::string ¶m_name) const |
Returns number of Postprocessors coupled under parameter name. More... | |
const PostprocessorName & | getPostprocessorName (const std::string ¶m_name, const unsigned int index=0) const |
Get the name of a postprocessor. More... | |
const PostprocessorValue & | getPostprocessorValue (const std::string ¶m_name, const unsigned int index=0) const |
doco-normal-methods-begin Retrieve the value of a Postprocessor or one of it's old or older values More... | |
const PostprocessorValue & | getPostprocessorValueOld (const std::string ¶m_name, const unsigned int index=0) const |
const PostprocessorValue & | getPostprocessorValueOlder (const std::string ¶m_name, const unsigned int index=0) const |
virtual const PostprocessorValue & | getPostprocessorValueByName (const PostprocessorName &name) const |
Retrieve the value of the Postprocessor. More... | |
const PostprocessorValue & | getPostprocessorValueOldByName (const PostprocessorName &name) const |
const PostprocessorValue & | getPostprocessorValueOlderByName (const PostprocessorName &name) const |
Static Public Member Functions | |
static InputParameters | validParams () |
Protected Member Functions | |
virtual void | addPostprocessorDependencyHelper (const PostprocessorName &) const |
Helper for deriving classes to override to add dependencies when a Postprocessor is requested. More... | |
Private Member Functions | |
const PostprocessorName & | getPostprocessorNameInternal (const std::string ¶m_name, const unsigned int index, const bool allow_default_value=true) const |
Internal method for getting the PostprocessorName associated with a paremeter. More... | |
bool | isDefaultPostprocessorValueByName (const PostprocessorName &name) const |
PostprocessorValue | getDefaultPostprocessorValueByName (const PostprocessorName &name) const |
void | checkParam (const std::string ¶m_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const |
Checks the parameters relating to a Postprocessor. More... | |
bool | postprocessorsAdded () const |
const PostprocessorValue & | getPostprocessorValueInternal (const std::string ¶m_name, unsigned int index, std::size_t t_index) const |
Internal methods for getting Postprocessor values. More... | |
const PostprocessorValue & | getPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const |
Private Attributes | |
const MooseObject & | _ppi_moose_object |
The MooseObject that uses this interface. More... | |
const InputParameters & | _ppi_params |
PostprocessorInterface Parameters. More... | |
const FEProblemBase & | _ppi_feproblem |
Reference the the FEProblemBase class. More... | |
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > | _default_values |
Holds the default postprocessor values that are requested (key is PostprocessorName) More... | |
Interface class for classes which interact with Postprocessors.
Provides the getPostprocessorValueXYZ() and related interfaces.
Definition at line 34 of file PostprocessorInterface.h.
PostprocessorInterface::PostprocessorInterface | ( | const MooseObject * | moose_object | ) |
Definition at line 21 of file PostprocessorInterface.C.
PostprocessorInterface::PostprocessorInterface | ( | const FEProblemBase * | problem | ) |
Definition at line 28 of file PostprocessorInterface.C.
|
inlineprotectedvirtual |
Helper for deriving classes to override to add dependencies when a Postprocessor is requested.
Reimplemented in AuxKernelTempl< ComputeValueType >, AuxKernelTempl< RT >, AuxKernelTempl< RealVectorValue >, AuxKernelTempl< Real >, UserObject, and InitialConditionBase.
Definition at line 141 of file PostprocessorInterface.h.
Referenced by getPostprocessorValueByNameInternal().
|
private |
Checks the parameters relating to a Postprocessor.
If index
is not set, index checking is not performed.
Definition at line 139 of file PostprocessorInterface.C.
Referenced by coupledPostprocessors(), and getPostprocessorNameInternal().
std::size_t PostprocessorInterface::coupledPostprocessors | ( | const std::string & | param_name | ) | const |
Returns number of Postprocessors coupled under parameter name.
param_name | The name of the Postprocessor parameter |
Definition at line 129 of file PostprocessorInterface.C.
Referenced by FunctionValuePostprocessor::FunctionValuePostprocessor().
|
private |
name
. Definition at line 96 of file PostprocessorInterface.C.
Referenced by getPostprocessorValueInternal().
const PostprocessorName & PostprocessorInterface::getPostprocessorName | ( | const std::string & | param_name, |
const unsigned int | index = 0 |
||
) | const |
Get the name of a postprocessor.
This can only be used if the postprocessor parameter does not have a default value set (see isDefaultPostprocessorValue()), in which case the "name" is actually the default value.
param_name | The name of the Postprocessor parameter |
index | The index of the Postprocessor |
Definition at line 185 of file PostprocessorInterface.C.
Referenced by EigenKernel::EigenKernel().
|
private |
Internal method for getting the PostprocessorName associated with a paremeter.
Needed in order to allow the return of a name that is a default value.
Definition at line 192 of file PostprocessorInterface.C.
Referenced by getPostprocessorName(), getPostprocessorValueInternal(), hasPostprocessor(), and isDefaultPostprocessorValue().
const PostprocessorValue & PostprocessorInterface::getPostprocessorValue | ( | const std::string & | param_name, |
const unsigned int | index = 0 |
||
) | const |
doco-normal-methods-begin Retrieve the value of a Postprocessor or one of it's old or older values
param_name | The name of the Postprocessor parameter (see below) |
index | The index of the Postprocessor |
The name required by this method is the name that is hard-coded into your source code. For example, if you have a Kernel that requires a Postprocessor you may have an input file with "pp = my_pp", this function requires the "pp" name as input (see .../moose_test/functions/PostprocessorFunction.C)
see getPostprocessorValueByName getPostprocessorValueOldByName getPostprocessorValueOlderByName
Definition at line 36 of file PostprocessorInterface.C.
Referenced by EigenKernel::EigenKernel(), FunctionValuePostprocessor::FunctionValuePostprocessor(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), ParsedPostprocessor::ParsedPostprocessor(), and PicardSolve::PicardSolve().
|
virtual |
Retrieve the value of the Postprocessor.
name | Postprocessor name (see below) |
The name required by this method is the name defined in the input file. For example, if you have a Kernel that requires a Postprocessor you may have an input file with "pp = my_pp", this method requires the "my_pp" name as input (see .../moose_test/functions/PostprocessorFunction.C)
see getPostprocessorValue getPostprocessorValueOld getPostprocessorValueOlder
Definition at line 57 of file PostprocessorInterface.C.
Referenced by EigenKernel::EigenKernel(), PIDTransientControl::execute(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), ParsedODEKernel::ParsedODEKernel(), SecantSolve::savePostprocessorValues(), SteffensenSolve::savePostprocessorValues(), PicardSolve::savePostprocessorValues(), Terminator::Terminator(), SecantSolve::transformPostprocessors(), SteffensenSolve::transformPostprocessors(), PicardSolve::transformPostprocessors(), and VectorOfPostprocessors::VectorOfPostprocessors().
|
private |
Definition at line 246 of file PostprocessorInterface.C.
Referenced by getPostprocessorValueByName(), getPostprocessorValueInternal(), getPostprocessorValueOldByName(), and getPostprocessorValueOlderByName().
|
private |
Internal methods for getting Postprocessor values.
Definition at line 218 of file PostprocessorInterface.C.
Referenced by getPostprocessorValue(), getPostprocessorValueOld(), and getPostprocessorValueOlder().
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOld | ( | const std::string & | param_name, |
const unsigned int | index = 0 |
||
) | const |
Definition at line 43 of file PostprocessorInterface.C.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOldByName | ( | const PostprocessorName & | name | ) | const |
Definition at line 63 of file PostprocessorInterface.C.
Referenced by EigenKernel::EigenKernel().
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlder | ( | const std::string & | param_name, |
const unsigned int | index = 0 |
||
) | const |
Definition at line 50 of file PostprocessorInterface.C.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlderByName | ( | const PostprocessorName & | name | ) | const |
Definition at line 69 of file PostprocessorInterface.C.
bool PostprocessorInterface::hasPostprocessor | ( | const std::string & | param_name, |
const unsigned int | index = 0 |
||
) | const |
Determine if the Postprocessor data exists.
param_name | The name of the Postprocessor parameter |
index | The index of the Postprocessor |
Definition at line 107 of file PostprocessorInterface.C.
bool PostprocessorInterface::hasPostprocessorByName | ( | const PostprocessorName & | name | ) | const |
Determine if the Postprocessor data exists.
name | The name of the Postprocessor |
Definition at line 118 of file PostprocessorInterface.C.
Referenced by getPostprocessorValueByNameInternal(), getPostprocessorValueInternal(), hasPostprocessor(), AdvancedOutput::initShowHideLists(), TableOutput::outputReporters(), and Exodus::outputReporters().
bool PostprocessorInterface::isDefaultPostprocessorValue | ( | const std::string & | param_name, |
const unsigned int | index = 0 |
||
) | const |
Determine whether or not the Postprocessor is a default value.
A default value is when the value is either the value set by addParam, or is a user-set value in input instead of a name to a postprocessor.
param_name | The name of the Postprocessor parameter |
index | The index of the postprocessor |
Definition at line 75 of file PostprocessorInterface.C.
Referenced by EigenKernel::EigenKernel().
|
private |
name
repesents a default value: the name converts to a value (set by addParam or set via input), and a Postprocessor does not exist with the same name (we do allow Postprocessors with numbered names...) Definition at line 82 of file PostprocessorInterface.C.
Referenced by getDefaultPostprocessorValueByName(), getPostprocessorNameInternal(), getPostprocessorValueByNameInternal(), getPostprocessorValueInternal(), and isDefaultPostprocessorValue().
|
private |
Definition at line 264 of file PostprocessorInterface.C.
Referenced by getPostprocessorValueByNameInternal(), getPostprocessorValueInternal(), hasPostprocessor(), and hasPostprocessorByName().
|
static |
Definition at line 16 of file PostprocessorInterface.C.
Referenced by FVInterfaceKernel::validParams().
|
mutableprivate |
Holds the default postprocessor values that are requested (key is PostprocessorName)
Definition at line 154 of file PostprocessorInterface.h.
Referenced by getPostprocessorValueInternal().
|
private |
Reference the the FEProblemBase class.
Definition at line 151 of file PostprocessorInterface.h.
Referenced by getPostprocessorValueByNameInternal(), hasPostprocessorByName(), isDefaultPostprocessorValueByName(), and postprocessorsAdded().
|
private |
The MooseObject that uses this interface.
Definition at line 145 of file PostprocessorInterface.h.
Referenced by checkParam(), getPostprocessorNameInternal(), getPostprocessorValueByNameInternal(), getPostprocessorValueInternal(), hasPostprocessor(), and hasPostprocessorByName().
|
private |
PostprocessorInterface Parameters.
Definition at line 148 of file PostprocessorInterface.h.
Referenced by checkParam(), coupledPostprocessors(), and getPostprocessorNameInternal().