distribution.H File Reference
Include dependency graph for distribution.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  distribution
 Base class for statistical distributions. More...
 
class  FieldDistribution< Base, Derived >
 

Namespaces

 Foam
 Namespace for OpenFOAM.
 

Macros

#define VIRTUAL_SAMPLE_TYPE(Type, nullArg)    virtual Type CAT(sample, CAPITALIZE(Type))() const = 0;
 Sample the distribution into components of a primitive type. More...
 
#define DISTRIBUTION_TEMPLATED_SAMPLE_TYPE(Type, nullArg)
 
#define VIRTUAL_SAMPLE_TYPE(Type, nullArg)
 Sample the distribution into components of a primitive type. More...
 

Functions

 FOR_ALL_FIELD_TYPES (DISTRIBUTION_TEMPLATED_SAMPLE_TYPE)
 
void writeEntry (Ostream &os, const unitConversion &, const distribution &d, const bool write=true, const bool writeState=true)
 

Detailed Description

Original source file distribution.H

Definition in file distribution.H.

Macro Definition Documentation

◆ VIRTUAL_SAMPLE_TYPE [1/2]

#define VIRTUAL_SAMPLE_TYPE (   Type,
  nullArg 
)     virtual Type CAT(sample, CAPITALIZE(Type))() const = 0;

Sample the distribution into components of a primitive type.

Definition at line 278 of file distribution.H.

◆ DISTRIBUTION_TEMPLATED_SAMPLE_TYPE

#define DISTRIBUTION_TEMPLATED_SAMPLE_TYPE (   Type,
  nullArg 
)
Value:
template<> \
inline Type Foam::distribution::sample<Type>() const \
{ \
return CAT(sample, CAPITALIZE(Type))(); \
}
virtual scalar sample() const =0
Sample the distribution.
#define CAT(a, b)
Definition: macros.H:36
#define CAPITALIZE(name)
Map 'name' to 'Name' via the predefined macro CAPITALIZE_name.
Definition: macros.H:54

Definition at line 244 of file distribution.H.

◆ VIRTUAL_SAMPLE_TYPE [2/2]

#define VIRTUAL_SAMPLE_TYPE (   Type,
  nullArg 
)
Value:
virtual Type CAT(sample, CAPITALIZE(Type))() const \
{ \
return sample<Type>(); \
}

Sample the distribution into components of a primitive type.

Definition at line 278 of file distribution.H.