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 A library of runtime-selectable pdf's.
30 Returns a sampled value given the expectation (nu) and variance (sigma^2)
32 Sample of planned pdfs (beta p. 374-375):
50 The pdf is tabulated in equidistant nPoints, in an interval.
51 These values are integrated to obtain the cumulated pdf,
52 which is then used to change the distribution from unifrom to
60 \*---------------------------------------------------------------------------*/
65 #include "IOdictionary.H"
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 /*---------------------------------------------------------------------------*\
76 \*---------------------------------------------------------------------------*/
85 const dictionary& dict_;
92 //-Runtime type information
96 //- Declare runtime constructor selection table
97 declareRunTimeSelectionTable
103 const dictionary& dict,
112 //- Construct from dictionary
113 pdf(const dictionary& dict, Random& rndGen);
117 static autoPtr<pdf> New(const dictionary& dict, Random& rndGen);
127 virtual scalar sample() const = 0;
129 //- Return the minimum value
130 virtual scalar minValue() const = 0;
132 //- Return the maximum value
133 virtual scalar maxValue() const = 0;
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 } // End namespace Foam
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 // ************************************************************************* //