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-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::volSurfaceMapping
29 
30 Description
31  Volume to surface and surface to volume mapping
32 
33 Author
34  Hrvoje Jasak, Wikki Ltd.
35 
36 SourceFiles
37  volSurfaceMapping.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef volSurfaceMapping_H
42 #define volSurfaceMapping_H
43 
44 #include "faMesh.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 template<class Type> class fvPatchField;
52 
53 /*---------------------------------------------------------------------------*\
54  Class volSurfaceMapping Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 {
59  // Private Data
60 
61  //- Reference to mesh
62  const faMesh& mesh_;
63 
64 
65 public:
66 
67  // Constructors
68 
69  //- Construct from mesh
71  :
72  mesh_(mesh)
73  {}
74 
75  //- No copy construct
76  volSurfaceMapping(const volSurfaceMapping&) = delete;
77 
78  //- No copy assignment
79  void operator=(const volSurfaceMapping&) = delete;
80 
81 
82  //- Destructor
83  ~volSurfaceMapping() = default;
84 
85 
86  // Member Functions
87 
88  //- Map droplet cloud sources to surface
89  template<class Type>
91  (
92  const typename
94  ) const;
95 
96 
97  //- Map patch internal field to surface
98  template<class Type>
100  (
101  const typename
103  ) const;
104 
105  //- Map surface field to volume boundary field
106  template<class Type>
107  void mapToVolume
108  (
111  ) const;
112 
113  //- Map surface tmp field to volume boundary field
114  template<class Type>
115  void mapToVolume
116  (
119  ) const;
120 
121  //- Map surface field to field assumes Field
122  //- faces in the same order as Boundary
123  template<class Type>
124  void mapToField
125  (
127  Field<Type>& f
128  ) const;
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #ifdef NoRepository
139  #include "volSurfaceMapping.C"
140 #endif
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: volSurfaceMapping.H:50
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::volSurfaceMapping::operator=
void operator=(const volSurfaceMapping &)=delete
No copy assignment.
Foam::volSurfaceMapping::mapToSurface
tmp< Field< Type > > mapToSurface(const typename GeometricField< Type, fvPatchField, volMesh >::Boundary &df) const
Map droplet cloud sources to surface.
Foam::volSurfaceMapping::~volSurfaceMapping
~volSurfaceMapping()=default
Destructor.
faMesh.H
Foam::volSurfaceMapping::volSurfaceMapping
volSurfaceMapping(const faMesh &mesh)
Construct from mesh.
Definition: volSurfaceMapping.H:69
Foam::volSurfaceMapping::mapToField
void mapToField(const GeometricField< Type, faPatchField, areaMesh > &af, Field< Type > &f) const
Definition: volSurfaceMapping.C:150
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::volSurfaceMapping::mapToVolume
void mapToVolume(const GeometricField< Type, faPatchField, areaMesh > &af, typename GeometricField< Type, fvPatchField, volMesh >::Boundary &bf) const
Map surface field to volume boundary field.
Definition: volSurfaceMapping.C:105
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
volSurfaceMapping.C
f
labelList f(nPoints)
Foam::volSurfaceMapping::mapInternalToSurface
tmp< Field< Type > > mapInternalToSurface(const typename GeometricField< Type, fvPatchField, volMesh >::Boundary &df) const
Map patch internal field to surface.
Foam::volSurfaceMapping
Volume to surface and surface to volume mapping.
Definition: volSurfaceMapping.H:56
Foam::faMesh
Finite area mesh. Used for 2-D non-Euclidian finite area method.
Definition: faMesh.H:77
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53