20 "Sampler that creates samples for a direct perturbation-based sensitivity study.");
22 "nominal_parameter_values",
23 "The nominal values of the parameters around which we shall perturb them.");
25 "relative_perturbation_intervals",
27 "The numbers by which the nominal values are multiplied to get a perturbed value.");
28 MooseEnum perturbation_type(
"central_difference forward_difference",
"central_difference");
31 "The perturbation method to use for creating samples.");
38 _nominal_values(getParam<
std::vector<
Real>>(
"nominal_parameter_values")),
39 _relative_intervals(getParam<
std::vector<
Real>>(
"relative_perturbation_intervals")),
40 _perturbation_method(getParam<
MooseEnum>(
"perturbation_method"))
45 if (interval <= 0.0 || interval >= 1.0)
47 "The relative perturbation interval must be between 0 and 1!");
84 "We don't have the required absolute interval!");
92 "We don't have the required relative interval!");
100 "We don't have the required nominal values for the given parameter!");
Real getAbsoluteInterval(const Real param_index) const
Return the absolute perturbation interval for a given index.
void setNumberOfRows(dof_id_type n_rows)
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Return the sample for the given row and column.
static InputParameters validParams()
Real getRelativeInterval(const Real param_index) const
Return the relative perturbation interval for a given index.
const MooseEnum _perturbation_method
The method which is used for the perturbation (one-sided/two-sided)
A class used to generate samples for a direct perturbation analysis.
registerMooseObject("StochasticToolsApp", DirectPerturbationSampler)
std::vector< Real > _absolute_intervals
The intervals for the perturbations.
static InputParameters validParams()
std::vector< std::vector< Real > > _parameter_vectors
The data matrix created using the parameters.
void paramError(const std::string ¶m, Args... args) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void setNumberOfCols(dof_id_type n_cols)
const std::vector< Real > _nominal_values
The nominal values of the parameters.
DirectPerturbationSampler(const InputParameters ¶meters)
Real getNominalValue(const Real param_index) const
Return the nominal value of the parameter.
const std::vector< Real > _relative_intervals
The relative intervals that should be used for the perturbation of each parameter.
auto index_range(const T &sizable)