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
fields
fvPatchFields
basic
coupled
coupledFvPatchField.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::coupledFvPatchField
26
27
Description
28
Foam::coupledFvPatchField
29
30
SourceFiles
31
coupledFvPatchField.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef coupledFvPatchField_H
36
#define coupledFvPatchField_H
37
38
#include <
OpenFOAM/lduInterfaceField.H
>
39
#include <
finiteVolume/fvPatchField.H
>
40
#include <
finiteVolume/coupledFvPatch.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class coupledFvPatch Declaration
49
\*---------------------------------------------------------------------------*/
50
51
template
<
class
Type>
52
class
coupledFvPatchField
53
:
54
public
lduInterfaceField
,
55
public
fvPatchField
<Type>
56
{
57
58
public
:
59
60
//- Runtime type information
61
TypeName
(coupledFvPatch::typeName_());
62
63
64
// Constructors
65
66
//- Construct from patch and internal field
67
coupledFvPatchField
68
(
69
const
fvPatch
&,
70
const
DimensionedField<Type, volMesh>
&
71
);
72
73
//- Construct from patch and internal field and patch field
74
coupledFvPatchField
75
(
76
const
fvPatch
&,
77
const
DimensionedField<Type, volMesh>
&,
78
const
Field<Type>
&
79
);
80
81
//- Construct from patch, internal field and dictionary
82
coupledFvPatchField
83
(
84
const
fvPatch
&,
85
const
DimensionedField<Type, volMesh>
&,
86
const
dictionary
&
87
);
88
89
//- Construct by mapping the given coupledFvPatchField onto a new patch
90
coupledFvPatchField
91
(
92
const
coupledFvPatchField<Type>
&,
93
const
fvPatch
&,
94
const
DimensionedField<Type, volMesh>
&,
95
const
fvPatchFieldMapper
&
96
);
97
98
//- Construct as copy
99
coupledFvPatchField
100
(
101
const
coupledFvPatchField<Type>
&
102
);
103
104
//- Construct and return a clone
105
virtual
tmp<fvPatchField<Type>
>
clone
()
const
= 0;
106
107
//- Construct as copy setting internal field reference
108
coupledFvPatchField
109
(
110
const
coupledFvPatchField<Type>
&,
111
const
DimensionedField<Type, volMesh>
&
112
);
113
114
//- Construct and return a clone
115
virtual
tmp<fvPatchField<Type>
>
clone
116
(
117
const
DimensionedField<Type, volMesh>
&
118
)
const
= 0;
119
120
121
// Member functions
122
123
// Access
124
125
//- Return true if this patch field is derived from
126
// coupledFvPatchField<Type>.
127
virtual
bool
coupled
()
const
128
{
129
return
true
;
130
}
131
132
//- Return neighbour field of internal field
133
virtual
tmp<Field<Type>
>
patchNeighbourField
()
const
= 0;
134
135
136
// Evaluation functions
137
138
//- Return patch-normal gradient
139
virtual
tmp<Field<Type>
>
snGrad
()
const
;
140
141
//- Initialise the evaluation of the patch field
142
virtual
void
initEvaluate
143
(
144
const
Pstream::commsTypes
commsType
145
);
146
147
//- Evaluate the patch field
148
virtual
void
evaluate
149
(
150
const
Pstream::commsTypes
commsType
151
);
152
153
//- Return the matrix diagonal coefficients corresponding to the
154
// evaluation of the value of this patchField with given weights
155
virtual
tmp<Field<Type>
>
valueInternalCoeffs
156
(
157
const
tmp<scalarField>
&
158
)
const
;
159
160
//- Return the matrix source coefficients corresponding to the
161
// evaluation of the value of this patchField with given weights
162
virtual
tmp<Field<Type>
>
valueBoundaryCoeffs
163
(
164
const
tmp<scalarField>
&
165
)
const
;
166
167
//- Return the matrix diagonal coefficients corresponding to the
168
// evaluation of the gradient of this patchField
169
virtual
tmp<Field<Type>
>
gradientInternalCoeffs
()
const
;
170
171
//- Return the matrix source coefficients corresponding to the
172
// evaluation of the gradient of this patchField
173
virtual
tmp<Field<Type>
>
gradientBoundaryCoeffs
()
const
;
174
175
176
// Coupled interface functionality
177
178
//- Update result field based on interface functionality
179
virtual
void
updateInterfaceMatrix
180
(
181
const
scalarField
& psiInternal,
182
scalarField
& result,
183
const
lduMatrix
&,
184
const
scalarField
& coeffs,
185
const
direction
,
186
const
Pstream::commsTypes
commsType
187
)
const
= 0;
188
189
//- Write
190
virtual
void
write
(
Ostream
&)
const
;
191
};
192
193
194
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195
196
}
// End namespace Foam
197
198
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199
200
#ifdef NoRepository
201
# include <
finiteVolume/coupledFvPatchField.C
>
202
#endif
203
204
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205
206
#endif
207
208
// ************************ vim: set sw=4 sts=4 et: ************************ //