22 "The distribution names to be sampled, the number of distributions provided defines the " 23 "number of columns per matrix.");
27 "Number of unique trajectories to perform. The higher number of these usually means a more " 28 "accurate sensitivity evaluation, but it is proportional to the number of required model " 29 "evaluations: 'trajectoris' x (number of 'distributions' + 1).");
33 "levels % 2 = 0 & levels > 0",
34 "The number of levels in the sampling. This determines the discretization of the input " 35 "space, more levels means finer discretization and more possible model perturbations.");
41 _num_trajectories(getParam<
dof_id_type>(
"trajectories")),
42 _num_levels(getParam<unsigned
int>(
"levels"))
45 for (
const auto &
name :
getParam<std::vector<DistributionName>>(
"distributions"))
56 _b = RealEigenMatrix::Ones(nc + 1, nc).triangularView<Eigen::StrictlyLower>();
58 _j.setOnes(nc + 1, nc);
68 if (traj_ind == 0 && col_index == 0)
79 std::vector<dof_id_type> pchoice(nc);
80 std::iota(pchoice.begin(), pchoice.end(), 0);
83 const unsigned int ind = nc > 1 ?
getRandl(0, 0, pchoice.size()) : 0;
85 pchoice.erase(pchoice.begin() + ind);
113 std::vector<LocalRankConfig> all_rc(
processor_id() + 1);
120 bool found_first =
false;
121 for (
auto it = all_rc.rbegin(); it != all_rc.rend(); ++it)
122 if (it->is_first_local_rank)
void setNumberOfRows(dof_id_type n_rows)
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
uint32_t getRandl(unsigned int index, uint32_t lower, uint32_t upper)
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)
const dof_id_type & _num_trajectories
Number of trajectories.
dof_id_type first_local_app_index
virtual void advanceGenerator(const unsigned int seed_index, const dof_id_type count)
const dof_id_type _max_procs_per_row
Real getRand(unsigned int index=0)
virtual const std::string & name() const
std::vector< const Distribution * > _distributions
Distribution to determine parameter from perturbations.
uint8_t processor_id_type
processor_id_type n_processors() const
static InputParameters validParams()
MorrisSampler(const InputParameters ¶meters)
const T & getParam(const std::string &name) const
void updateBstar()
Function to calculate trajectories This is only called once per trajectory (_n_rows / (_n_cols + 1)) ...
const unsigned int & _num_levels
Number of levels used for input space discretization.
dof_id_type num_local_sims
const dof_id_type _min_procs_per_row
A class used to perform Monte Carlo sampling for performing Morris sensitivity analysis.
const Distribution & getDistributionByName(const DistributionName &name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void setNumberOfCols(dof_id_type n_cols)
virtual LocalRankConfig constructRankConfig(bool batch_mode) const override
Morris sampling should have a slightly different partitioning in order to keep the sample and resampl...
registerMooseObject("StochasticToolsApp", MorrisSampler)
dof_id_type num_local_apps
dof_id_type first_local_sim_index
processor_id_type processor_id() const
void ErrorVector unsigned int
dof_id_type getNumberOfCols() const
virtual void sampleSetUp(const Sampler::SampleMode mode) override
Used to setup matrices for trajectory computation.