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)
35 #ifdef MOOSE_KOKKOS_ENABLED 38 : _ppi_moose_object(object._ppi_moose_object),
39 _ppi_params(object._ppi_params),
40 _ppi_feproblem(object._ppi_feproblem)
47 const unsigned int index )
const 54 const unsigned int index )
const 61 const unsigned int index )
const 86 const unsigned int index )
const 100 std::istringstream ss(
name);
102 return (ss >> real_value && ss.eof());
111 std::istringstream ss(
name);
118 const unsigned int index )
const 122 "Cannot call hasPostprocessor() until all Postprocessors have been constructed.");
132 "Cannot call hasPostprocessorByName() until all Postprocessors have been constructed.");
145 return _ppi_params.
get<std::vector<PostprocessorName>>(param_name).size();
150 const std::string & param_name,
151 const unsigned int index )
const 157 "When getting a Postprocessor, failed to get a parameter with the name \"",
160 "\n\nKnown parameters:\n",
165 if (check_index && index > 0)
167 "A Postprocessor was requested with index ",
169 " but a single Postprocessor is coupled.");
173 const auto & names =
_ppi_params.
get<std::vector<PostprocessorName>>(param_name);
174 if (check_index && names.size() <= index)
176 "A Postprocessor was requested with index ",
180 " Postprocessors are coupled.");
185 "Supplied parameter with name \"",
189 "\" is not an expected type for getting a Postprocessor.\n\n",
190 "Allowed types are \"PostprocessorName\" and \"std::vector<PostprocessorName>\".");
194 const PostprocessorName &
196 const unsigned int index )
const 201 const PostprocessorName &
203 const std::string & param_name,
204 const unsigned int index,
205 const bool allow_default_value )
const 211 :
_ppi_params.
get<std::vector<PostprocessorName>>(param_name)[index];
215 std::stringstream oss;
216 oss <<
"Cannot get the name associated with PostprocessorName parameter \"" << param_name
219 oss <<
" at index " << index;
220 oss <<
",\nbecause said parameter is a default Postprocessor value.";
230 std::size_t t_index)
const 241 const auto & value_ref =
244 mooseAssert(
value == value_ref,
"Inconsistent default value");
250 param_name,
"A Postprocessor with the name \"",
name,
"\" was not found.");
257 std::size_t t_index)
const 259 mooseAssert(t_index < 3,
"Invalid time index");
std::string name(const ElemQuality q)
static InputParameters validParams()
const PostprocessorValue & getPostprocessorValueOlderByName(const PostprocessorName &name) const
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 ...
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 InputParameters & parameters() const
Get the parameters of the object.
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 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 and optionally a file path to the top-level block p...
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.
Interface class for classes which interact with Postprocessors.