ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / OpenFOAM / meshes / primitiveMesh / primitiveMeshClear.C
blobd3ef679c7e1c12d39f24e030f282f2752da83d77
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 \*---------------------------------------------------------------------------*/
26 #include "primitiveMesh.H"
27 #include "indexedOctree.H"
28 #include "treeDataCell.H"
29 #include "demandDrivenData.H"
30 #include "indexedOctree.H"
31 #include "treeDataCell.H"
33 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
35 void Foam::primitiveMesh::printAllocated() const
37     Pout<< "primitiveMesh allocated :" << endl;
39     // Topology
40     if (cellShapesPtr_)
41     {
42         Pout<< "    Cell shapes" << endl;
43     }
45     if (edgesPtr_)
46     {
47         Pout<< "    Edges" << endl;
48     }
50     if (ccPtr_)
51     {
52         Pout<< "    Cell-cells" << endl;
53     }
55     if (ecPtr_)
56     {
57         Pout<< "    Edge-cells" << endl;
58     }
60     if (pcPtr_)
61     {
62         Pout<< "    Point-cells" << endl;
63     }
65     if (cfPtr_)
66     {
67         Pout<< "    Cell-faces" << endl;
68     }
70     if (efPtr_)
71     {
72         Pout<< "    Edge-faces" << endl;
73     }
75     if (pfPtr_)
76     {
77         Pout<< "    Point-faces" << endl;
78     }
80     if (cePtr_)
81     {
82         Pout<< "    Cell-edges" << endl;
83     }
85     if (fePtr_)
86     {
87         Pout<< "    Face-edges" << endl;
88     }
90     if (pePtr_)
91     {
92         Pout<< "    Point-edges" << endl;
93     }
95     if (ppPtr_)
96     {
97         Pout<< "    Point-point" << endl;
98     }
100     if (cpPtr_)
101     {
102         Pout<< "    Cell-point" << endl;
103     }
105     if (cellTreePtr_)
106     {
107         Pout<< "    Cell-tree" << endl;
108     }
110     // Geometry
111     if (cellCentresPtr_)
112     {
113         Pout<< "    Cell-centres" << endl;
114     }
116     if (faceCentresPtr_)
117     {
118         Pout<< "    Face-centres" << endl;
119     }
121     if (cellVolumesPtr_)
122     {
123         Pout<< "    Cell-volumes" << endl;
124     }
126     if (faceAreasPtr_)
127     {
128         Pout<< "    Face-areas" << endl;
129     }
134 void Foam::primitiveMesh::clearGeom()
136     if (debug)
137     {
138         Pout<< "primitiveMesh::clearGeom() : "
139             << "clearing geometric data"
140             << endl;
141     }
143     deleteDemandDrivenData(cellCentresPtr_);
144     deleteDemandDrivenData(faceCentresPtr_);
145     deleteDemandDrivenData(cellVolumesPtr_);
146     deleteDemandDrivenData(faceAreasPtr_);
150 void Foam::primitiveMesh::clearAddressing()
152     if (debug)
153     {
154         Pout<< "primitiveMesh::clearAddressing() : "
155             << "clearing topology"
156             << endl;
157     }
159     deleteDemandDrivenData(cellShapesPtr_);
161     clearOutEdges();
163     deleteDemandDrivenData(ccPtr_);
164     deleteDemandDrivenData(ecPtr_);
165     deleteDemandDrivenData(pcPtr_);
167     deleteDemandDrivenData(cfPtr_);
168     deleteDemandDrivenData(efPtr_);
169     deleteDemandDrivenData(pfPtr_);
171     deleteDemandDrivenData(cePtr_);
172     deleteDemandDrivenData(fePtr_);
173     deleteDemandDrivenData(pePtr_);
174     deleteDemandDrivenData(ppPtr_);
175     deleteDemandDrivenData(cpPtr_);
177     deleteDemandDrivenData(cellTreePtr_);
181 void Foam::primitiveMesh::clearCellTree()
183     deleteDemandDrivenData(cellTreePtr_);
187 void Foam::primitiveMesh::clearOut()
189     clearGeom();
190     clearAddressing();
194 // ************************************************************************* //