19 "Reporter(s) containing the positions");
22 params.
set<
bool>(
"auto_sort") =
false;
24 params.
set<
bool>(
"auto_broadcast") =
false;
27 "Import positions from one or more reporters, for example other Positions");
45 const auto & positions_reporters = getParam<std::vector<ReporterName>>(
"reporters");
48 for (
const auto r_it : index_range(positions_reporters))
50 const std::string & reporter_name = positions_reporters[r_it];
53 if (reporter_data.getReporterContextBase(reporter_name).getProducerModeEnum() ==
55 mooseError(
"Distributed reporter not implemented yet");
56 const auto & data = reporter_data.
getReporterValue<std::vector<Point>>(reporter_name);
58 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", ReporterPositions)
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
Positions objects are under the hood Reporters.
std::vector< std::vector< Point > > _positions_2d
2D storage for all the positions
void clearPositions()
Clear all positions vectors.
std::vector< Point > & _positions
For now, only the 1D vector will be shared across all ranks.
static InputParameters validParams()
virtual void finalize() override
In charge of reduction across all ranks & sorting for consistent output.
bool _initialized
Whether the positions object has been initialized. This must be set by derived objects.
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.
Positions from a Reporter.
void initialize() override
In charge of computing / loading the positions.
ReporterPositions(const InputParameters ¶meters)
static InputParameters validParams()
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.