22 : _ppi_moose_object(*moose_object),
23 _ppi_params(_ppi_moose_object.parameters()),
24 _ppi_feproblem(*_ppi_params.getCheckedPointerParam<
FEProblemBase *>(
"_fe_problem_base"))
29 : _ppi_moose_object(*problem),
30 _ppi_params(_ppi_moose_object.parameters()),
31 _ppi_feproblem(*problem)
37 const unsigned int index )
const 44 const unsigned int index )
const 51 const unsigned int index )
const 76 const unsigned int index )
const 90 std::istringstream ss(
name);
92 return (ss >> real_value && ss.eof());
101 std::istringstream ss(
name);
108 const unsigned int index )
const 112 "Cannot call hasPostprocessor() until all Postprocessors have been constructed.");
122 "Cannot call hasPostprocessorByName() until all Postprocessors have been constructed.");
135 return _ppi_params.
get<std::vector<PostprocessorName>>(param_name).size();
140 const std::string & param_name,
141 const unsigned int index )
const 147 "When getting a Postprocessor, failed to get a parameter with the name \"",
150 "\n\nKnown parameters:\n",
155 if (check_index && index > 0)
157 "A Postprocessor was requested with index ",
159 " but a single Postprocessor is coupled.");
163 const auto & names =
_ppi_params.
get<std::vector<PostprocessorName>>(param_name);
164 if (check_index && names.size() <= index)
166 "A Postprocessor was requested with index ",
170 " Postprocessors are coupled.");
175 "Supplied parameter with name \"",
179 "\" is not an expected type for getting a Postprocessor.\n\n",
180 "Allowed types are \"PostprocessorName\" and \"std::vector<PostprocessorName>\".");
184 const PostprocessorName &
186 const unsigned int index )
const 191 const PostprocessorName &
193 const std::string & param_name,
194 const unsigned int index,
195 const bool allow_default_value )
const 201 :
_ppi_params.
get<std::vector<PostprocessorName>>(param_name)[index];
205 std::stringstream oss;
206 oss <<
"Cannot get the name associated with PostprocessorName parameter \"" << param_name
209 oss <<
" at index " << index;
210 oss <<
",\nbecause said parameter is a default Postprocessor value.";
220 std::size_t t_index)
const 231 const auto & value_ref =
234 mooseAssert(
value == value_ref,
"Inconsistent default value");
240 param_name,
"A Postprocessor with the name \"",
name,
"\" was not found.");
247 std::size_t t_index)
const 249 mooseAssert(t_index < 3,
"Invalid time index");
std::string name(const ElemQuality q)
static InputParameters validParams()
const PostprocessorValue & getPostprocessorValueOlderByName(const PostprocessorName &name) const
bool postprocessorsAdded() const
const FEProblemBase & _ppi_feproblem
Reference the the FEProblemBase class.
const ReporterMode REPORTER_MODE_ROOT
bool isTaskComplete(const std::string &task) const
bool hasPostprocessor(const std::string ¶m_name, const unsigned int index=0) const
Determine if the Postprocessor data exists.
bool isDefaultPostprocessorValueByName(const PostprocessorName &name) const
const PostprocessorValue & getPostprocessorValueOlder(const std::string ¶m_name, const unsigned int index=0) const
const PostprocessorValue & getPostprocessorValueOldByName(const PostprocessorName &name) const
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 ...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
auto max(const L &left, const R &right)
PostprocessorValue getDefaultPostprocessorValueByName(const PostprocessorName &name) const
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
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.
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.
Every object that can be built by the factory should be derived from this class.
bool hasPostprocessorByName(const PostprocessorName &name) const
Determine if the Postprocessor data exists.
Real PostprocessorValue
various MOOSE typedefs
const MooseObject & _ppi_moose_object
The MooseObject that uses this interface.
ActionWarehouse & actionWarehouse()
Return a writable reference to the ActionWarehouse associated with this app.
void paramError(const std::string ¶m, 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 ¶m_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
Checks the parameters relating to a Postprocessor.
const PostprocessorValue & getPostprocessorValueInternal(const std::string ¶m_name, unsigned int index, std::size_t t_index) const
Internal methods for getting Postprocessor values.
bool isDefaultPostprocessorValue(const std::string ¶m_name, const unsigned int index=0) const
Determine whether or not the Postprocessor is a default value.
A ReporterName that represents a Postprocessor.
virtual const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name) const
Retrieve the value of the Postprocessor.
const PostprocessorValue & getPostprocessorValueByNameInternal(const PostprocessorName &name, std::size_t t_index) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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.
const InputParameters & parameters() const
Get the parameters of the object.
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
PostprocessorInterface(const MooseObject *moose_object)
std::size_t coupledPostprocessors(const std::string ¶m_name) const
Returns number of Postprocessors coupled under parameter name.
const PostprocessorValue & getPostprocessorValueOld(const std::string ¶m_name, const unsigned int index=0) const
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > _default_values
Holds the default postprocessor values that are requested (key is PostprocessorName) ...
const PostprocessorName & getPostprocessorName(const std::string ¶m_name, const unsigned int index=0) const
Get the name of a postprocessor.