intersection with triangle plane for miss
[OpenFOAM-1.5.x.git] / src / OpenFOAM / meshes / primitiveMesh / primitiveMeshClear.C
bloba706cbe7aa0ef2cd903f7bcfaaa29df367ee6f63
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "primitiveMesh.H"
28 #include "demandDrivenData.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 namespace Foam
35 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
37 void primitiveMesh::printAllocated() const
39     Pout<< "primitiveMesh allocated :" << endl;
41     // Topology
42     if (cellShapesPtr_)
43     {
44         Pout<< "    Cell shapes" << endl;
45     }
47     if (edgesPtr_)
48     {
49         Pout<< "    Edges" << endl;
50     }
52     if (ccPtr_)
53     {
54         Pout<< "    Cell-cells" << endl;
55     }
57     if (ecPtr_)
58     {
59         Pout<< "    Edge-cells" << endl;
60     }
62     if (pcPtr_)
63     {
64         Pout<< "    Point-cells" << endl;
65     }
67     if (cfPtr_)
68     {
69         Pout<< "    Cell-faces" << endl;
70     }
72     if (efPtr_)
73     {
74         Pout<< "    Edge-faces" << endl;
75     }
77     if (pfPtr_)
78     {
79         Pout<< "    Point-faces" << endl;
80     }
82     if (cePtr_)
83     {
84         Pout<< "    Cell-edges" << endl;
85     }
87     if (fePtr_)
88     {
89         Pout<< "    Face-edges" << endl;
90     }
92     if (pePtr_)
93     {
94         Pout<< "    Point-edges" << endl;
95     }
97     if (ppPtr_)
98     {
99         Pout<< "    Point-point" << endl;
100     }
101     
102     if (cpPtr_)
103     {
104         Pout<< "    Cell-point" << endl;
105     }
107     // Geometry
108     if (cellCentresPtr_)
109     {
110         Pout<< "    Cell-centres" << endl;
111     }
113     if (faceCentresPtr_)
114     {
115         Pout<< "    Face-centres" << endl;
116     }
118     if (cellVolumesPtr_)
119     {
120         Pout<< "    Cell-volumes" << endl;
121     }
123     if (faceAreasPtr_)
124     {
125         Pout<< "    Face-areas" << endl;
126     }
131 void primitiveMesh::clearGeom()
133     if (debug)
134     {
135         Pout<< "primitiveMesh::clearGeom() : "
136             << "clearing geometric data"
137             << endl;
138     }
140     deleteDemandDrivenData(cellCentresPtr_);
141     deleteDemandDrivenData(faceCentresPtr_);
142     deleteDemandDrivenData(cellVolumesPtr_);
143     deleteDemandDrivenData(faceAreasPtr_);
147 void primitiveMesh::clearAddressing()
149     if (debug)
150     {
151         Pout<< "primitiveMesh::clearAddressing() : "
152             << "clearing topology"
153             << endl;
154     }
156     deleteDemandDrivenData(cellShapesPtr_);
158     clearOutEdges();
160     deleteDemandDrivenData(ccPtr_);
161     deleteDemandDrivenData(ecPtr_);
162     deleteDemandDrivenData(pcPtr_);
164     deleteDemandDrivenData(cfPtr_);
165     deleteDemandDrivenData(efPtr_);
166     deleteDemandDrivenData(pfPtr_);
168     deleteDemandDrivenData(cePtr_);
169     deleteDemandDrivenData(fePtr_);
170     deleteDemandDrivenData(pePtr_);
171     deleteDemandDrivenData(ppPtr_);
172     deleteDemandDrivenData(cpPtr_);
176 void primitiveMesh::clearOut()
178     clearGeom();
179     clearAddressing();
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // ************************************************************************* //