42 const T &
getReporterValue(
const std::string & param_name,
const std::size_t time_index = 0);
46 const std::size_t time_index = 0);
62 const std::size_t time_index = 0);
66 const std::size_t time_index = 0);
114 template <
typename T>
116 const std::string & param_name =
"")
const;
131 template <
typename T>
138 template <
typename T>
142 const std::size_t time_index)
146 possiblyCheckHasReporter<T>(reporter_name, param_name);
148 return getReporterValueByName<T>(reporter_name, mode, time_index);
151 template <
typename T>
154 const std::size_t time_index)
159 template <
typename T>
163 const std::size_t time_index)
165 possiblyCheckHasReporter<T>(reporter_name);
172 template <
typename T>
178 "Cannot call hasReporterValue() until all Reporters have been constructed.");
183 template <
typename T>
189 "Cannot call hasReporterValueByName() until all Reporters have been constructed.");
194 template <
typename T>
197 const std::string & param_name )
const 199 if (
reportersAdded() && !hasReporterValueByName<T>(reporter_name))
201 std::stringstream oss;
202 oss <<
"A Reporter value with the name \"" << reporter_name <<
"\" and type \"" 203 << MooseUtils::prettyCppType<T>() <<
"\" was not found.";
virtual void addReporterDependencyHelper(const ReporterName &)
A method that can be overridden to update the UO dependencies.
static InputParameters validParams()
const T & getReporterValueByName(const ReporterName &reporter_name, const std::size_t time_index=0)
Returns read-only reference to a Reporter value that is provided by name directly.
const ReporterMode REPORTER_MODE_UNSET
const ReporterName & getReporterName(const std::string ¶m_name) const
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const T & getReporterValue(const std::string ¶m_name, const std::size_t time_index=0)
doco-normal-methods-begin Returns read-only reference to a Reporter value that is provided by an inpu...
bool reportersAdded() const
bool hasReporterValue(const std::string ¶m_name) const
Return True if the Reporter value exists.
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.
Interface to allow object to consume Reporter values.
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 ...
ReporterInterface(const MooseObject *moose_object)
const MooseObject & _ri_moose_object
The MooseObject needing this interface.
const InputParameters & _ri_params
Parameters for the MooseObject inherting from this interface.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const ReporterData & _ri_reporter_data
The ReporterData.
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
MooseEnumItem that automatically creates the ID and doesn't allow the ID to be assigned.
void possiblyCheckHasReporter(const ReporterName &reporter_name, const std::string ¶m_name="") const
Helpers for "possibly" checking if a Reporter value exists.
bool hasReporterValueByName(const ReporterName &reporter_name) const
The Reporter system is comprised of objects that can contain any number of data values.
FEProblemBase & _ri_fe_problem_base
Provides access to FEProblemBase::getReporterData.
This is a helper class for managing the storage of declared Reporter object values.