1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Copyright held by the original author
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh 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 3 of the License, or (at your
14 option) any later version.
16 cfMesh 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 cfMesh. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "polyMeshGenAddressing.H"
27 #include "demandDrivenData.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
36 void polyMeshGenAddressing::printAllocated() const
38 Pout << "polyMeshGenAddressing allocated :" << endl;
42 Pout<< " Edges" << endl;
47 Pout<< " Cell-cells" << endl;
52 Pout<< " Edge-cells" << endl;
57 Pout<< " Point-cells" << endl;
62 Pout<< " Edge-faces" << endl;
67 Pout<< " Point-faces" << endl;
72 Pout<< " Cell-edges" << endl;
77 Pout<< " Face-edges" << endl;
82 Pout<< " Point-edges" << endl;
87 Pout<< " Point-point" << endl;
92 Pout<< " Cell-point" << endl;
98 Pout<< " Cell-centres" << endl;
101 if( faceCentresPtr_ )
103 Pout<< " Face-centres" << endl;
106 if( cellVolumesPtr_ )
108 Pout<< " Cell-volumes" << endl;
113 Pout<< " Face-areas" << endl;
117 void polyMeshGenAddressing::clearGeom()
121 Pout<< "polyMeshGenAddressing::clearGeom() : "
122 << "clearing geometric data"
126 deleteDemandDrivenData(cellCentresPtr_);
127 deleteDemandDrivenData(faceCentresPtr_);
128 deleteDemandDrivenData(cellVolumesPtr_);
129 deleteDemandDrivenData(faceAreasPtr_);
132 void polyMeshGenAddressing::clearAddressing()
136 Pout<< "polyMeshGenAddressing::clearAddressing() : "
137 << "clearing topology"
143 deleteDemandDrivenData(ccPtr_);
144 deleteDemandDrivenData(ecPtr_);
145 deleteDemandDrivenData(pcPtr_);
147 deleteDemandDrivenData(efPtr_);
148 deleteDemandDrivenData(pfPtr_);
150 deleteDemandDrivenData(cePtr_);
151 deleteDemandDrivenData(fePtr_);
152 deleteDemandDrivenData(pePtr_);
153 deleteDemandDrivenData(ppPtr_);
154 deleteDemandDrivenData(cpPtr_);
157 void polyMeshGenAddressing::clearParallelAddressing()
159 deleteDemandDrivenData(globalPointLabelPtr_);
160 deleteDemandDrivenData(globalFaceLabelPtr_);
161 deleteDemandDrivenData(globalCellLabelPtr_);
162 deleteDemandDrivenData(globalEdgeLabelPtr_);
164 deleteDemandDrivenData(pProcsPtr_);
165 deleteDemandDrivenData(globalToLocalPointAddressingPtr_);
166 deleteDemandDrivenData(pointNeiProcsPtr_);
167 deleteDemandDrivenData(eProcsPtr_);
168 deleteDemandDrivenData(globalToLocalEdgeAddressingPtr_);
169 deleteDemandDrivenData(edgeNeiProcsPtr_);
172 void polyMeshGenAddressing::clearOut()
176 clearParallelAddressing();
180 void polyMeshGenAddressing::clearAll()
184 clearParallelAddressing();
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 } // End namespace Foam
191 // ************************************************************************* //