24 params.addClassDescription(
25 "Tool for extracting Sampler object data and storing in VectorPostprocessor vectors.");
27 params.addRequiredParam<SamplerName>(
"sampler",
28 "The sample from which to extract distribution data.");
35 MooseEnum method(
"get_global_samples get_local_samples get_next_local_row",
"get_next_local_row");
36 params.addParam<MooseEnum>(
39 "Control the method of data retrival from the Sampler object; this is mainly for testing.");
45 : GeneralVectorPostprocessor(parameters),
46 SamplerInterface(this),
47 _sampler(getSampler(
"sampler")),
48 _sampler_method(getParam<MooseEnum>(
"sampler_method"))
50 for (dof_id_type j = 0; j <
_sampler.getNumberOfCols(); ++j)
52 &declareVector(getParam<SamplerName>(
"sampler") +
"_" + std::to_string(j)));
61 ppv_ptr->resize(n, 0);
69 DenseMatrix<Real> data =
_sampler.getGlobalSamples();
70 for (
unsigned int j = 0; j < data.n(); ++j)
71 for (
unsigned int i = 0; i < data.m(); ++i)
77 DenseMatrix<Real> data =
_sampler.getLocalSamples();
78 for (
unsigned int j = 0; j < data.n(); ++j)
79 for (
unsigned int i = 0; i < data.m(); ++i)
85 for (dof_id_type i =
_sampler.getLocalRowBegin(); i <
_sampler.getLocalRowEnd(); ++i)
87 std::vector<Real> data =
_sampler.getNextLocalRow();
88 for (std::size_t j = 0; j < data.size(); ++j)
99 _communicator.gather(0, *ppv_ptr);