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
finiteVolume
interpolation
surfaceInterpolation
multivariateSchemes
multivariateSelectionScheme
multivariateSelectionScheme.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) 1991-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::multivariateSelectionScheme
26
27
Description
28
Generic multi-variate discretisation scheme class for which any of the
29
NVD, CNVD or NVDV schemes may be selected for each variable.
30
31
SourceFiles
32
multivariateSelectionScheme.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef multivariateSelectionScheme_H
37
#define multivariateSelectionScheme_H
38
39
#include <
finiteVolume/multivariateSurfaceInterpolationScheme.H
>
40
#include <
finiteVolume/surfaceFields.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class multivariateSelectionScheme Declaration
49
\*---------------------------------------------------------------------------*/
50
51
template
<
class
Type>
52
class
multivariateSelectionScheme
53
:
54
public
multivariateSurfaceInterpolationScheme
<Type>
55
{
56
// Private data
57
58
dictionary
schemes_;
59
const
surfaceScalarField
& faceFlux_;
60
surfaceScalarField
weights_;
61
62
63
// Private Member Functions
64
65
//- Disallow default bitwise copy construct
66
multivariateSelectionScheme
(
const
multivariateSelectionScheme
&);
67
68
//- Disallow default bitwise assignment
69
void
operator=(
const
multivariateSelectionScheme
&);
70
71
72
public
:
73
74
//- Runtime type information
75
TypeName
(
"multivariateSelection"
);
76
77
78
// Constructors
79
80
//- Construct for field, faceFlux and Istream
81
multivariateSelectionScheme
82
(
83
const
fvMesh
&
mesh
,
84
const
typename
multivariateSurfaceInterpolationScheme<Type>
::
85
fieldTable
&
fields
,
86
const
surfaceScalarField
& faceFlux,
87
Istream
& schemeData
88
);
89
90
91
// Member Operators
92
93
//- surfaceInterpolationScheme sub-class returned by operator(field)
94
// which is used as the interpolation scheme for the field
95
class
fieldScheme
96
:
97
public
multivariateSurfaceInterpolationScheme
<Type>
::fieldScheme
98
{
99
// Private data
100
101
const
surfaceScalarField
& weights_;
102
103
public
:
104
105
// Constructors
106
107
fieldScheme
108
(
109
const
GeometricField<Type, fvPatchField, volMesh>
& field,
110
const
surfaceScalarField
&
weights
111
)
112
:
113
multivariateSurfaceInterpolationScheme<Type>::
114
fieldScheme
(field),
115
weights_(weights)
116
{}
117
118
119
// Member Functions
120
121
//- Return the interpolation weighting factors
122
tmp<surfaceScalarField>
weights
123
(
124
const
GeometricField<Type, fvPatchField, volMesh>
&
125
)
const
126
{
127
return
weights_;
128
}
129
};
130
131
tmp<surfaceInterpolationScheme<Type>
> operator()
132
(
133
const
GeometricField<Type, fvPatchField, volMesh>
& field
134
)
const
135
{
136
return
tmp<surfaceInterpolationScheme<Type>
>
137
(
138
new
fieldScheme
(field, weights_)
139
);
140
}
141
};
142
143
144
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146
}
// End namespace Foam
147
148
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150
#ifdef NoRepository
151
# include <
finiteVolume/multivariateSelectionScheme.C
>
152
#endif
153
154
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156
#endif
157
158
// ************************ vim: set sw=4 sts=4 et: ************************ //