Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
12 #include "libmesh/point.h"
25 "min", 0.0,
"Lower bound of uniformly distributed randomly generated values");
27 "max", 1.0,
"Upper bound of uniformly distributed randomly generated values");
29 "distribution",
"Name of distribution defining distribution of randomly generated values");
31 params.
addClassDescription(
"Initialize a variable with randomly generated numbers following "
32 "either a uniform distribution or a user-defined distribution");
39 _min(getParam<Real>(
"min")),
40 _max(getParam<Real>(
"max")),
41 _distribution(nullptr)
50 paramError(
"distribution",
"Cannot use together with 'min' or 'max' parameter");
RandomIC just returns a Random value.
Base class for randomly generated initial conditions.
const Real _max
The upper bound of the random number range.
RandomIC(const InputParameters ¶meters)
Constructor.
const InputParameters & parameters() const
Get the parameters of the object.
static InputParameters validParams()
registerMooseObject("MooseApp", RandomIC)
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Interface for objects that need to use distributions.
const Distribution & getDistributionByName(const DistributionName &name) const
Get a distribution with a given name.
const Real _min
The lower bound of the random number range.
virtual Real value(const Point &p) override
The value of the variable at a point.
static InputParameters validParams()
static InputParameters validParams()
virtual Real quantile(const Real &y) const =0
Compute the inverse CDF (quantile function) value for given variable value y.
defineLegacyParams(RandomIC)
Real generateRandom()
Generate a uniformly distributed random number on the interval from 0 to 1.
const Distribution * _distribution
Distribution object optionally used to define distribution of random numbers.