Forward compatibility: flex
[foam-extend-3.2.git] / src / foam / meshes / primitiveMesh / primitiveMeshClear.C
blobfabb8c5fc3da7d7f2248dd685fb2306d8cbd9157
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "primitiveMesh.H"
27 #include "demandDrivenData.H"
30 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
32 void Foam::primitiveMesh::printAllocated() const
34     Pout<< "primitiveMesh allocated :" << endl;
36     // Topology
37     if (cellShapesPtr_)
38     {
39         Pout<< "    Cell shapes" << endl;
40     }
42     if (edgesPtr_)
43     {
44         Pout<< "    Edges" << endl;
45     }
47     if (ccPtr_)
48     {
49         Pout<< "    Cell-cells" << endl;
50     }
52     if (ecPtr_)
53     {
54         Pout<< "    Edge-cells" << endl;
55     }
57     if (pcPtr_)
58     {
59         Pout<< "    Point-cells" << endl;
60     }
62     if (cfPtr_)
63     {
64         Pout<< "    Cell-faces" << endl;
65     }
67     if (efPtr_)
68     {
69         Pout<< "    Edge-faces" << endl;
70     }
72     if (pfPtr_)
73     {
74         Pout<< "    Point-faces" << endl;
75     }
77     if (cePtr_)
78     {
79         Pout<< "    Cell-edges" << endl;
80     }
82     if (fePtr_)
83     {
84         Pout<< "    Face-edges" << endl;
85     }
87     if (pePtr_)
88     {
89         Pout<< "    Point-edges" << endl;
90     }
92     if (ppPtr_)
93     {
94         Pout<< "    Point-point" << endl;
95     }
97     if (cpPtr_)
98     {
99         Pout<< "    Cell-point" << endl;
100     }
102     // Geometry
103     if (cellCentresPtr_)
104     {
105         Pout<< "    Cell-centres" << endl;
106     }
108     if (faceCentresPtr_)
109     {
110         Pout<< "    Face-centres" << endl;
111     }
113     if (cellVolumesPtr_)
114     {
115         Pout<< "    Cell-volumes" << endl;
116     }
118     if (faceAreasPtr_)
119     {
120         Pout<< "    Face-areas" << endl;
121     }
126 void Foam::primitiveMesh::clearGeom()
128     if (debug)
129     {
130         Pout<< "primitiveMesh::clearGeom() : "
131             << "clearing geometric data"
132             << endl;
133     }
135     deleteDemandDrivenData(cellCentresPtr_);
136     deleteDemandDrivenData(faceCentresPtr_);
137     deleteDemandDrivenData(cellVolumesPtr_);
138     deleteDemandDrivenData(faceAreasPtr_);
142 void Foam::primitiveMesh::clearAddressing()
144     if (debug)
145     {
146         Pout<< "primitiveMesh::clearAddressing() : "
147             << "clearing topology"
148             << endl;
149     }
151     deleteDemandDrivenData(cellShapesPtr_);
153     clearOutEdges();
155     deleteDemandDrivenData(ccPtr_);
156     deleteDemandDrivenData(ecPtr_);
157     deleteDemandDrivenData(pcPtr_);
159     deleteDemandDrivenData(cfPtr_);
160     deleteDemandDrivenData(efPtr_);
161     deleteDemandDrivenData(pfPtr_);
163     deleteDemandDrivenData(cePtr_);
164     deleteDemandDrivenData(fePtr_);
165     deleteDemandDrivenData(pePtr_);
166     deleteDemandDrivenData(ppPtr_);
167     deleteDemandDrivenData(cpPtr_);
171 void Foam::primitiveMesh::clearOut()
173     clearGeom();
174     clearAddressing();
178 // ************************************************************************* //