OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

Random Class Reference

Simple random number generator. More...

Collaboration diagram for Random:

List of all members.


Public Member Functions

 Random (const label &)
 Construct given seed.
int bit ()
scalar scalar01 ()
 scalar [0..1] (so including 0,1)
vector vector01 ()
 vector with every component scalar01
sphericalTensor sphericalTensor01 ()
 sphericalTensor with every component scalar01
symmTensor symmTensor01 ()
 symmTensor with every component scalar01
tensor tensor01 ()
 tensor with every component scalar01
label integer (const label lower, const label upper)
 label [lower..upper]
vector position (const vector &, const vector &)
void randomise (scalar &)
void randomise (vector &)
void randomise (sphericalTensor &)
void randomise (symmTensor &)
void randomise (tensor &)
scalar GaussNormal ()
 Return a normal Gaussian randon number.

Detailed Description

Simple random number generator.

Source files

Definition at line 45 of file Random.H.


Constructor & Destructor Documentation

Random ( const label seed  ) 

Construct given seed.

Definition at line 42 of file Random.C.


Member Function Documentation

int bit (  ) 

Definition at line 62 of file Random.C.

scalar scalar01 (  ) 

scalar [0..1] (so including 0,1)

Definition at line 79 of file Random.C.

Referenced by DsmcCloud< ParcelType >::DsmcCloud(), Random::integer(), uniform::minValue(), Random::randomise(), Random::sphericalTensor01(), Random::symmTensor01(), and Random::tensor01().

Here is the caller graph for this function:

vector vector01 (  ) 

vector with every component scalar01

Definition at line 89 of file Random.C.

sphericalTensor sphericalTensor01 (  ) 

sphericalTensor with every component scalar01

Definition at line 101 of file Random.C.

References Random::scalar01().

Here is the call graph for this function:

symmTensor symmTensor01 (  ) 

symmTensor with every component scalar01

Definition at line 110 of file Random.C.

References Random::scalar01().

Here is the call graph for this function:

tensor tensor01 (  ) 

tensor with every component scalar01

Definition at line 122 of file Random.C.

References Random::scalar01().

Referenced by Random::GaussNormal().

Here is the call graph for this function:

Here is the caller graph for this function:

label integer ( const label  lower,
const label  upper 
)

label [lower..upper]

Definition at line 134 of file Random.C.

References Random::scalar01().

Here is the call graph for this function:

vector position ( const vector start,
const vector end 
)

Definition at line 144 of file Random.C.

void randomise ( scalar s  ) 

Definition at line 158 of file Random.C.

References Random::scalar01().

Referenced by randomise::writeRandomField().

Here is the call graph for this function:

Here is the caller graph for this function:

void randomise ( vector v  ) 

Definition at line 164 of file Random.C.

void randomise ( sphericalTensor st  ) 

Definition at line 170 of file Random.C.

void randomise ( symmTensor st  ) 

Definition at line 176 of file Random.C.

void randomise ( tensor t  ) 

Definition at line 182 of file Random.C.

scalar GaussNormal (  ) 

Return a normal Gaussian randon number.

with zero mean and unity variance N(0, 1)

Definition at line 191 of file Random.C.

References Random::tensor01().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd