www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
PostprocessorInterface Class Reference

Interface class for classes which interact with Postprocessors. More...

#include <PostprocessorInterface.h>

Inheritance diagram for PostprocessorInterface:
[legend]

Public Member Functions

 PostprocessorInterface (const MooseObject *moose_object)
 
 PostprocessorInterface (const FEProblemBase *problem)
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 Determine whether or not the Postprocessor is a default value. More...
 
bool hasPostprocessor (const std::string &param_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 &param_name) const
 Returns number of Postprocessors coupled under parameter name. More...
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 Get the name of a postprocessor. More...
 
const PostprocessorValuegetPostprocessorValue (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 More...
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 Retrieve the value of the Postprocessor. More...
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (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 &param_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 &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
 Checks the parameters relating to a Postprocessor. More...
 
bool postprocessorsAdded () const
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 Internal methods for getting Postprocessor values. More...
 
const PostprocessorValuegetPostprocessorValueByNameInternal (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...
 

Detailed Description

Interface class for classes which interact with Postprocessors.

Provides the getPostprocessorValueXYZ() and related interfaces.

Definition at line 34 of file PostprocessorInterface.h.

Constructor & Destructor Documentation

◆ PostprocessorInterface() [1/2]

PostprocessorInterface::PostprocessorInterface ( const MooseObject moose_object)

Definition at line 21 of file PostprocessorInterface.C.

22  : _ppi_moose_object(*moose_object),
25 {
26 }
const FEProblemBase & _ppi_feproblem
Reference the the FEProblemBase class.
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 MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
const InputParameters & parameters() const
Get the parameters of the object.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.

◆ PostprocessorInterface() [2/2]

PostprocessorInterface::PostprocessorInterface ( const FEProblemBase problem)

Definition at line 28 of file PostprocessorInterface.C.

29  : _ppi_moose_object(*problem),
31  _ppi_feproblem(*problem)
32 {
33 }
const FEProblemBase & _ppi_feproblem
Reference the the FEProblemBase class.
const MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
const InputParameters & parameters() const
Get the parameters of the object.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.

Member Function Documentation

◆ addPostprocessorDependencyHelper()

virtual void PostprocessorInterface::addPostprocessorDependencyHelper ( const PostprocessorName &  ) const
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().

141 {}

◆ checkParam()

void PostprocessorInterface::checkParam ( const std::string &  param_name,
const unsigned int  index = std::numeric_limits<unsigned int>::max() 
) const
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().

142 {
143  const bool check_index = index != std::numeric_limits<unsigned int>::max();
144 
145  if (!_ppi_params.isParamValid(param_name))
147  "When getting a Postprocessor, failed to get a parameter with the name \"",
148  param_name,
149  "\".",
150  "\n\nKnown parameters:\n",
152 
153  if (_ppi_params.isType<PostprocessorName>(param_name))
154  {
155  if (check_index && index > 0)
156  _ppi_moose_object.paramError(param_name,
157  "A Postprocessor was requested with index ",
158  index,
159  " but a single Postprocessor is coupled.");
160  }
161  else if (_ppi_params.isType<std::vector<PostprocessorName>>(param_name))
162  {
163  const auto & names = _ppi_params.get<std::vector<PostprocessorName>>(param_name);
164  if (check_index && names.size() <= index)
165  _ppi_moose_object.paramError(param_name,
166  "A Postprocessor was requested with index ",
167  index,
168  " but only ",
169  names.size(),
170  " Postprocessors are coupled.");
171  }
172  else
173  {
175  "Supplied parameter with name \"",
176  param_name,
177  "\" of type \"",
178  _ppi_params.type(param_name),
179  "\" is not an expected type for getting a Postprocessor.\n\n",
180  "Allowed types are \"PostprocessorName\" and \"std::vector<PostprocessorName>\".");
181  }
182 }
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.
auto max(const L &left, const R &right)
const MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
bool isType(const std::string &name) const
std::string type(const std::string &name) const
Prints the type of the requested parameter by name.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ coupledPostprocessors()

std::size_t PostprocessorInterface::coupledPostprocessors ( const std::string &  param_name) const

Returns number of Postprocessors coupled under parameter name.

Parameters
param_nameThe name of the Postprocessor parameter
Returns
Number of coupled post-processors, 1 if it's a single

Definition at line 129 of file PostprocessorInterface.C.

Referenced by FunctionValuePostprocessor::FunctionValuePostprocessor().

130 {
131  checkParam(param_name);
132 
133  if (_ppi_params.isType<PostprocessorName>(param_name))
134  return 1;
135  return _ppi_params.get<std::vector<PostprocessorName>>(param_name).size();
136 }
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.
void checkParam(const std::string &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
Checks the parameters relating to a Postprocessor.
bool isType(const std::string &name) const
const InputParameters & _ppi_params
PostprocessorInterface Parameters.

◆ getDefaultPostprocessorValueByName()

PostprocessorValue PostprocessorInterface::getDefaultPostprocessorValueByName ( const PostprocessorName &  name) const
private
Returns
The default value stored in the PostprocessorName name.

Definition at line 96 of file PostprocessorInterface.C.

Referenced by getPostprocessorValueInternal().

97 {
98  mooseAssert(isDefaultPostprocessorValueByName(name), "Not a default value");
99 
100  Real real_value = -std::numeric_limits<Real>::max();
101  std::istringstream ss(name);
102  ss >> real_value;
103  return real_value;
104 }
bool isDefaultPostprocessorValueByName(const PostprocessorName &name) const
auto max(const L &left, const R &right)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ getPostprocessorName()

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.

Parameters
param_nameThe name of the Postprocessor parameter
indexThe index of the Postprocessor
Returns
The name of the given Postprocessor

Definition at line 185 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

187 {
188  return getPostprocessorNameInternal(param_name, index, /* allow_default_value = */ false);
189 }
const PostprocessorName & getPostprocessorNameInternal(const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
Internal method for getting the PostprocessorName associated with a paremeter.

◆ getPostprocessorNameInternal()

const PostprocessorName & PostprocessorInterface::getPostprocessorNameInternal ( const std::string &  param_name,
const unsigned int  index,
const bool  allow_default_value = true 
) const
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().

196 {
197  checkParam(param_name, index);
198 
199  const auto & name = _ppi_params.isType<PostprocessorName>(param_name)
200  ? _ppi_params.get<PostprocessorName>(param_name)
201  : _ppi_params.get<std::vector<PostprocessorName>>(param_name)[index];
202 
203  if (!allow_default_value && isDefaultPostprocessorValueByName(name))
204  {
205  std::stringstream oss;
206  oss << "Cannot get the name associated with PostprocessorName parameter \"" << param_name
207  << "\"";
208  if (index)
209  oss << " at index " << index;
210  oss << ",\nbecause said parameter is a default Postprocessor value.";
211  _ppi_moose_object.paramError(param_name, oss.str());
212  }
213 
214  return name;
215 }
std::string name(const ElemQuality q)
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 isDefaultPostprocessorValueByName(const PostprocessorName &name) const
const MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
void checkParam(const std::string &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
Checks the parameters relating to a Postprocessor.
bool isType(const std::string &name) const
const InputParameters & _ppi_params
PostprocessorInterface Parameters.

◆ getPostprocessorValue()

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

Parameters
param_nameThe name of the Postprocessor parameter (see below)
indexThe index of the Postprocessor
Returns
A reference to the desired value

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().

38 {
39  return getPostprocessorValueInternal(param_name, index, /* t_index = */ 0);
40 }
const PostprocessorValue & getPostprocessorValueInternal(const std::string &param_name, unsigned int index, std::size_t t_index) const
Internal methods for getting Postprocessor values.

◆ getPostprocessorValueByName()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueByName ( const PostprocessorName &  name) const
virtual

Retrieve the value of the Postprocessor.

Parameters
namePostprocessor name (see below)
Returns
A reference to the desired value

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().

58 {
59  return getPostprocessorValueByNameInternal(name, /* t_index = */ 0);
60 }
const PostprocessorValue & getPostprocessorValueByNameInternal(const PostprocessorName &name, std::size_t t_index) const

◆ getPostprocessorValueByNameInternal()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueByNameInternal ( const PostprocessorName &  name,
std::size_t  t_index 
) const
private

Definition at line 246 of file PostprocessorInterface.C.

Referenced by getPostprocessorValueByName(), getPostprocessorValueInternal(), getPostprocessorValueOldByName(), and getPostprocessorValueOlderByName().

248 {
249  mooseAssert(t_index < 3, "Invalid time index");
250  mooseAssert(!isDefaultPostprocessorValueByName(name), "Should not be default");
251 
252  // If all pps have been added, we can check for existance
254  _ppi_moose_object.mooseError("A Postprocessor with the name \"", name, "\" was not found.");
255 
256  if (t_index == 0)
258 
261 }
const FEProblemBase & _ppi_feproblem
Reference the the FEProblemBase class.
const ReporterMode REPORTER_MODE_ROOT
bool isDefaultPostprocessorValueByName(const PostprocessorName &name) const
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
const T & getReporterValue(const ReporterName &reporter_name, const MooseObject &consumer, const ReporterMode &mode, const std::size_t time_index=0) const
Method for returning read only references to Reporter values.
Definition: ReporterData.h:379
bool hasPostprocessorByName(const PostprocessorName &name) const
Determine if the Postprocessor data exists.
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:191
const MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134
virtual void addPostprocessorDependencyHelper(const PostprocessorName &) const
Helper for deriving classes to override to add dependencies when a Postprocessor is requested...
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getPostprocessorValueInternal()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueInternal ( const std::string &  param_name,
unsigned int  index,
std::size_t  t_index 
) const
private

Internal methods for getting Postprocessor values.

Definition at line 218 of file PostprocessorInterface.C.

Referenced by getPostprocessorValue(), getPostprocessorValueOld(), and getPostprocessorValueOlder().

221 {
222  const auto & name = getPostprocessorNameInternal(param_name, index);
223 
224  // If the Postprocessor is a default value (either set by addParam or set to a constant
225  // value by the user in input/an action), we covert the name to a value, store said
226  // value locally, and return it so that it fits in with the rest of the interface
227  // (needing a reference to a value)
229  {
230  const auto value = getDefaultPostprocessorValueByName(name);
231  const auto & value_ref =
232  *_default_values.emplace(name, std::make_unique<PostprocessorValue>(value))
233  .first->second; // first is inserted pair, second is value in pair
234  mooseAssert(value == value_ref, "Inconsistent default value");
235  return value_ref;
236  }
237  // If not a default and all pps have been added, we check check for existance
238  else if (postprocessorsAdded() && !hasPostprocessorByName(name))
240  param_name, "A Postprocessor with the name \"", name, "\" was not found.");
241 
242  return getPostprocessorValueByNameInternal(name, t_index);
243 }
std::string name(const ElemQuality q)
bool isDefaultPostprocessorValueByName(const PostprocessorName &name) const
PostprocessorValue getDefaultPostprocessorValueByName(const PostprocessorName &name) const
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
const PostprocessorName & getPostprocessorNameInternal(const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
Internal method for getting the PostprocessorName associated with a paremeter.
bool hasPostprocessorByName(const PostprocessorName &name) const
Determine if the Postprocessor data exists.
const MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
const PostprocessorValue & getPostprocessorValueByNameInternal(const PostprocessorName &name, std::size_t t_index) const
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > _default_values
Holds the default postprocessor values that are requested (key is PostprocessorName) ...

◆ getPostprocessorValueOld()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOld ( const std::string &  param_name,
const unsigned int  index = 0 
) const

Definition at line 43 of file PostprocessorInterface.C.

45 {
46  return getPostprocessorValueInternal(param_name, index, /* t_index = */ 1);
47 }
const PostprocessorValue & getPostprocessorValueInternal(const std::string &param_name, unsigned int index, std::size_t t_index) const
Internal methods for getting Postprocessor values.

◆ getPostprocessorValueOldByName()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOldByName ( const PostprocessorName &  name) const

Definition at line 63 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

64 {
65  return getPostprocessorValueByNameInternal(name, /* t_index = */ 1);
66 }
const PostprocessorValue & getPostprocessorValueByNameInternal(const PostprocessorName &name, std::size_t t_index) const

◆ getPostprocessorValueOlder()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlder ( const std::string &  param_name,
const unsigned int  index = 0 
) const

Definition at line 50 of file PostprocessorInterface.C.

52 {
53  return getPostprocessorValueInternal(param_name, index, /* t_index = */ 2);
54 }
const PostprocessorValue & getPostprocessorValueInternal(const std::string &param_name, unsigned int index, std::size_t t_index) const
Internal methods for getting Postprocessor values.

◆ getPostprocessorValueOlderByName()

const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlderByName ( const PostprocessorName &  name) const

Definition at line 69 of file PostprocessorInterface.C.

70 {
71  return getPostprocessorValueByNameInternal(name, /* t_index = */ 2);
72 }
const PostprocessorValue & getPostprocessorValueByNameInternal(const PostprocessorName &name, std::size_t t_index) const

◆ hasPostprocessor()

bool PostprocessorInterface::hasPostprocessor ( const std::string &  param_name,
const unsigned int  index = 0 
) const

Determine if the Postprocessor data exists.

Parameters
param_nameThe name of the Postprocessor parameter
indexThe index of the Postprocessor
Returns
True if the Postprocessor exists
See also
hasPostprocessorByName getPostprocessorValue

Definition at line 107 of file PostprocessorInterface.C.

109 {
110  if (!postprocessorsAdded())
112  "Cannot call hasPostprocessor() until all Postprocessors have been constructed.");
113 
114  return hasPostprocessorByName(getPostprocessorNameInternal(param_name, index));
115 }
const PostprocessorName & getPostprocessorNameInternal(const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
Internal method for getting the PostprocessorName associated with a paremeter.
bool hasPostprocessorByName(const PostprocessorName &name) const
Determine if the Postprocessor data exists.
const MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ hasPostprocessorByName()

bool PostprocessorInterface::hasPostprocessorByName ( const PostprocessorName &  name) const

Determine if the Postprocessor data exists.

Parameters
nameThe name of the Postprocessor
Returns
True if the Postprocessor exists
See also
hasPostprocessor getPostprocessorValueByName

Definition at line 118 of file PostprocessorInterface.C.

Referenced by getPostprocessorValueByNameInternal(), getPostprocessorValueInternal(), hasPostprocessor(), AdvancedOutput::initShowHideLists(), TableOutput::outputReporters(), and Exodus::outputReporters().

119 {
120  if (!postprocessorsAdded())
122  "Cannot call hasPostprocessorByName() until all Postprocessors have been constructed.");
123 
126 }
const FEProblemBase & _ppi_feproblem
Reference the the FEProblemBase class.
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:191
const MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
Definition: ReporterData.h:436

◆ isDefaultPostprocessorValue()

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.

Parameters
param_nameThe name of the Postprocessor parameter
indexThe index of the postprocessor
Returns
True if the Postprocessor is a default value, false if the Postprocessor is the name of a Postprocessor

Definition at line 75 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

77 {
79 }
bool isDefaultPostprocessorValueByName(const PostprocessorName &name) const
const PostprocessorName & getPostprocessorNameInternal(const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
Internal method for getting the PostprocessorName associated with a paremeter.

◆ isDefaultPostprocessorValueByName()

bool PostprocessorInterface::isDefaultPostprocessorValueByName ( const PostprocessorName &  name) const
private
Returns
True if the PostprocessorName 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().

83 {
84  // We do allow actual Postprocessor objects to have names that will succeed in being
85  // represented as a double... so if the name does actually exist as a PP, it's not a default
88  return false;
89 
90  std::istringstream ss(name);
91  Real real_value = -std::numeric_limits<Real>::max();
92  return (ss >> real_value && ss.eof());
93 }
const FEProblemBase & _ppi_feproblem
Reference the the FEProblemBase class.
auto max(const L &left, const R &right)
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:191
A ReporterName that represents a Postprocessor.
Definition: ReporterName.h:134
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
Definition: ReporterData.h:436

◆ postprocessorsAdded()

bool PostprocessorInterface::postprocessorsAdded ( ) const
private
Returns
True if all pps have been added (the task associated with adding them is complete)

Definition at line 264 of file PostprocessorInterface.C.

Referenced by getPostprocessorValueByNameInternal(), getPostprocessorValueInternal(), hasPostprocessor(), and hasPostprocessorByName().

265 {
266  return _ppi_feproblem.getMooseApp().actionWarehouse().isTaskComplete("add_postprocessor");
267 }
const FEProblemBase & _ppi_feproblem
Reference the the FEProblemBase class.
bool isTaskComplete(const std::string &task) const
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:44
ActionWarehouse & actionWarehouse()
Return a writable reference to the ActionWarehouse associated with this app.
Definition: MooseApp.h:206

◆ validParams()

InputParameters PostprocessorInterface::validParams ( )
static

Definition at line 16 of file PostprocessorInterface.C.

Referenced by FVInterfaceKernel::validParams().

17 {
18  return emptyInputParameters();
19 }
InputParameters emptyInputParameters()

Member Data Documentation

◆ _default_values

std::map<PostprocessorName, std::unique_ptr<PostprocessorValue> > PostprocessorInterface::_default_values
mutableprivate

Holds the default postprocessor values that are requested (key is PostprocessorName)

Definition at line 154 of file PostprocessorInterface.h.

Referenced by getPostprocessorValueInternal().

◆ _ppi_feproblem

const FEProblemBase& PostprocessorInterface::_ppi_feproblem
private

◆ _ppi_moose_object

const MooseObject& PostprocessorInterface::_ppi_moose_object
private

◆ _ppi_params

const InputParameters& PostprocessorInterface::_ppi_params
private

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