1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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 \*---------------------------------------------------------------------------*/
27 #include "primitiveMesh.H"
28 #include "globalMeshData.H"
29 #include "demandDrivenData.H"
30 #include "meshObjectBase.H"
31 #include "pointMesh.H"
33 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
35 void Foam::polyMesh::removeBoundary()
39 Info<< "void polyMesh::removeBoundary(): "
40 << "Removing boundary patches."
44 // Remove the point zones
52 void Foam::polyMesh::removeZones()
56 Info<< "void polyMesh::removeZones(): "
57 << "Removing point, face and cell zones."
61 // Remove the zones and reset writing
63 pointZones_.setSize(0);
64 pointZones_.writeOpt() = IOobject::NO_WRITE;
67 faceZones_.setSize(0);
68 faceZones_.writeOpt() = IOobject::NO_WRITE;
71 cellZones_.setSize(0);
72 cellZones_.writeOpt() = IOobject::NO_WRITE;
77 void Foam::polyMesh::clearGeom()
81 Info<< "void polyMesh::clearGeom() : "
82 << "clearing geometric data"
86 primitiveMesh::clearGeom();
88 forAll (boundary_, patchI)
90 boundary_[patchI].clearGeom();
93 // Reset valid directions (could change with rotation)
94 geometricD_ = Vector<label>::zero;
95 solutionD_ = Vector<label>::zero;
97 // Move points all mesh objects. HJ, 13/Oct/2010
98 // This is a problem, because it is called in a destructor.
99 meshObjectBase::allDelete(*this);
100 // meshObjectBase::allMovePoints(*this);
104 void Foam::polyMesh::clearAddressing()
108 Info<< "void polyMesh::clearAddressing() : "
109 << "clearing topology"
113 primitiveMesh::clearAddressing();
115 // parallelData depends on the processorPatch ordering so force
117 deleteDemandDrivenData(globalMeshDataPtr_);
119 // Reset valid directions
120 geometricD_ = Vector<label>::zero;
121 solutionD_ = Vector<label>::zero;
125 void Foam::polyMesh::clearPrimitives()
129 allPoints_.setSize(0);
130 allFaces_.setSize(0);
132 neighbour_.setSize(0);
134 clearedPrimitives_ = true;
138 void Foam::polyMesh::clearOut()
145 // ************************************************************************* //