fvMeshMapper.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) 2011 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::fvMeshMapper
28
29Description
30 Class holds all the necessary information for mapping fields associated
31 with fvMesh.
32SourceFiles
33 fvMeshMapper.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef fvMeshMapper_H
38#define fvMeshMapper_H
39
40#include "faceMapper.H"
41#include "cellMapper.H"
42#include "fvSurfaceMapper.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50// Forward declaration of classes
51class fvMesh;
52class mapPolyMesh;
53
54/*---------------------------------------------------------------------------*\
55 Class fvMeshMapper Declaration
56\*---------------------------------------------------------------------------*/
58class fvMeshMapper
59{
60 // Private data
61
62 //- Reference to mesh
63 const fvMesh& mesh_;
64
65 //- Face mapper
66 faceMapper faceMap_;
67
68 //- Cell mapper
69 cellMapper cellMap_;
70
71 //- Surface mapper (needs to be shortened for internal faces only)
72 fvSurfaceMapper surfaceMap_;
73
74 //- Boundary mapper
75 fvBoundaryMeshMapper boundaryMap_;
76
77
78 // Private Member Functions
79
80 //- No copy construct
81 fvMeshMapper(const fvMeshMapper&) = delete;
82
83 //- No copy assignment
84 void operator=(const fvMeshMapper&) = delete;
85
86
87public:
88
89 // Constructors
90
91 //- Construct from fvMesh
92 fvMeshMapper(const fvMesh& mesh, const mapPolyMesh& mpm)
93 :
94 mesh_(mesh),
95 faceMap_(mpm),
96 cellMap_(mpm),
97 surfaceMap_(mesh, faceMap_),
98 boundaryMap_(mesh, faceMap_)
99 {}
100
101
102 // Member Functions
103
104 //- Return reference to mesh
105 const fvMesh& mesh() const
106 {
107 return mesh_;
108 }
109
110 //- Return reference to objectRegistry storing fields. Can be
111 // removed once fields stored on pointMesh.
112 const objectRegistry& thisDb() const
113 {
114 return mesh_;
115 }
116
117 //- Return volume mapper
118 const morphFieldMapper& volMap() const
119 {
120 return cellMap_;
121 }
122
123 //- Return surface mapper
124 const fvSurfaceMapper& surfaceMap() const
125 {
126 return surfaceMap_;
127 }
128
129 //- Return boundary mapper
130 const fvBoundaryMeshMapper& boundaryMap() const
131 {
132 return boundaryMap_;
133 }
134};
135
136
137// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139} // End namespace Foam
140
141// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142
143#endif
144
145// ************************************************************************* //
This object provides mapping and fill-in information for cell data between the two meshes after the t...
Definition: cellMapper.H:59
This object provides mapping and fill-in information for face data between the two meshes after the t...
Definition: faceMapper.H:60
Foam::fvBoundaryMeshMapper.
Class holds all the necessary information for mapping fields associated with fvMesh.
Definition: fvMeshMapper.H:58
const fvSurfaceMapper & surfaceMap() const
Return surface mapper.
Definition: fvMeshMapper.H:123
const fvBoundaryMeshMapper & boundaryMap() const
Return boundary mapper.
Definition: fvMeshMapper.H:129
const objectRegistry & thisDb() const
Return reference to objectRegistry storing fields. Can be.
Definition: fvMeshMapper.H:111
fvMeshMapper(const fvMesh &mesh, const mapPolyMesh &mpm)
Construct from fvMesh.
Definition: fvMeshMapper.H:91
const fvMesh & mesh() const
Return reference to mesh.
Definition: fvMeshMapper.H:104
const morphFieldMapper & volMap() const
Return volume mapper.
Definition: fvMeshMapper.H:117
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
FV surface mapper.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
Abstract base class to hold the Field mapping for mesh morphs.
Registry of regIOobjects.
Namespace for OpenFOAM.