19 "Reporter(s) containing the times.");
22 params.
set<
bool>(
"auto_broadcast") =
false;
24 params.
addClassDescription(
"Import times from one or more reporters, for example other Times");
41 const auto & positions_reporters = getParam<std::vector<ReporterName>>(
"reporters");
43 for (
const auto r_it : index_range(positions_reporters))
45 const auto & reporter_name = positions_reporters[r_it];
48 if (reporter_data.getReporterContextBase(reporter_name).getProducerModeEnum() ==
50 mooseError(
"Distributed reporter not implemented yet");
51 const auto & data = reporter_data.
getReporterValue<std::vector<Real>>(reporter_name);
53 for (
const auto & d : data)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
const ReporterMode REPORTER_MODE_DISTRIBUTED
registerMooseObject("MooseApp", ReporterTimes)
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.
virtual void initialize() override
In charge of computing / loading the times, unless all that could be done there is done in the constr...
ReporterTimes(const InputParameters ¶meters)
static InputParameters validParams()
Times objects are under the hood Reporters, but limited to a vector of Real.
void clearTimes()
Clear the times vector.
static InputParameters validParams()
virtual void finalize() override
In charge of reduction across all ranks.
std::vector< Real > & _times
The vector holding the times.
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.