Loading...
Searching...
No Matches
volSurfaceMapping.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2017 Wikki Ltd
9 Copyright (C) 2019-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::volSurfaceMapping
29
30Description
31 Volume to surface and surface to volume mapping
32
33Author
34 Hrvoje Jasak, Wikki Ltd.
35
36SourceFiles
37 volSurfaceMapping.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_volSurfaceMapping_H
42#define Foam_volSurfaceMapping_H
43
44#include "areaFields.H"
45#include "volMesh.H"
46#include "surfaceMesh.H"
47#include "PtrList.H"
48#include "PtrMap.H"
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
54
55// Forward Declarations
56template<class Type> class fvPatchField;
57template<class Type> class fvsPatchField;
59/*---------------------------------------------------------------------------*\
60 Class volSurfaceMapping Declaration
61\*---------------------------------------------------------------------------*/
62
64{
65 // Private Data
66
67 //- Reference to mesh
68 const faMesh& mesh_;
69
70
71public:
72
73 // Constructors
74
75 //- Construct from mesh
76 explicit volSurfaceMapping(const faMesh& mesh)
77 :
78 mesh_(mesh)
79 {}
80
81 //- No copy construct
82 volSurfaceMapping(const volSurfaceMapping&) = delete;
84 //- No copy assignment
85 void operator=(const volSurfaceMapping&) = delete;
86
87
88 //- Destructor
89 ~volSurfaceMapping() = default;
90
91
92 // Mapping to area fields
93
94 //- Map volume boundary fields as area field
95 template<class Type>
96 void mapToSurface
97 (
99 Field<Type>& result
100 ) const;
101
102 //- Map volume boundary fields as area field
103 template<class Type>
105 (
107 ) const;
108
109 //- Map volume (boundary) fields to area field
110 template<class Type>
111 void mapToSurface
112 (
114 Field<Type>& result
115 ) const;
116
117 //- Map volume (boundary) fields to area field
118 template<class Type>
119 void mapToSurface
120 (
122 Field<Type>& result
123 ) const;
124
125 //- Map volume (boundary) fields to area field
126 template<class Type>
128 (
130 ) const;
131
132 //- Map volume (boundary) fields to area field
133 template<class Type>
135 (
137 ) const;
138
139
140 //- Map surface fields to area field
141 template<class Type>
143 (
145 Field<Type>& result
146 ) const;
147
148 //- Map surface fields to area field
149 template<class Type>
153 ) const;
154
155 //- Map surface fields to area field
156 template<class Type>
157 void mapToSurface
158 (
160 Field<Type>& result
161 ) const;
162
163 //- Map surface fields to area field
164 template<class Type>
166 (
168 ) const;
169
170
171 //- Map pre-calculated boundary fields to area field
172 template<class Type>
173 void mapToSurface
174 (
175 const UPtrList<Field<Type>>& patchFields,
176 Field<Type>& result
177 ) const;
178
179 //- Map pre-calculated boundary fields to area field
180 template<class Type>
181 void mapToSurface
182 (
183 const PtrMap<Field<Type>>& patchFields,
184 Field<Type>& result
185 ) const;
186
187 //- Map pre-calculated boundary fields to area field
188 template<class Type>
191 const UPtrList<Field<Type>>& patchFields
192 ) const;
193
194 //- Map pre-calculated boundary fields to area field
195 template<class Type>
197 (
198 const PtrMap<Field<Type>>& patchFields
199 ) const;
200
201
202 //- Map patch internal field to area field
203 template<class Type>
205 (
207 Field<Type>& result
208 ) const;
209
210 //- Map patch internal field to area field
211 template<class Type>
213 (
215 ) const;
216
217 //- Map patch internal field to area field
218 template<class Type>
222 Field<Type>& result
223 ) const;
224
225 //- Map patch internal field to area field
226 template<class Type>
228 (
230 Field<Type>& result
231 ) const;
232
233 //- Map patch internal field to area field
234 template<class Type>
236 (
238 ) const;
239
240 //- Map patch internal field to area field
241 template<class Type>
243 (
245 ) const;
246
247
248 // Mapping from area field to volume (boundary) field
250 //- Map area field to volume boundary field,
251 //- optionally restricted to a single destination patch
252 template<class Type>
253 void mapToVolume
254 (
257 const label destPatchi = -1
258 ) const;
259
260 //- Map area field to volume boundary field,
261 //- optionally restricted to a single destination patch
262 template<class Type>
263 void mapToVolume
264 (
267 const label destPatchi = -1
268 ) const;
269
270 //- Map area field to volume boundary field,
271 //- optionally restricted to a single destination patch
272 template<class Type>
273 void mapToVolume
274 (
277 const label destPatchi = -1
278 ) const;
279
280 //- Map area field to volume boundary field,
281 //- optionally restricted to a single destination patch
282 template<class Type>
283 void mapToVolume
284 (
287 const label destPatchi = -1
288 ) const;
289
290 //- Map tmp area field to volume boundary field,
291 //- optionally restricted to a single destination patch
292 template<class Type>
293 void mapToVolume
294 (
297 const label destPatchi = -1
298 ) const;
299
300 //- Map tmp area field to volume boundary field,
301 //- optionally restricted to a single destination patch
302 template<class Type>
303 void mapToVolume
304 (
307 const label destPatchi = -1
308 ) const;
309
310
311 // Mapping from area field to volume patch field
312
313 //- Map area field to a volume boundary patch
314 template<class Type>
316 (
318 Field<Type>& dest,
319 const label destPatchi
320 ) const;
321
322 //- Map tmp area field to a volume boundary patch
323 template<class Type>
325 (
327 Field<Type>& dest,
328 const label destPatchi
329 ) const;
330
331 //- Map tmp area field to a volume boundary patch
332 template<class Type>
334 (
336 Field<Type>& dest,
337 const label destPatchi
338 ) const;
339};
340
341
342// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
343
344} // End namespace Foam
345
346// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
347
348#ifdef NoRepository
349 #include "volSurfaceMapping.C"
350#endif
351
352// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
353
354#endif
355
356// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Definition Field.H:172
Generic GeometricBoundaryField class.
Generic GeometricField class.
A HashTable of pointers to objects of type <T> with a label key.
Definition PtrMap.H:49
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition UPtrList.H:101
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
A class for managing temporary objects.
Definition tmp.H:75
Volume to surface and surface to volume mapping.
volSurfaceMapping(const faMesh &mesh)
Construct from mesh.
volSurfaceMapping(const volSurfaceMapping &)=delete
No copy construct.
tmp< Field< Type > > mapInternalToSurface(const GeometricBoundaryField< Type, fvPatchField, volMesh > &) const
Map patch internal field to area field.
void operator=(const volSurfaceMapping &)=delete
No copy assignment.
tmp< Field< Type > > mapToSurface(const GeometricField< Type, fvPatchField, volMesh > &) const
Map volume (boundary) fields to area field.
tmp< Field< Type > > mapInternalToSurface(const GeometricField< Type, fvPatchField, volMesh > &) const
Map patch internal field to area field.
~volSurfaceMapping()=default
Destructor.
tmp< Field< Type > > mapToSurface(const PtrMap< Field< Type > > &patchFields) const
Map pre-calculated boundary fields to area field.
void mapInternalToSurface(const GeometricBoundaryField< Type, fvPatchField, volMesh > &, Field< Type > &result) const
Map patch internal field to area field.
tmp< Field< Type > > mapToSurface(const GeometricBoundaryField< Type, fvPatchField, volMesh > &) const
Map volume boundary fields as area field.
tmp< Field< Type > > mapToSurface(const UPtrList< Field< Type > > &patchFields) const
Map pre-calculated boundary fields to area field.
tmp< Field< Type > > mapInternalToSurface(const tmp< GeometricField< Type, fvPatchField, volMesh > > &) const
Map patch internal field to area field.
void mapToVolume(const DimensionedField< Type, areaMesh > &, GeometricBoundaryField< Type, fvPatchField, volMesh > &dest, const label destPatchi=-1) const
Map area field to volume boundary field, optionally restricted to a single destination patch.
void mapToVolumePatch(const DimensionedField< Type, areaMesh > &af, Field< Type > &dest, const label destPatchi) const
Map area field to a volume boundary patch.
tmp< Field< Type > > mapToSurface(const tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > &) const
Map surface fields to area field.
void mapToSurface(const GeometricBoundaryField< Type, fvPatchField, volMesh > &, Field< Type > &result) const
Map volume boundary fields as area field.
tmp< Field< Type > > mapToSurface(const tmp< GeometricField< Type, fvPatchField, volMesh > > &) const
Map volume (boundary) fields to area field.
tmp< Field< Type > > mapToSurface(const GeometricField< Type, fvsPatchField, surfaceMesh > &) const
Map surface fields to area field.
dynamicFvMesh & mesh
Namespace for OpenFOAM.