Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
thermophysicalModels
pdfs
multiNormal
multiNormal.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
11
OpenFOAM is free software: you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Class
25
Foam::multiNormal
26
27
Description
28
A multiNormal pdf
29
30
@verbatim
31
pdf = sum_i strength_i * exp(-0.5*((x - expectation_i)/variance_i)^2 )
32
@endverbatim
33
34
35
SourceFiles
36
multiNormal.C
37
38
\*---------------------------------------------------------------------------*/
39
40
#ifndef multiNormal_H
41
#define multiNormal_H
42
43
#include <
pdf/pdf.H
>
44
45
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47
namespace
Foam
48
{
49
namespace
pdfs
50
{
51
52
/*---------------------------------------------------------------------------*\
53
Class multiNormal Declaration
54
\*---------------------------------------------------------------------------*/
55
56
class
multiNormal
57
:
58
public
pdf
59
{
60
// Private data
61
62
//- Distribution minimum
63
scalar minValue_;
64
65
//- Distribution maximum
66
scalar maxValue_;
67
68
//- Distribution range
69
scalar range_;
70
71
72
// Model coefficients
73
74
List<scalar>
expectation_;
75
List<scalar>
variance_;
76
List<scalar>
strength_;
77
78
79
public
:
80
81
//- Runtime type information
82
TypeName
(
"multiNormal"
);
83
84
85
// Constructors
86
87
//- Construct from components
88
multiNormal
89
(
90
const
dictionary
& dict,
91
Random
& rndGen
92
);
93
94
95
//- Destructor
96
virtual
~multiNormal
();
97
98
99
// Member Functions
100
101
//- Sample the pdf
102
virtual
scalar
sample
()
const
;
103
104
//- Return the minimum value
105
virtual
scalar
minValue
()
const
;
106
107
//- Return the maximum value
108
virtual
scalar
maxValue
()
const
;
109
};
110
111
112
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113
114
}
// End namespace pdfs
115
}
// End namespace Foam
116
117
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119
#endif
120
121
// ************************************************************************* //