normal Class Reference

Normal distribution, scaled so that it spans between a specified minimum and maximum value, rather than from zero to infinity. More...

Inheritance diagram for normal:
Collaboration diagram for normal:

Public Member Functions

 TypeName ("normal")
 Runtime type information. More...
 
 normal (const dictionary &dict, Random &rndGen, const label sampleQ)
 Construct from a dictionary. More...
 
 normal (Random &rndGen, const label Q, const label sampleQ, const label n, const scalar min, const scalar max, const scalar mu, const scalar sigma)
 Construct from components. More...
 
 normal (const normal &d, const label sampleQ)
 Construct copy. More...
 
virtual autoPtr< distributionclone (const label sampleQ) const
 Construct and return a clone. More...
 
virtual ~normal ()
 Destructor. More...
 
virtual scalar sample () const
 Sample the distribution. More...
 
virtual scalar min () const
 Return the minimum value. More...
 
virtual scalar max () const
 Return the maximum value. More...
 
virtual scalar mean () const
 Return the mean value. More...
 
virtual tmp< scalarFieldx (const label n) const
 Return coordinates to plot across the range of the distribution. More...
 
- Public Member Functions inherited from FieldDistribution< unintegrableForNonZeroQ, normal >
virtual tmp< scalarFieldsample (const label n) const
 Sample the distribution. More...
 

Friends

class multiNormal
 Permit the multiNormal distribution to use private parts of this class. More...
 

Detailed Description

Normal distribution, scaled so that it spans between a specified minimum and maximum value, rather than from zero to infinity.

\[ PDF(x) = \frac{1}{\sigma \sqrt{2 \pi}} \exp \left( \frac{1}{2} \left( \frac{x - \mu}{\sigma} \right)^2 \right) \]

Usage
Example usage:
{
    type    normal;
    Q       0;
    min     0.001;
    max     0.019;
    mu      0.011;
    sigma   0.003;
}
Source files
See also
Foam::distribution

Definition at line 71 of file normal.H.

Constructor & Destructor Documentation

◆ normal() [1/3]

normal ( const dictionary dict,
Random rndGen,
const label  sampleQ 
)

Construct from a dictionary.

Definition at line 108 of file normal.C.

Referenced by normal::clone().

Here is the caller graph for this function:

◆ normal() [2/3]

normal ( Random rndGen,
const label  Q,
const label  sampleQ,
const label  n,
const scalar  min,
const scalar  max,
const scalar  mu,
const scalar  sigma 
)

Construct from components.

Definition at line 134 of file normal.C.

◆ normal() [3/3]

normal ( const normal d,
const label  sampleQ 
)

Construct copy.

Definition at line 154 of file normal.C.

◆ ~normal()

~normal ( )
virtual

Destructor.

Definition at line 166 of file normal.C.

Member Function Documentation

◆ TypeName()

TypeName ( "normal"  )

Runtime type information.

◆ clone()

virtual autoPtr<distribution> clone ( const label  sampleQ) const
inlinevirtual

Construct and return a clone.

Definition at line 158 of file normal.H.

References normal::normal().

Here is the call graph for this function:

◆ sample()

Foam::scalar sample ( ) const
virtual

Sample the distribution.

Definition at line 172 of file normal.C.

References unintegrable::sample().

Here is the call graph for this function:

◆ min()

Foam::scalar min ( ) const
virtual

Return the minimum value.

Definition at line 185 of file normal.C.

◆ max()

Foam::scalar max ( ) const
virtual

Return the maximum value.

Definition at line 191 of file normal.C.

◆ mean()

Foam::scalar mean ( ) const
virtual

Return the mean value.

Definition at line 197 of file normal.C.

References unintegrable::mean().

Here is the call graph for this function:

◆ x()

Foam::tmp< Foam::scalarField > x ( const label  n) const
virtual

Return coordinates to plot across the range of the distribution.

Definition at line 219 of file normal.C.

References Foam::max(), n, tmp< T >::ref(), and distribution::x().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ multiNormal

friend class multiNormal
friend

Permit the multiNormal distribution to use private parts of this class.

Definition at line 128 of file normal.H.


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