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
limitWith
limitWith.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::limitWith
26
27
Description
28
limitWith differencing scheme limits the specified scheme with the
29
specified limiter.
30
31
SourceFiles
32
limitWith.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef limitWith_H
37
#define limitWith_H
38
39
#include <
finiteVolume/surfaceInterpolationScheme.H
>
40
#include <
finiteVolume/limitedSurfaceInterpolationScheme.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class limitWith Declaration
49
\*---------------------------------------------------------------------------*/
50
51
template
<
class
Type>
52
class
limitWith
53
:
54
public
surfaceInterpolationScheme
<Type>
55
{
56
// Private Member Functions
57
58
//- Interpolation scheme
59
tmp<surfaceInterpolationScheme<Type>
> tInterp_;
60
61
//- Limiter
62
tmp<limitedSurfaceInterpolationScheme<Type>
> tLimiter_;
63
64
65
//- Disallow default bitwise copy construct
66
limitWith
(
const
limitWith
&);
67
68
//- Disallow default bitwise assignment
69
void
operator=(
const
limitWith
&);
70
71
72
public
:
73
74
//- Runtime type information
75
TypeName
(
"limitWith"
);
76
77
78
// Constructors
79
80
//- Construct from mesh and Istream.
81
// The name of the flux field is read from the Istream and looked-up
82
// from the mesh objectRegistry
83
limitWith
84
(
85
const
fvMesh
&
mesh
,
86
Istream
& is
87
)
88
:
89
surfaceInterpolationScheme<Type>
(
mesh
),
90
tInterp_
91
(
92
surfaceInterpolationScheme<Type>::New
(mesh, is)
93
),
94
tLimiter_
95
(
96
limitedSurfaceInterpolationScheme<Type>::New
(mesh, is)
97
)
98
{}
99
100
//- Construct from mesh, faceFlux and Istream
101
limitWith
102
(
103
const
fvMesh
& mesh,
104
const
surfaceScalarField
& faceFlux,
105
Istream
& is
106
)
107
:
108
surfaceInterpolationScheme<Type>
(
mesh
),
109
tInterp_
110
(
111
surfaceInterpolationScheme<Type>::New
(mesh, faceFlux, is)
112
),
113
tLimiter_
114
(
115
limitedSurfaceInterpolationScheme<Type>::New
(mesh, faceFlux, is)
116
)
117
{}
118
119
120
// Member Functions
121
122
//- Return the interpolation weighting factors
123
virtual
tmp<surfaceScalarField>
weights
124
(
125
const
GeometricField<Type, fvPatchField, volMesh>
& vf
126
)
const
127
{
128
return
tLimiter_().weights
129
(
130
vf,
131
tInterp_().
weights
(vf),
132
tLimiter_().
limiter
(vf)
133
);
134
}
135
136
//- Return true if this scheme uses an explicit correction
137
virtual
bool
corrected
()
const
138
{
139
return
tInterp_().corrected();
140
}
141
142
//- Return the explicit correction to the face-interpolate
143
// for the given field
144
virtual
tmp<GeometricField<Type, fvsPatchField, surfaceMesh>
>
145
correction
(
const
GeometricField<Type, fvPatchField, volMesh>
& vf)
const
146
{
147
return
tLimiter_().limiter(vf)*tInterp_().correction(vf);
148
}
149
};
150
151
152
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154
}
// End namespace Foam
155
156
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158
#endif
159
160
// ************************ vim: set sw=4 sts=4 et: ************************ //