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
OpenFOAM
fields
pointPatchFields
basic
mixed
mixedPointPatchField.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::mixedPointPatchField
26
27
Description
28
A mixed FixedValue / ZeroGradient boundary condition for pointField.
29
30
I am still not sure how to do the FixedValue-fixedGradient combination.
31
32
SourceFiles
33
mixedPointPatchField.C
34
35
\*---------------------------------------------------------------------------*/
36
37
#ifndef mixedPointPatchField_H
38
#define mixedPointPatchField_H
39
40
#include <
OpenFOAM/valuePointPatchField.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class mixedPointPatchField Declaration
49
\*---------------------------------------------------------------------------*/
50
51
template
<
class
Type>
52
class
mixedPointPatchField
53
:
54
public
valuePointPatchField
<Type>
55
{
56
// Private data
57
58
//- Value field
59
Field<Type>
refValue_;
60
61
//- Fraction (0-1) of value used for boundary condition
62
scalarField
valueFraction_;
63
64
65
// Private member functions
66
67
void
checkFieldSize()
const
;
68
69
70
public
:
71
72
//- Runtime type information
73
TypeName
(
"mixed"
);
74
75
76
// Constructors
77
78
//- Construct from patch and internal field
79
mixedPointPatchField
80
(
81
const
pointPatch
&,
82
const
DimensionedField<Type, pointMesh>
&
83
);
84
85
//- Construct from patch, internal field and dictionary
86
mixedPointPatchField
87
(
88
const
pointPatch
&,
89
const
DimensionedField<Type, pointMesh>
&,
90
const
dictionary
&
91
);
92
93
//- Construct by mapping given patchField<Type> onto a new patch
94
mixedPointPatchField
95
(
96
const
mixedPointPatchField<Type>
&,
97
const
pointPatch
&,
98
const
DimensionedField<Type, pointMesh>
&,
99
const
pointPatchFieldMapper
&
100
);
101
102
//- Construct and return a clone
103
virtual
autoPtr<pointPatchField<Type>
>
clone
()
const
104
{
105
return
autoPtr<pointPatchField<Type>
>
106
(
107
new
mixedPointPatchField<Type>
108
(
109
*this
110
)
111
);
112
}
113
114
//- Construct as copy setting internal field reference
115
mixedPointPatchField
116
(
117
const
mixedPointPatchField<Type>
&,
118
const
DimensionedField<Type, pointMesh>
&
119
);
120
121
//- Construct and return a clone setting internal field reference
122
virtual
autoPtr<pointPatchField<Type>
>
clone
123
(
124
const
DimensionedField<Type, pointMesh>
& iF
125
)
const
126
{
127
return
autoPtr<pointPatchField<Type>
>
128
(
129
new
mixedPointPatchField<Type>
130
(
131
*
this
,
132
iF
133
)
134
);
135
}
136
137
138
// Member functions
139
140
// Return defining fields
141
142
virtual
Field<Type>
&
refValue
()
143
{
144
return
refValue_;
145
}
146
147
virtual
const
Field<Type>
&
refValue
()
const
148
{
149
return
refValue_;
150
}
151
152
virtual
scalarField
&
valueFraction
()
153
{
154
return
valueFraction_;
155
}
156
157
virtual
const
scalarField
&
valueFraction
()
const
158
{
159
return
valueFraction_;
160
}
161
162
163
// Mapping functions
164
165
//- Map (and resize as needed) from self given a mapping object
166
virtual
void
autoMap
167
(
168
const
pointPatchFieldMapper
&
169
);
170
171
//- Reverse map the given PointPatchField onto
172
// this PointPatchField
173
virtual
void
rmap
174
(
175
const
pointPatchField<Type>
&,
176
const
labelList
&
177
);
178
179
180
// Evaluation functions
181
182
//- Update the patch field
183
virtual
void
evaluate
184
(
185
const
Pstream::commsTypes
commsType=
Pstream::blocking
186
);
187
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 <
OpenFOAM/mixedPointPatchField.C
>
202
#endif
203
204
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205
206
#endif
207
208
// ************************ vim: set sw=4 sts=4 et: ************************ //