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-2018 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  // Private Member Functions
77 
78  //- Disallow default bitwise copy construct
79  fvMeshMapper(const fvMeshMapper&);
80 
81  //- Disallow default bitwise assignment
82  void operator=(const fvMeshMapper&);
83 
84 
85 public:
86 
87  // Constructors
88 
89  //- Construct from fvMesh
90  fvMeshMapper(const fvMesh& mesh, const mapPolyMesh& mpm)
91  :
92  mesh_(mesh),
93  faceMap_(mpm),
94  cellMap_(mpm),
95  surfaceMap_(mesh, faceMap_),
96  boundaryMap_(mesh, faceMap_)
97  {}
98 
99 
100  // Member Functions
101 
102  //- Return reference to mesh
103  const fvMesh& mesh() const
104  {
105  return mesh_;
106  }
107 
108  //- Return reference to objectRegistry storing fields. Can be
109  // removed once fields stored on pointMesh.
110  const objectRegistry& thisDb() const
111  {
112  return mesh_;
113  }
114 
115  //- Return volume mapper
116  const morphFieldMapper& volMap() const
117  {
118  return cellMap_;
119  }
120 
121  //- Return surface mapper
122  const fvSurfaceMapper& surfaceMap() const
123  {
124  return surfaceMap_;
125  }
126 
127  //- Return boundary mapper
128  const fvBoundaryMeshMapper& boundaryMap() const
129  {
130  return boundaryMap_;
131  }
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:121
This object provides mapping and fill-in information for face data between the two meshes after the t...
Definition: faceMapper.H:55
Foam::fvBoundaryMeshMapper.
const morphFieldMapper & volMap() const
Return volume mapper.
Definition: fvMeshMapper.H:115
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:127
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:109
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Registry of regIOobjects.
const fvMesh & mesh() const
Return reference to mesh.
Definition: fvMeshMapper.H:102
Namespace for OpenFOAM.