19 params.
addParam<
Real>(
"lower_bound", 0.0,
"Distribution lower bound");
20 params.
addParam<
Real>(
"upper_bound", 1.0,
"Distribution upper bound");
26 _lower_bound(getParam<
Real>(
"lower_bound")),
27 _upper_bound(getParam<
Real>(
"upper_bound"))
30 mooseError(
"The lower bound is larger than the upper bound!");
34 Uniform::pdf(
const Real &
x,
const Real & lower_bound,
const Real & upper_bound)
36 if (x < lower_bound || x > upper_bound)
39 return 1.0 / (upper_bound - lower_bound);
43 Uniform::cdf(
const Real &
x,
const Real & lower_bound,
const Real & upper_bound)
47 else if (
x > upper_bound)
50 return (
x - lower_bound) / (upper_bound - lower_bound);
57 ::mooseError(
"The cdf_value provided is out of range 0 to 1.");
59 return y * (upper_bound - lower_bound) + lower_bound;
const std::vector< double > y
const std::vector< double > x
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void mooseError(Args &&... args) const