multiNormal Class Reference

Multiple superimposed normal distributions. More...

Inheritance diagram for multiNormal:
Collaboration diagram for multiNormal:

Public Member Functions

 TypeName ("multiNormal")
 Runtime type information. More...
 
 multiNormal (const dictionary &dict, Random &rndGen, const label sampleQ)
 Construct from a dictionary. More...
 
 multiNormal (const multiNormal &d, const label sampleQ)
 Construct copy. More...
 
virtual autoPtr< distributionclone (const label sampleQ) const
 Construct and return a clone. More...
 
virtual ~multiNormal ()
 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 tmp< scalarFieldx (const label n) const
 Return coordinates to plot across the range of the distribution. More...
 
- Public Member Functions inherited from FieldDistribution< unintegrableForNonZeroQ, multiNormal >
virtual tmp< scalarFieldsample (const label n) const
 Sample the distribution. More...
 

Detailed Description

Multiple superimposed normal distributions.

\[ PDF(x) = \sum_i S_i \frac{1}{\sigma_i \sqrt{2 \pi}} \exp \left( \frac{1}{2} \left( \frac{x - \mu_i}{\sigma_i} \right)^2 \right) \]

Usage
Example usage:
{
    type    multiNormal;
    Q       0;
    min     0.001;
    max     0.019;
    mu      (0.005 0.011 0.015);
    sigma   (0.002 0.001 0.0015);
    strength (2 1 3);
}
Source files
See also
Foam::distribution Foam::distributions::normal

Definition at line 72 of file multiNormal.H.

Constructor & Destructor Documentation

◆ multiNormal() [1/2]

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

Construct from a dictionary.

Definition at line 113 of file multiNormal.C.

References Foam::abort(), dict, Foam::FatalIOError, FatalIOErrorInFunction, forAll, multiNormal::max(), multiNormal::min(), Foam::constant::physicoChemical::mu, Foam::nl, Foam::constant::physicoChemical::sigma, List< T >::size(), and Foam::type().

Referenced by multiNormal::clone().

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

◆ multiNormal() [2/2]

multiNormal ( const multiNormal d,
const label  sampleQ 
)

Construct copy.

Definition at line 186 of file multiNormal.C.

References forAll.

◆ ~multiNormal()

~multiNormal ( )
virtual

Destructor.

Definition at line 219 of file multiNormal.C.

Member Function Documentation

◆ TypeName()

TypeName ( "multiNormal"  )

Runtime type information.

◆ clone()

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

Construct and return a clone.

Definition at line 127 of file multiNormal.H.

References multiNormal::multiNormal().

Here is the call graph for this function:

◆ sample()

Foam::scalar sample ( ) const
virtual

Sample the distribution.

Definition at line 225 of file multiNormal.C.

References n, Foam::fvm::S(), s(), and unintegrable::sample().

Here is the call graph for this function:

◆ min()

Foam::scalar min ( ) const
virtual

Return the minimum value.

Definition at line 248 of file multiNormal.C.

Referenced by multiNormal::multiNormal().

Here is the caller graph for this function:

◆ max()

Foam::scalar max ( ) const
virtual

Return the maximum value.

Definition at line 254 of file multiNormal.C.

Referenced by multiNormal::multiNormal().

Here is the caller 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 261 of file multiNormal.C.

References n.


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