primitiveMeshClear.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28#include "primitiveMesh.H"
29#include "demandDrivenData.H"
30
31// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
32
34{
35 Pout<< "primitiveMesh allocated :" << endl;
36
37 // Topology
38 if (cellShapesPtr_)
39 {
40 Pout<< " Cell shapes" << endl;
41 }
42
43 if (edgesPtr_)
44 {
45 Pout<< " Edges" << endl;
46 }
47
48 if (ccPtr_)
49 {
50 Pout<< " Cell-cells" << endl;
51 }
52
53 if (ecPtr_)
54 {
55 Pout<< " Edge-cells" << endl;
56 }
57
58 if (pcPtr_)
59 {
60 Pout<< " Point-cells" << endl;
61 }
62
63 if (cfPtr_)
64 {
65 Pout<< " Cell-faces" << endl;
66 }
67
68 if (efPtr_)
69 {
70 Pout<< " Edge-faces" << endl;
71 }
72
73 if (pfPtr_)
74 {
75 Pout<< " Point-faces" << endl;
76 }
77
78 if (cePtr_)
79 {
80 Pout<< " Cell-edges" << endl;
81 }
82
83 if (fePtr_)
84 {
85 Pout<< " Face-edges" << endl;
86 }
87
88 if (pePtr_)
89 {
90 Pout<< " Point-edges" << endl;
91 }
92
93 if (ppPtr_)
94 {
95 Pout<< " Point-point" << endl;
96 }
97
98 if (cpPtr_)
99 {
100 Pout<< " Cell-point" << endl;
101 }
102
103 // Geometry
104 if (cellCentresPtr_)
105 {
106 Pout<< " Cell-centres" << endl;
107 }
108
109 if (cellVolumesPtr_)
110 {
111 Pout<< " Cell-volumes" << endl;
112 }
113
114 if (faceCentresPtr_)
115 {
116 Pout<< " Face-centres" << endl;
117 }
118
119 if (faceAreasPtr_)
120 {
121 Pout<< " Face-areas" << endl;
122 }
123}
124
125
127{
128 if (debug)
129 {
130 Pout<< "primitiveMesh::clearGeom() : "
131 << "clearing geometric data"
132 << endl;
133 }
134
135 deleteDemandDrivenData(cellCentresPtr_);
136 deleteDemandDrivenData(cellVolumesPtr_);
137 deleteDemandDrivenData(faceCentresPtr_);
138 deleteDemandDrivenData(faceAreasPtr_);
139}
140
141
143{
144 if (debug)
145 {
146 Pout<< "primitiveMesh::clearCellGeom() : "
147 << "clearing cell centres and volumes"
148 << endl;
149 }
150
151 deleteDemandDrivenData(cellCentresPtr_);
152 deleteDemandDrivenData(cellVolumesPtr_);
153}
154
155
157{
158 if (debug)
159 {
160 Pout<< "primitiveMesh::clearAddressing() : "
161 << "clearing topology"
162 << endl;
163 }
164
165 deleteDemandDrivenData(cellShapesPtr_);
166
167 clearOutEdges();
168
172
176
182}
183
184
186{
187 clearGeom();
188 clearAddressing();
189}
190
191
192// ************************************************************************* //
void clearGeom()
Clear geometry.
void clearAddressing()
Clear topological data.
void clearCellGeom()
Clear cell-based geometry only.
void printAllocated() const
Print a list of all the currently allocated mesh data.
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
Template functions to aid in the implementation of demand driven data.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
void deleteDemandDrivenData(DataPtr &dataPtr)