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)
static InputParameters validParams()
Positions from a Reporter.
void clearPositions()
Clear all positions vectors.
Positions objects are under the hood Reporters.
registerMooseObject("MooseApp", ReporterPositions)
bool _initialized
Whether the positions object has been initialized. This must be set by derived objects.
std::vector< std::vector< Point > > _positions_2d
2D storage for all the positions
const ReporterData & getReporterData() const
Provides const access the ReporterData object.
ReporterPositions(const InputParameters ¶meters)
std::vector< Point > & _positions
For now, only the 1D vector will be shared across all ranks.
const ReporterMode REPORTER_MODE_DISTRIBUTED
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
void initialize() override
In charge of computing / loading the positions.
virtual void finalize() override
In charge of reduction across all ranks & sorting for consistent output.
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...
auto index_range(const T &sizable)
static InputParameters validParams()