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-2021 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 "faMesh.H"
45#include "volMesh.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// Forward Declarations
53template<class Type> class fvPatchField;
54
55/*---------------------------------------------------------------------------*\
56 Class volSurfaceMapping Declaration
57\*---------------------------------------------------------------------------*/
60{
61 // Private Data
62
63 //- Reference to mesh
64 const faMesh& mesh_;
65
66
67public:
68
69 // Constructors
70
71 //- Construct from mesh
73 :
74 mesh_(mesh)
75 {}
76
77 //- No copy construct
78 volSurfaceMapping(const volSurfaceMapping&) = delete;
79
80 //- No copy assignment
81 void operator=(const volSurfaceMapping&) = delete;
82
83
84 //- Destructor
85 ~volSurfaceMapping() = default;
86
87
88 // Member Functions
89
90 //- Map volume boundary field to surface
91 template<class Type>
93 (
95 ) const;
96
97 //- Map vol Field to surface Field
98 template<class Type>
100
101 //- Map patch internal field to surface
102 template<class Type>
104 (
106 ) const;
107
108 //- Map surface field to volume boundary field
109 template<class Type>
110 void mapToVolume
111 (
114 ) const;
115
116 //- Map surface tmp field to volume boundary field
117 template<class Type>
118 void mapToVolume
119 (
122 ) const;
123
124 //- Map surface field to field
125 // Assumes Field faces in the same order as Boundary
126 template<class Type>
127 void mapToField
128 (
131 ) const;
132
133 //- Map surface field to volume field
134 // Assumes Field faces in the same order as Boundary
135 template<class Type>
136 void mapToField
137 (
138 const Field<Type>& af,
140 ) const;
141};
142
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146} // End namespace Foam
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150#ifdef NoRepository
151 #include "volSurfaceMapping.C"
152#endif
153
154// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156#endif
157
158// ************************************************************************* //
Generic templated field type.
Definition: Field.H:82
Generic GeometricBoundaryField class.
Generic GeometricField class.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition: faMesh.H:100
A class for managing temporary objects.
Definition: tmp.H:65
Volume to surface and surface to volume mapping.
volSurfaceMapping(const faMesh &mesh)
Construct from mesh.
volSurfaceMapping(const volSurfaceMapping &)=delete
No copy construct.
void operator=(const volSurfaceMapping &)=delete
No copy assignment.
tmp< Field< Type > > mapToSurface(const Field< Type > &f) const
Map vol Field to surface Field.
~volSurfaceMapping()=default
Destructor.
tmp< Field< Type > > mapToSurface(const GeometricBoundaryField< Type, fvPatchField, volMesh > &df) const
Map volume boundary field to surface.
void mapToVolume(const GeometricField< Type, faPatchField, areaMesh > &af, GeometricBoundaryField< Type, fvPatchField, volMesh > &bf) const
Map surface field to volume boundary field.
void mapToField(const GeometricField< Type, faPatchField, areaMesh > &af, Field< Type > &f) const
Map surface field to field.
tmp< Field< Type > > mapInternalToSurface(const GeometricBoundaryField< Type, fvPatchField, volMesh > &df) const
Map patch internal field to surface.
dynamicFvMesh & mesh
Namespace for OpenFOAM.
labelList f(nPoints)