21 params.
addParam<
bool>(
"resample",
true,
"Create the re-sample matrix for second-order indices.");
23 params.
addRequiredParam<SamplerName>(
"sampler_b",
"The 're-sample' matrix.");
29 _sampler_a(getSampler(
"sampler_a")),
30 _sampler_b(getSampler(
"sampler_b")),
31 _resample(getParam<bool>(
"resample")),
32 _num_matrices(_resample ? 2 * _sampler_a.getNumberOfCols() + 2
33 : _sampler_a.getNumberOfCols() + 2)
36 paramError(
"sampler_a",
"The supplied Sampler objects must have the same number of columns.");
39 paramError(
"sampler_a",
"The supplied Sampler objects must have the same number of rows.");
42 paramError(
"sampler_a",
"The supplied sampler matrices must not be the same.");
54 if (matrix_index == 0 && col_index == 0)
59 paramError(
"sampler_a",
"The supplied sampler matrices must not be the same.");
63 if (matrix_index == 0)
82 if (col_index == matrix_index - 1)
88 mooseError(
"Invalid row and column index, if you are seeing this Zach messed up because this " 89 "should be impossible to reach.");
107 bool found_first =
false;
108 for (
auto it = all_rc.rbegin(); it != all_rc.rend(); ++it)
109 if (it->is_first_local_rank)
void setNumberOfRows(dof_id_type n_rows)
Sampler & _sampler_a
Sampler matrix.
Sampler & _sampler_b
Re-sample matrix.
A class used to perform Monte Carlo sampling for performing Sobol sensitivity analysis.
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
static InputParameters validParams()
LocalRankConfig rankConfig(processor_id_type rank, processor_id_type nprocs, dof_id_type napps, processor_id_type min_app_procs, processor_id_type max_app_procs, bool batch_mode=false)
SobolSampler(const InputParameters ¶meters)
dof_id_type first_local_app_index
std::vector< Real > getNextLocalRow()
registerMooseObjectAliased("StochasticToolsApp", SobolSampler, "Sobol")
registerMooseObjectReplaced("StochasticToolsApp", SobolSampler, "07/01/2020 00:00", Sobol)
const dof_id_type _max_procs_per_row
virtual const std::string & name() const
uint8_t processor_id_type
processor_id_type n_processors() const
void paramError(const std::string ¶m, Args... args) const
dof_id_type num_local_sims
const dof_id_type _min_procs_per_row
dof_id_type getNumberOfRows() const
const dof_id_type _num_matrices
Number of matrices.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void setNumberOfCols(dof_id_type n_cols)
static InputParameters validParams()
void mooseError(Args &&... args) const
virtual LocalRankConfig constructRankConfig(bool batch_mode) const override
Sobol sampling should have a slightly different partitioning in order to keep the sample and resample...
dof_id_type num_local_apps
dof_id_type first_local_sim_index
processor_id_type processor_id() const
std::vector< Real > _row_b
std::vector< Real > _row_a
dof_id_type getNumberOfCols() const