All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fvMeshMapper.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
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::fvMeshMapper
26 
27 Description
28  Class holds all the necessary information for mapping fields associated
29  with fvMesh.
30 SourceFiles
31  fvMeshMapper.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef fvMeshMapper_H
36 #define fvMeshMapper_H
37 
38 #include "faceMapper.H"
39 #include "cellMapper.H"
40 #include "fvSurfaceMapper.H"
41 #include "fvBoundaryMeshMapper.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward declaration of classes
49 class fvMesh;
50 class mapPolyMesh;
51 
52 /*---------------------------------------------------------------------------*\
53  Class fvMeshMapper Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class fvMeshMapper
57 {
58  // Private Data
59 
60  //- Reference to mesh
61  const fvMesh& mesh_;
62 
63  //- Face mapper
64  faceMapper faceMap_;
65 
66  //- Cell mapper
67  cellMapper cellMap_;
68 
69  //- Surface mapper (needs to be shortened for internal faces only)
70  fvSurfaceMapper surfaceMap_;
71 
72  //- Boundary mapper
73  fvBoundaryMeshMapper boundaryMap_;
74 
75 
76 public:
77 
78  // Constructors
79 
80  //- Construct from fvMesh
81  fvMeshMapper(const fvMesh& mesh, const mapPolyMesh& mpm)
82  :
83  mesh_(mesh),
84  faceMap_(mpm),
85  cellMap_(mpm),
86  surfaceMap_(mesh, faceMap_),
87  boundaryMap_(mesh, faceMap_)
88  {}
89 
90  //- Disallow default bitwise copy construction
91  fvMeshMapper(const fvMeshMapper&) = delete;
92 
93 
94  // Member Functions
95 
96  //- Return reference to mesh
97  const fvMesh& mesh() const
98  {
99  return mesh_;
100  }
101 
102  //- Return reference to objectRegistry storing fields. Can be
103  // removed once fields stored on pointMesh.
104  const objectRegistry& thisDb() const
105  {
106  return mesh_;
107  }
108 
109  //- Return volume mapper
110  const morphFieldMapper& volMap() const
111  {
112  return cellMap_;
113  }
114 
115  //- Return surface mapper
116  const fvSurfaceMapper& surfaceMap() const
117  {
118  return surfaceMap_;
119  }
120 
121  //- Return boundary mapper
122  const fvBoundaryMeshMapper& boundaryMap() const
123  {
124  return boundaryMap_;
125  }
126 
127 
128  // Member Operators
129 
130  //- Disallow default bitwise assignment
131  void operator=(const fvMeshMapper&) = delete;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
const fvSurfaceMapper & surfaceMap() const
Return surface mapper.
Definition: fvMeshMapper.H:115
This object provides mapping and fill-in information for face data between the two meshes after the t...
Definition: faceMapper.H:55
Foam::fvBoundaryMeshMapper.
void operator=(const fvMeshMapper &)=delete
Disallow default bitwise assignment.
const morphFieldMapper & volMap() const
Return volume mapper.
Definition: fvMeshMapper.H:109
This object provides mapping and fill-in information for cell data between the two meshes after the t...
Definition: cellMapper.H:54
FV surface mapper.
Class holds all the necessary information for mapping fields associated with fvMesh.
Definition: fvMeshMapper.H:55
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
const fvBoundaryMeshMapper & boundaryMap() const
Return boundary mapper.
Definition: fvMeshMapper.H:121
Abstract base class to hold the Field mapping for mesh morphs.
const objectRegistry & thisDb() const
Return reference to objectRegistry storing fields. Can be.
Definition: fvMeshMapper.H:103
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
fvMeshMapper(const fvMesh &mesh, const mapPolyMesh &mpm)
Construct from fvMesh.
Definition: fvMeshMapper.H:80
Registry of regIOobjects.
const fvMesh & mesh() const
Return reference to mesh.
Definition: fvMeshMapper.H:96
Namespace for OpenFOAM.