1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Class containing mesh-to-mesh mapping information after a subset operation
33 \*---------------------------------------------------------------------------*/
35 #ifndef mapSubsetMesh_H
36 #define mapSubsetMesh_H
39 #include "labelList.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class mapSubsetMesh Declaration
48 \*---------------------------------------------------------------------------*/
56 //- Number of old live points
59 //- Number of old live faces
62 //- Number of old live cells
65 //- Point mapping array
66 const labelList pointMap_;
68 //- Face mapping array
69 const labelList faceMap_;
71 //- Cell mapping array
72 const labelList cellMap_;
74 //- Patch for exposed faces
75 const label exposedPatchID_;
77 //- List of the old patch sizes
78 labelList oldPatchSizes_;
80 //- List of the old patch start labels
81 const labelList oldPatchStarts_;
83 //- List of numbers of mesh points per old patch
84 const labelList oldPatchNMeshPoints_;
90 //- Construct from components
93 const label nOldPoints,
94 const label nOldFaces,
95 const label nOldCells,
96 const labelList& pointMap,
97 const labelList& faceMap,
98 const labelList& cellMap,
99 const label exposedPatchID,
100 const labelList& oldPatchStarts,
101 const labelList& oldPatchNMeshPoints
104 //- Construct from components and optionally reuse storage
107 const label nOldPoints,
108 const label nOldFaces,
109 const label nOldCells,
113 const label exposedPatchID,
114 labelList& oldPatchStarts,
115 labelList& oldPatchNMeshPoints,
124 //- Number of old points
125 label nOldPoints() const
130 //- Number of old internal faces
131 label nOldInternalFaces() const
133 return oldPatchStarts_[0];
136 //- Number of old faces
137 label nOldFaces() const
142 //- Number of old cells
143 label nOldCells() const
148 //- Patch that exposed faces were put into
149 label exposedPatchID() const
151 return exposedPatchID_;
155 // Contains the old point label for all points of the subsetted
157 const labelList& pointMap() const
163 // Contains the old point label for all faces of the subsetted
165 const labelList& faceMap() const
171 // Contains the old point label for all cells of the subsetted
173 const labelList& cellMap() const
178 //- Return list of the old patch sizes
179 const labelList& oldPatchSizes() const
181 return oldPatchSizes_;
184 //- Return list of the old patch start labels
185 const labelList& oldPatchStarts() const
187 return oldPatchStarts_;
190 //- Return numbers of mesh points per old patch
191 const labelList& oldPatchNMeshPoints() const
193 return oldPatchNMeshPoints_;
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 } // End namespace Foam
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 // ************************************************************************* //