A library of runtime-selectable distribution models. More...
Public Member Functions | |
TypeName ("distributionModel") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, distributionModel, dictionary,(const dictionary &dict, Random &rndGen),(dict, rndGen)) | |
Declare runtime constructor selection table. More... | |
distributionModel (const word &name, const dictionary &dict, Random &rndGen) | |
Construct from dictionary. More... | |
distributionModel (const distributionModel &p) | |
Construct copy. More... | |
virtual autoPtr< distributionModel > | clone () const =0 |
Construct and return a clone. More... | |
virtual | ~distributionModel () |
Destructor. More... | |
virtual scalar | sample () const =0 |
Sample the distributionModel. More... | |
virtual scalar | minValue () const =0 |
Return the minimum value. More... | |
virtual scalar | maxValue () const =0 |
Return the maximum value. More... | |
virtual scalar | meanValue () const =0 |
Return the maximum value. More... | |
Static Public Member Functions | |
static autoPtr< distributionModel > | New (const dictionary &dict, Random &rndGen) |
Selector. More... | |
Protected Member Functions | |
virtual void | check () const |
Check that the distribution model is valid. More... | |
Protected Attributes | |
const dictionary | distributionModelDict_ |
Coefficients dictionary. More... | |
Random & | rndGen_ |
Reference to the random number generator. More... | |
A library of runtime-selectable distribution models.
Returns a sampled value given the expectation (nu) and variance (sigma^2)
Current distribution models include:
The distributionModel is tabulated in equidistant nPoints, in an interval. These values are integrated to obtain the cumulated distribution model, which is then used to change the distribution from unifrom to the actual distributionModel.
Definition at line 68 of file distributionModel.H.
distributionModel | ( | const word & | name, |
const dictionary & | dict, | ||
Random & | rndGen | ||
) |
Construct from dictionary.
Definition at line 63 of file distributionModel.C.
Referenced by distributionModel::check().
distributionModel | ( | const distributionModel & | p | ) |
Construct copy.
Definition at line 75 of file distributionModel.C.
|
virtual |
Destructor.
Definition at line 86 of file distributionModel.C.
|
protectedvirtual |
Check that the distribution model is valid.
Definition at line 39 of file distributionModel.C.
References Foam::abort(), distributionModel::distributionModel(), Foam::FatalError, FatalErrorInFunction, maxValue, minValue, Foam::nl, and Foam::type().
TypeName | ( | "distributionModel" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
distributionModel | , | ||
dictionary | , | ||
(const dictionary &dict, Random &rndGen) | , | ||
(dict, rndGen) | |||
) |
Declare runtime constructor selection table.
|
pure virtual |
Construct and return a clone.
Implemented in massRosinRammler, multiNormal, normal, RosinRammler, general, exponential, uniform, and fixedValue.
|
static |
Selector.
Definition at line 31 of file distributionModelNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, dictionary::lookup(), Foam::nl, and rndGen().
|
pure virtual |
Sample the distributionModel.
Implemented in massRosinRammler, multiNormal, normal, RosinRammler, general, exponential, uniform, and fixedValue.
|
pure virtual |
Return the minimum value.
Implemented in massRosinRammler, multiNormal, normal, RosinRammler, general, exponential, uniform, and fixedValue.
|
pure virtual |
Return the maximum value.
Implemented in massRosinRammler, multiNormal, normal, RosinRammler, general, exponential, uniform, and fixedValue.
|
pure virtual |
Return the maximum value.
Implemented in massRosinRammler, multiNormal, normal, RosinRammler, general, exponential, uniform, and fixedValue.
|
protected |
Coefficients dictionary.
Definition at line 76 of file distributionModel.H.
|
protected |
Reference to the random number generator.
Definition at line 79 of file distributionModel.H.
Referenced by uniform::sample(), exponential::sample(), general::sample(), RosinRammler::sample(), multiNormal::sample(), and normal::sample().