19 params.
addRequiredParam<SamplerName>(
"sampler",
"Sampler defining the partitioning.");
21 "reporters",
"Vector reporters to compare with sampler partioning.");
28 for (
const auto & rname : getParam<std::vector<ReporterName>>(
"reporters"))
29 _reporters[rname] = &getReporterValueByName<std::vector<Real>>(rname);
39 const dof_id_type rsize = it.second->size();
41 dof_id_type expect_size;
49 mooseError(
"Reporter decalred with unsupported mode.");
51 if (rsize != expect_size)
53 <<
" " << rname <<
": expected size = " << expect_size <<
", actual size = " << rsize;
56 if (!ss.str().empty())
57 mooseError(
"The following reporter values are not partitioning the same as ",
58 getParam<SamplerName>(
"sampler"),
const ReporterMode REPORTER_MODE_REPLICATED
const ReporterMode REPORTER_MODE_DISTRIBUTED
const ReporterMode REPORTER_MODE_ROOT
registerMooseObject("StochasticToolsTestApp", TestReporterPartitioning)
const ReporterData & getReporterData() const
static InputParameters validParams()
void mooseError(Args &&... args) const
const ReporterProducerEnum & getReporterMode(const ReporterName &reporter_name) const
dof_id_type getNumberOfLocalRows() const
dof_id_type getNumberOfRows() const
virtual void execute() override
static InputParameters validParams()
TestReporterPartitioning(const InputParameters ¶meters)
std::unordered_map< ReporterName, const std::vector< Real > * > _reporters
FEProblemBase & _fe_problem
processor_id_type processor_id() const