exponential Class Reference

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

Inheritance diagram for exponential:
Collaboration diagram for exponential:

Public Member Functions

 TypeName ("exponential")
 Runtime type information. More...
 
 exponential (const unitConversion &units, const dictionary &dict, const label sampleQ, randomGenerator &&rndGen)
 Construct from a dictionary. More...
 
 exponential (const exponential &d, const label sampleQ)
 Construct copy. More...
 
virtual autoPtr< distributionclone (const label sampleQ) const
 Construct and return a clone. More...
 
virtual ~exponential ()
 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 void write (Ostream &os, const unitConversion &units) const
 Write to a stream. 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, exponential >
Type sample () const
 Sample the distribution into components of a primitive type. More...
 
virtual tmp< scalarFieldsample (const label n) const
 Sample the distribution into a field. More...
 

Additional Inherited Members

- Protected Member Functions inherited from FieldDistribution< unintegrableForNonZeroQ, exponential >
 FOR_ALL_FIELD_TYPES (VIRTUAL_SAMPLE_TYPE)
 

Detailed Description

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

\[ PDF(x) = \lambda \exp(- \lambda x) \]

Usage
Example usage:
{
    type    exponential;
    Q       3;
    min     0.01;
    max     0.5;
    lambda  3;
}
Source files
See also
Foam::distribution

Definition at line 70 of file exponential.H.

Constructor & Destructor Documentation

◆ exponential() [1/2]

exponential ( const unitConversion units,
const dictionary dict,
const label  sampleQ,
randomGenerator &&  rndGen 
)

Construct from a dictionary.

Definition at line 72 of file exponential.C.

Referenced by exponential::clone().

Here is the caller graph for this function:

◆ exponential() [2/2]

exponential ( const exponential d,
const label  sampleQ 
)

Construct copy.

Definition at line 98 of file exponential.C.

◆ ~exponential()

~exponential ( )
virtual

Destructor.

Definition at line 113 of file exponential.C.

Member Function Documentation

◆ TypeName()

TypeName ( "exponential"  )

Runtime type information.

◆ clone()

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

Construct and return a clone.

Definition at line 126 of file exponential.H.

References exponential::exponential().

Here is the call graph for this function:

◆ sample()

Foam::scalar sample ( ) const
virtual

Sample the distribution.

Definition at line 119 of file exponential.C.

References Foam::log(), 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 135 of file exponential.C.

◆ max()

Foam::scalar max ( ) const
virtual

Return the maximum value.

Definition at line 141 of file exponential.C.

◆ write()

void write ( Ostream os,
const unitConversion units 
) const
virtual

Write to a stream.

Definition at line 147 of file exponential.C.

References Foam::unitless, Foam::units(), Foam::vtkWriteOps::write(), and Foam::writeEntry().

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 162 of file exponential.C.

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

Here is the call graph for this function:

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