1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 Simple random number generator.
33 \*---------------------------------------------------------------------------*/
40 #include "symmTensor4thOrder.H"
41 #include "diagTensor.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class Random Declaration
50 \*---------------------------------------------------------------------------*/
64 //- Construct given seed
72 //- scalar [0..1] (so including 0,1)
74 //- vector with every component scalar01
76 //- sphericalTensor with every component scalar01
77 sphericalTensor sphericalTensor01();
78 //- symmTensor with every component scalar01
79 symmTensor symmTensor01();
80 //- symmTensor4thOrder with every component scalar01
81 symmTensor4thOrder symmTensor4thOrder01();
82 //- diagTensor with every component scalar01
83 diagTensor diagTensor01();
84 //- tensor with every component scalar01
86 //- label [lower..upper]
87 label integer(const label lower, const label upper);
89 vector position(const vector&, const vector&);
91 void randomise(scalar&);
92 void randomise(vector&);
93 void randomise(sphericalTensor&);
94 void randomise(symmTensor&);
95 void randomise(symmTensor4thOrder&);
96 void randomise(diagTensor&);
97 void randomise(tensor&);
99 //- Return a normal Gaussian random number
100 // with zero mean and unit variance N(0, 1)
101 scalar GaussNormal();
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 } // End namespace Foam
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 // ************************************************************************* //