Fixed URL for libccmio-2.6.1 (bug report #5 by Thomas Oliveira)
[foam-extend-3.2.git] / src / mesh / cfMesh / utilities / meshes / polyMeshGenAddressing / polyMeshGenAddressingClear.C
blobe37810c3ba5b10736b97ea1a21ad0df631866ed7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | cfMesh: A library for mesh generation
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by the original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 namespace Foam
34 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
36 void polyMeshGenAddressing::printAllocated() const
38     Pout << "polyMeshGenAddressing allocated :" << endl;
40     if( edgesPtr_ )
41     {
42         Pout<< "    Edges" << endl;
43     }
45     if( ccPtr_ )
46     {
47         Pout<< "    Cell-cells" << endl;
48     }
50     if( ecPtr_ )
51     {
52         Pout<< "    Edge-cells" << endl;
53     }
55     if (pcPtr_)
56     {
57         Pout<< "    Point-cells" << endl;
58     }
60     if( efPtr_ )
61     {
62         Pout<< "    Edge-faces" << endl;
63     }
65     if (pfPtr_)
66     {
67         Pout<< "    Point-faces" << endl;
68     }
70     if( cePtr_ )
71     {
72         Pout<< "    Cell-edges" << endl;
73     }
75     if( fePtr_ )
76     {
77         Pout<< "    Face-edges" << endl;
78     }
80     if( pePtr_ )
81     {
82         Pout<< "    Point-edges" << endl;
83     }
85     if( ppPtr_ )
86     {
87         Pout<< "    Point-point" << endl;
88     }
90     if( cpPtr_ )
91     {
92         Pout<< "    Cell-point" << endl;
93     }
95     // Geometry
96     if( cellCentresPtr_ )
97     {
98         Pout<< "    Cell-centres" << endl;
99     }
101     if( faceCentresPtr_ )
102     {
103         Pout<< "    Face-centres" << endl;
104     }
106     if( cellVolumesPtr_ )
107     {
108         Pout<< "    Cell-volumes" << endl;
109     }
111     if( faceAreasPtr_ )
112     {
113         Pout<< "    Face-areas" << endl;
114     }
117 void polyMeshGenAddressing::clearGeom()
119     if( debug )
120     {
121         Pout<< "polyMeshGenAddressing::clearGeom() : "
122             << "clearing geometric data"
123             << endl;
124     }
126     deleteDemandDrivenData(cellCentresPtr_);
127     deleteDemandDrivenData(faceCentresPtr_);
128     deleteDemandDrivenData(cellVolumesPtr_);
129     deleteDemandDrivenData(faceAreasPtr_);
132 void polyMeshGenAddressing::clearAddressing()
134     if( debug )
135     {
136         Pout<< "polyMeshGenAddressing::clearAddressing() : "
137             << "clearing topology"
138             << endl;
139     }
141     clearOutEdges();
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()
174     clearGeom();
175     clearAddressing();
176     clearParallelAddressing();
180 void polyMeshGenAddressing::clearAll()
182     clearGeom();
183     clearAddressing();
184     clearParallelAddressing();
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 } // End namespace Foam
191 // ************************************************************************* //