18 params.
addClassDescription(
"Provides complete Cartesian product for the supplied variables.");
21 "A list of triplets, each item should include the min, step size, and number of steps.");
22 params.
addRequiredParam<std::vector<Real>>(
"nominal_values",
"Nominal values for each column.");
28 :
Sampler(parameters), _nominal_values(getParam<
std::vector<
Real>>(
"nominal_values"))
30 const std::vector<Real> & items = getParam<std::vector<Real>>(
"linear_space_items");
31 if (items.size() % 3 != 0)
33 "The number of numeric items must be divisible by 3; min, max, divisions for each " 34 "item are required.");
38 "The number of values specified must match the number of triplets in " 39 "'linear_space_items'.");
44 for (std::size_t i = 0; i < items.size(); i += 3)
46 if (items[i + 2] != std::floor(items[i + 2]))
48 "The third entry for each item must be an integer; it provides the number of " 49 "entries in the resulting item vector.");
53 "The third entry for each item must be positive; it provides the number of " 54 "entries in the resulting item vector.");
void setNumberOfRows(dof_id_type n_rows)
Similar to CartesianProduct, this object creates a sampling scheme that produces a grid of samples...
static InputParameters validParams()
std::vector< dof_id_type > _grid_range
The range of rows in which to apply the grid for each column.
Cartesian1DSampler(const InputParameters ¶meters)
registerMooseObjectAliased("StochasticToolsApp", Cartesian1DSampler, "Cartesian1D")
void paramError(const std::string ¶m, Args... args) const
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Return the sample for the given row and column.
std::vector< std::vector< Real > > _grid_items
The values to use when sampling from a column's grid.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void setNumberOfCols(dof_id_type n_cols)
IntRange< T > make_range(T beg, T end)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const std::vector< Real > & _nominal_values
The values to use when not sampling from a column's grid.
const ExecFlagType EXEC_INITIAL