distributionModel Class Referenceabstract

A library of runtime-selectable distribution models. More...

Inheritance diagram for distributionModel:
Collaboration diagram for distributionModel:

Public Member Functions

 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 autoPtr< distributionModelclone () const =0
 Construct and return a clone. More...
 
virtual ~distributionModel ()
 Destructor. More...
 
virtual scalar sample () const =0
 Sample the distributionModel. More...
 
virtual scalar minValue () const =0
 Return the minimum value. More...
 
virtual scalar maxValue () const =0
 Return the maximum value. More...
 
virtual scalar meanValue () const =0
 Return the mean value. More...
 

Static Public Member Functions

static autoPtr< distributionModelNew (const dictionary &dict, Random &rndGen)
 Selector. More...
 

Protected Member Functions

virtual void check () const
 Check that the distribution model is valid. More...
 
void info () const
 Print information about the distribution. More...
 

Protected Attributes

const dictionary distributionModelDict_
 Coefficients dictionary. More...
 
RandomrndGen_
 Reference to the random number generator. More...
 

Detailed Description

A library of runtime-selectable distribution models.

Returns a sampled value given the expectation (nu) and variance (sigma^2)

Current distribution models include:

  • exponential
  • fixedValue
  • general
  • multi-normal
  • normal
  • Rosin-Rammler
  • Mass-based Rosin-Rammler
  • uniform
Source files

Definition at line 63 of file distributionModel.H.

Constructor & Destructor Documentation

◆ distributionModel() [1/2]

distributionModel ( const word name,
const dictionary dict,
Random rndGen 
)

Construct from dictionary.

Definition at line 70 of file distributionModel.C.

Referenced by distributionModel::info().

Here is the caller graph for this function:

◆ distributionModel() [2/2]

Construct copy.

Definition at line 82 of file distributionModel.C.

◆ ~distributionModel()

~distributionModel ( )
virtual

Destructor.

Definition at line 93 of file distributionModel.C.

Member Function Documentation

◆ check()

void check ( ) const
protectedvirtual

Check that the distribution model is valid.

Definition at line 39 of file distributionModel.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, maxValue, minValue, Foam::nl, and Foam::type().

Here is the call graph for this function:

◆ info()

void info ( ) const
protected

Print information about the distribution.

Definition at line 60 of file distributionModel.C.

References distributionModel::distributionModel(), Foam::endl(), Foam::Info, maxValue, and minValue.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "distributionModel"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
distributionModel  ,
dictionary  ,
(const dictionary &dict, Random &rndGen ,
(dict, rndGen  
)

Declare runtime constructor selection table.

◆ clone()

virtual autoPtr<distributionModel> clone ( ) const
pure virtual

Construct and return a clone.

Implemented in general, massRosinRammler, multiNormal, normal, RosinRammler, exponential, uniform, and fixedValue.

◆ New()

Foam::autoPtr< Foam::distributionModel > New ( const dictionary dict,
Random rndGen 
)
static

Selector.

Definition at line 31 of file distributionModelNew.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, dictionary::lookup(), Foam::nl, and rndGen().

Here is the call graph for this function:

◆ sample()

virtual scalar sample ( ) const
pure virtual

◆ minValue()

virtual scalar minValue ( ) const
pure virtual

Return the minimum value.

Implemented in general, massRosinRammler, multiNormal, normal, RosinRammler, exponential, uniform, and fixedValue.

◆ maxValue()

virtual scalar maxValue ( ) const
pure virtual

Return the maximum value.

Implemented in general, massRosinRammler, multiNormal, normal, RosinRammler, exponential, uniform, and fixedValue.

◆ meanValue()

virtual scalar meanValue ( ) const
pure virtual

Return the mean value.

Implemented in general, massRosinRammler, multiNormal, normal, RosinRammler, exponential, uniform, and fixedValue.

Member Data Documentation

◆ distributionModelDict_

const dictionary distributionModelDict_
protected

Coefficients dictionary.

Definition at line 71 of file distributionModel.H.

◆ rndGen_

Random& rndGen_
protected

Reference to the random number generator.

Definition at line 74 of file distributionModel.H.

Referenced by uniform::sample(), exponential::sample(), RosinRammler::sample(), multiNormal::sample(), normal::sample(), and general::sample().


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