normal Class Reference

A normal distribution model. More...

Inheritance diagram for normal:
Collaboration diagram for normal:

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< distributionModelclone () 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< distributionModelNew (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...
 
RandomrndGen_
 Reference to the random number generator. More...
 

Detailed Description

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

Source files

Definition at line 56 of file normal.H.

Constructor & Destructor Documentation

◆ normal() [1/2]

normal ( const dictionary dict,
Random rndGen 
)

Construct from components.

Definition at line 44 of file normal.C.

Referenced by normal::clone().

Here is the caller graph for this function:

◆ normal() [2/2]

normal ( const normal p)

Construct copy.

Definition at line 61 of file normal.C.

◆ ~normal()

~normal ( )
virtual

Destructor.

Definition at line 74 of file normal.C.

Referenced by normal::clone().

Here is the caller graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "normal"  )

Runtime type information.

◆ clone()

virtual autoPtr<distributionModel> clone ( ) const
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().

Here is the call graph for this function:

◆ sample()

Foam::scalar sample ( ) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ minValue()

Foam::scalar minValue ( ) const
virtual

Return the minimum value.

Implements distributionModel.

Definition at line 98 of file normal.C.

Referenced by normal::clone().

Here is the caller graph for this function:

◆ maxValue()

Foam::scalar maxValue ( ) const
virtual

Return the maximum value.

Implements distributionModel.

Definition at line 104 of file normal.C.

Referenced by normal::clone().

Here is the caller graph for this function:

◆ meanValue()

Foam::scalar meanValue ( ) const
virtual

Return the mean value.

Implements distributionModel.

Definition at line 110 of file normal.C.

Referenced by normal::clone().

Here is the caller graph for this function:

◆ erfInv()

Foam::scalar erfInv ( const scalar  y) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: