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
limitedSchemes
limitedSurfaceInterpolationScheme
limitedSurfaceInterpolationScheme.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::limitedSurfaceInterpolationScheme
26
27
Description
28
Abstract base class for limited surface interpolation schemes.
29
30
SourceFiles
31
limitedSurfaceInterpolationScheme.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef limitedSurfaceInterpolationScheme_H
36
#define limitedSurfaceInterpolationScheme_H
37
38
#include <
finiteVolume/surfaceInterpolationScheme.H
>
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
namespace
Foam
43
{
44
45
/*---------------------------------------------------------------------------*\
46
Class limitedSurfaceInterpolationScheme Declaration
47
\*---------------------------------------------------------------------------*/
48
49
template
<
class
Type>
50
class
limitedSurfaceInterpolationScheme
51
:
52
public
surfaceInterpolationScheme
<Type>
53
{
54
// Private Member Functions
55
56
//- Disallow copy construct
57
limitedSurfaceInterpolationScheme
58
(
59
const
limitedSurfaceInterpolationScheme
&
60
);
61
62
//- Disallow default bitwise assignment
63
void
operator=(
const
limitedSurfaceInterpolationScheme
&);
64
65
66
protected
:
67
68
// Protected data
69
70
const
surfaceScalarField
&
faceFlux_
;
71
72
73
public
:
74
75
//- Runtime type information
76
TypeName
(
"limitedSurfaceInterpolationScheme"
);
77
78
79
// Declare run-time constructor selection tables
80
81
declareRunTimeSelectionTable
82
(
83
tmp
,
84
limitedSurfaceInterpolationScheme
,
85
Mesh,
86
(
87
const
fvMesh
&
mesh
,
88
Istream
& schemeData
89
),
90
(mesh, schemeData)
91
);
92
93
declareRunTimeSelectionTable
94
(
95
tmp
,
96
limitedSurfaceInterpolationScheme
,
97
MeshFlux,
98
(
99
const
fvMesh
& mesh,
100
const
surfaceScalarField
& faceFlux,
101
Istream
& schemeData
102
),
103
(mesh, faceFlux, schemeData)
104
);
105
106
107
// Constructors
108
109
//- Construct from mesh and faceFlux
110
limitedSurfaceInterpolationScheme
111
(
112
const
fvMesh
& mesh,
113
const
surfaceScalarField
& faceFlux
114
)
115
:
116
surfaceInterpolationScheme<Type>
(
mesh
),
117
faceFlux_
(faceFlux)
118
{}
119
120
121
//- Construct from mesh and Istream.
122
// The name of the flux field is read from the Istream and looked-up
123
// from the mesh objectRegistry
124
limitedSurfaceInterpolationScheme
125
(
126
const
fvMesh
& mesh,
127
Istream
& is
128
)
129
:
130
surfaceInterpolationScheme<Type>
(
mesh
),
131
faceFlux_
132
(
133
mesh.
lookupObject
<
surfaceScalarField
>
134
(
135
word
(is)
136
)
137
)
138
{}
139
140
141
// Selectors
142
143
//- Return new tmp interpolation scheme
144
static
tmp<limitedSurfaceInterpolationScheme<Type>
>
New
145
(
146
const
fvMesh
& mesh,
147
Istream
& schemeData
148
);
149
150
//- Return new tmp interpolation scheme
151
static
tmp<limitedSurfaceInterpolationScheme<Type>
>
New
152
(
153
const
fvMesh
& mesh,
154
const
surfaceScalarField
& faceFlux,
155
Istream
& schemeData
156
);
157
158
159
// Destructor
160
161
virtual
~limitedSurfaceInterpolationScheme
();
162
163
164
// Member Functions
165
166
//- Return the interpolation weighting factors
167
virtual
tmp<surfaceScalarField>
limiter
168
(
169
const
GeometricField<Type, fvPatchField, volMesh>
&
170
)
const
= 0;
171
172
//- Return the interpolation weighting factors for the given field,
173
// by limiting the given weights with the given limiter
174
tmp<surfaceScalarField>
weights
175
(
176
const
GeometricField<Type, fvPatchField, volMesh>
&,
177
const
surfaceScalarField
& CDweights,
178
tmp<surfaceScalarField>
tLimiter
179
)
const
;
180
181
//- Return the interpolation weighting factors for the given field
182
virtual
tmp<surfaceScalarField>
weights
183
(
184
const
GeometricField<Type, fvPatchField, volMesh>
&
185
)
const
;
186
187
//- Return the interpolation weighting factors
188
virtual
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>
>
189
flux
190
(
191
const
GeometricField<Type, fvPatchField, volMesh>
&
192
)
const
;
193
};
194
195
196
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197
198
}
// End namespace Foam
199
200
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202
// Add the patch constructor functions to the hash tables
203
204
#define makelimitedSurfaceInterpolationTypeScheme(SS, Type) \
205
\
206
defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
207
\
208
surfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> > \
209
add##SS##Type##MeshConstructorToTable_; \
210
\
211
surfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> > \
212
add##SS##Type##MeshFluxConstructorToTable_; \
213
\
214
limitedSurfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> > \
215
add##SS##Type##MeshConstructorToLimitedTable_; \
216
\
217
limitedSurfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> >\
218
add##SS##Type##MeshFluxConstructorToLimitedTable_;
219
220
#define makelimitedSurfaceInterpolationScheme(SS) \
221
\
222
makelimitedSurfaceInterpolationTypeScheme(SS, scalar) \
223
makelimitedSurfaceInterpolationTypeScheme(SS, vector) \
224
makelimitedSurfaceInterpolationTypeScheme(SS, sphericalTensor) \
225
makelimitedSurfaceInterpolationTypeScheme(SS, symmTensor) \
226
makelimitedSurfaceInterpolationTypeScheme(SS, tensor)
227
228
229
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230
231
#ifdef NoRepository
232
# include <
finiteVolume/limitedSurfaceInterpolationScheme.C
>
233
#endif
234
235
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236
237
#endif
238
239
// ************************ vim: set sw=4 sts=4 et: ************************ //