Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
OpenFOAM
meshes
primitiveMesh
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 | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
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.
15
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.
20
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/>.
23
24
\*---------------------------------------------------------------------------*/
25
26
#include "
primitiveMesh.H
"
27
#include <
OpenFOAM/demandDrivenData.H
>
28
29
30
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
31
32
void
Foam::primitiveMesh::printAllocated
()
const
33
{
34
Pout
<<
"primitiveMesh allocated :"
<<
endl
;
35
36
// Topology
37
if
(cellShapesPtr_)
38
{
39
Pout
<<
" Cell shapes"
<<
endl
;
40
}
41
42
if
(edgesPtr_)
43
{
44
Pout
<<
" Edges"
<<
endl
;
45
}
46
47
if
(ccPtr_)
48
{
49
Pout
<<
" Cell-cells"
<<
endl
;
50
}
51
52
if
(ecPtr_)
53
{
54
Pout
<<
" Edge-cells"
<<
endl
;
55
}
56
57
if
(pcPtr_)
58
{
59
Pout
<<
" Point-cells"
<<
endl
;
60
}
61
62
if
(cfPtr_)
63
{
64
Pout
<<
" Cell-faces"
<<
endl
;
65
}
66
67
if
(efPtr_)
68
{
69
Pout
<<
" Edge-faces"
<<
endl
;
70
}
71
72
if
(pfPtr_)
73
{
74
Pout
<<
" Point-faces"
<<
endl
;
75
}
76
77
if
(cePtr_)
78
{
79
Pout
<<
" Cell-edges"
<<
endl
;
80
}
81
82
if
(fePtr_)
83
{
84
Pout
<<
" Face-edges"
<<
endl
;
85
}
86
87
if
(pePtr_)
88
{
89
Pout
<<
" Point-edges"
<<
endl
;
90
}
91
92
if
(ppPtr_)
93
{
94
Pout
<<
" Point-point"
<<
endl
;
95
}
96
97
if
(cpPtr_)
98
{
99
Pout
<<
" Cell-point"
<<
endl
;
100
}
101
102
// Geometry
103
if
(cellCentresPtr_)
104
{
105
Pout
<<
" Cell-centres"
<<
endl
;
106
}
107
108
if
(faceCentresPtr_)
109
{
110
Pout
<<
" Face-centres"
<<
endl
;
111
}
112
113
if
(cellVolumesPtr_)
114
{
115
Pout
<<
" Cell-volumes"
<<
endl
;
116
}
117
118
if
(faceAreasPtr_)
119
{
120
Pout
<<
" Face-areas"
<<
endl
;
121
}
122
123
}
124
125
126
void
Foam::primitiveMesh::clearGeom
()
127
{
128
if
(debug)
129
{
130
Pout
<<
"primitiveMesh::clearGeom() : "
131
<<
"clearing geometric data"
132
<<
endl
;
133
}
134
135
deleteDemandDrivenData
(cellCentresPtr_);
136
deleteDemandDrivenData
(faceCentresPtr_);
137
deleteDemandDrivenData
(cellVolumesPtr_);
138
deleteDemandDrivenData
(faceAreasPtr_);
139
}
140
141
142
void
Foam::primitiveMesh::clearAddressing
()
143
{
144
if
(debug)
145
{
146
Pout
<<
"primitiveMesh::clearAddressing() : "
147
<<
"clearing topology"
148
<<
endl
;
149
}
150
151
deleteDemandDrivenData
(cellShapesPtr_);
152
153
clearOutEdges();
154
155
deleteDemandDrivenData
(ccPtr_);
156
deleteDemandDrivenData
(ecPtr_);
157
deleteDemandDrivenData
(pcPtr_);
158
159
deleteDemandDrivenData
(cfPtr_);
160
deleteDemandDrivenData
(efPtr_);
161
deleteDemandDrivenData
(pfPtr_);
162
163
deleteDemandDrivenData
(cePtr_);
164
deleteDemandDrivenData
(fePtr_);
165
deleteDemandDrivenData
(pePtr_);
166
deleteDemandDrivenData
(ppPtr_);
167
deleteDemandDrivenData
(cpPtr_);
168
}
169
170
171
void
Foam::primitiveMesh::clearOut
()
172
{
173
clearGeom();
174
clearAddressing();
175
}
176
177
178
// ************************ vim: set sw=4 sts=4 et: ************************ //