Simple random number generator. More...
#include <OpenFOAM/Random.H>
Simple random number generator.
Definition at line 50 of file Random.H.
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.
| |
| scalar scalar01 | ( | ) |
scalar [0..1] (so including 0,1)
Definition at line 87 of file Random_.C.
Referenced by stochasticDispersionRAS::disperseParcels(), gradientDispersionRAS::disperseParcels(), Random::GaussNormal(), Random::position(), unitInjector::position(), swirlInjector::position(), multiHoleInjector::position(), definedInjector::position(), commonRailInjector::position(), Random::randomise(), Random::sphericalTensor01(), Random::symmTensor01(), Random::tensor01(), turbGen::U(), and Random::vector01().
| vector vector01 | ( | ) |
vector with every component scalar01
Definition at line 97 of file Random_.C.
References VectorSpace< Form, Cmpt, nCmpt >::component(), VectorSpace< Vector< Cmpt >, Cmpt, 3 >::nComponents, and Random::scalar01().
Referenced by stochasticDispersionRAS::disperseParcels(), treeBoundBox::extend(), Random::randomise(), and turbGen::U().
| sphericalTensor sphericalTensor01 | ( | ) |
sphericalTensor with every component scalar01
Definition at line 109 of file Random_.C.
References SphericalTensor< Cmpt >::ii(), and Random::scalar01().
Referenced by Random::randomise().
| symmTensor symmTensor01 | ( | ) |
symmTensor with every component scalar01
Definition at line 118 of file Random_.C.
References VectorSpace< Form, Cmpt, nCmpt >::component(), VectorSpace< SymmTensor< Cmpt >, Cmpt, 6 >::nComponents, and Random::scalar01().
Referenced by Random::randomise().
| tensor tensor01 | ( | ) |
tensor with every component scalar01
Definition at line 130 of file Random_.C.
References VectorSpace< Form, Cmpt, nCmpt >::component(), VectorSpace< Tensor< scalar >, scalar, 9 >::nComponents, and Random::scalar01().
Referenced by Random::randomise().
| label integer | ( | const label | lower, |
| const label | upper | ||
| ) |
Definition at line 152 of file Random_.C.
References VectorSpace< Form, Cmpt, nCmpt >::component(), VectorSpace< Vector< Cmpt >, Cmpt, 3 >::nComponents, and Random::scalar01().
| void randomise | ( | scalar & | s ) |
Definition at line 166 of file Random_.C.
References Random::scalar01().
Referenced by randomise::writeRandomField().
| void randomise | ( | vector & | v ) |
Definition at line 172 of file Random_.C.
References Random::vector01().
| void randomise | ( | sphericalTensor & | st ) |
Definition at line 178 of file Random_.C.
References Random::sphericalTensor01().
| void randomise | ( | symmTensor & | st ) |
Definition at line 184 of file Random_.C.
References Random::symmTensor01().
| void randomise | ( | tensor & | t ) |
Definition at line 190 of file Random_.C.
References Random::tensor01().
| scalar GaussNormal | ( | ) |
Return a normal Gaussian randon number.
with zero mean and unity variance N(0, 1)
Definition at line 199 of file Random_.C.
References Foam::log(), Random::scalar01(), Foam::sqrt(), v1, and v2.