A normal distribution model. More...
Public Member Functions | |
TypeName ("normal") | |
Runtime type information. More... | |
normal (const dictionary &dict, Random &rndGen) | |
Construct from components. More... | |
normal (const normal &p) | |
Construct copy. More... | |
virtual autoPtr< distributionModel > | clone () const |
Construct and return a clone. More... | |
virtual | ~normal () |
Destructor. More... | |
virtual scalar | sample () const |
Sample the distributionModel. More... | |
virtual scalar | minValue () const |
Return the minimum value. More... | |
virtual scalar | maxValue () const |
Return the maximum value. More... | |
virtual scalar | meanValue () const |
Return the mean value. More... | |
virtual scalar | erfInv (const scalar y) const |
Public Member Functions inherited from distributionModel | |
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 | ~distributionModel () |
Destructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from distributionModel | |
static autoPtr< distributionModel > | New (const dictionary &dict, Random &rndGen) |
Selector. More... | |
Protected Member Functions inherited from distributionModel | |
virtual void | check () const |
Check that the distribution model is valid. More... | |
void | info () const |
Print information about the distribution. More... | |
Protected Attributes inherited from distributionModel | |
const dictionary | distributionModelDict_ |
Coefficients dictionary. More... | |
Random & | rndGen_ |
Reference to the random number generator. More... | |
A normal distribution model.
model = strength * exp(-0.5*((x - expectation)/variance)^2 )
strength only has meaning if there's more than one distribution model
normal | ( | const dictionary & | dict, |
Random & | rndGen | ||
) |
Construct from components.
Definition at line 44 of file normal.C.
Referenced by normal::clone().
|
virtual |
Destructor.
Definition at line 74 of file normal.C.
Referenced by normal::clone().
TypeName | ( | "normal" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Implements distributionModel.
Definition at line 93 of file normal.H.
References normal::erfInv(), normal::maxValue(), normal::meanValue(), normal::minValue(), normal::normal(), normal::sample(), y, and normal::~normal().
|
virtual |
Sample the distributionModel.
Implements distributionModel.
Definition at line 80 of file normal.C.
References Foam::constant::physicoChemical::b, Foam::erf(), normal::erfInv(), Foam::max(), Foam::min(), distributionModel::rndGen_, Random::sample01(), x, and y.
Referenced by normal::clone().
|
virtual |
Return the minimum value.
Implements distributionModel.
Definition at line 98 of file normal.C.
Referenced by normal::clone().
|
virtual |
Return the maximum value.
Implements distributionModel.
Definition at line 104 of file normal.C.
Referenced by normal::clone().
|
virtual |
Return the mean value.
Implements distributionModel.
Definition at line 110 of file normal.C.
Referenced by normal::clone().
|
virtual |
Definition at line 116 of file normal.C.
References Foam::constant::universal::h, k, Foam::log(), Foam::constant::mathematical::pi(), Foam::sqrt(), and x.
Referenced by normal::clone(), and normal::sample().