BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / finiteVolume / fvMesh / fvMeshMapper / fvMeshMapper.H
blob41d049bbb6d9238a679352df9fde0424590bb48b
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     Foam::fvMeshMapper
27 Description
28     Class holds all the necessary information for mapping fields associated
29     with fvMesh.
30 SourceFiles
31     fvMeshMapper.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef fvMeshMapper_H
36 #define fvMeshMapper_H
38 #include "faceMapper.H"
39 #include "cellMapper.H"
40 #include "fvSurfaceMapper.H"
41 #include "fvBoundaryMeshMapper.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 // Forward declaration of classes
49 class fvMesh;
50 class mapPolyMesh;
52 /*---------------------------------------------------------------------------*\
53                         Class fvMeshMapper Declaration
54 \*---------------------------------------------------------------------------*/
56 class fvMeshMapper
58     // Private data
60         //- Reference to mesh
61         const fvMesh& mesh_;
63         //- Face mapper
64         faceMapper faceMap_;
66         //- Cell mapper
67         cellMapper cellMap_;
69         //- Surface mapper (needs to be shortened for internal faces only)
70         fvSurfaceMapper surfaceMap_;
72         //- Boundary mapper
73         fvBoundaryMeshMapper boundaryMap_;
76     // Private Member Functions
78         //- Disallow default bitwise copy construct
79         fvMeshMapper(const fvMeshMapper&);
81         //- Disallow default bitwise assignment
82         void operator=(const fvMeshMapper&);
85 public:
87     // Constructors
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         {}
100     // Member Functions
102         //- Return reference to mesh
103         const fvMesh& mesh() const
104         {
105             return mesh_;
106         }
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         }
115         //- Return volume mapper
116         const morphFieldMapper& volMap() const
117         {
118             return cellMap_;
119         }
121         //- Return surface mapper
122         const fvSurfaceMapper& surfaceMap() const
123         {
124             return surfaceMap_;
125         }
127         //- Return boundary mapper
128         const fvBoundaryMeshMapper& boundaryMap() const
129         {
130             return boundaryMap_;
131         }
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 } // End namespace Foam
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 #endif
143 // ************************************************************************* //