1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh 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 cfMesh 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
21 You should have received a copy of the GNU General Public License
22 along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
26 \*---------------------------------------------------------------------------*/
28 #include "meshSurfaceEngine.H"
29 #include "demandDrivenData.H"
35 // #define DEBUGSearch
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44 meshSurfaceEngine::meshSurfaceEngine(polyMeshGen& mesh)
48 boundaryPointsPtr_(NULL),
49 boundaryFacesPtr_(NULL),
50 boundaryFacePatchPtr_(NULL),
51 boundaryFaceOwnersPtr_(NULL),
53 pointInFacePtr_(NULL),
54 pointPatchesPtr_(NULL),
56 pointPointsPtr_(NULL),
61 edgePatchesPtr_(NULL),
63 pointNormalsPtr_(NULL),
64 faceNormalsPtr_(NULL),
65 faceCentresPtr_(NULL),
67 globalBoundaryPointLabelPtr_(NULL),
68 globalBoundaryPointToLocalPtr_(NULL),
71 globalBoundaryEdgeLabelPtr_(NULL),
72 globalBoundaryEdgeToLocalPtr_(NULL),
75 otherEdgeFaceAtProcPtr_(NULL),
76 otherEdgeFacePatchPtr_(NULL),
77 globalBoundaryFaceLabelPtr_(NULL)
79 calculateBoundaryFaces();
80 calculateBoundaryNodes();
83 meshSurfaceEngine::meshSurfaceEngine(polyMeshGen &mesh, const label patchI)
87 boundaryPointsPtr_(NULL),
88 boundaryFacesPtr_(NULL),
89 boundaryFacePatchPtr_(NULL),
90 boundaryFaceOwnersPtr_(NULL),
92 pointInFacePtr_(NULL),
93 pointPatchesPtr_(NULL),
95 pointPointsPtr_(NULL),
100 edgePatchesPtr_(NULL),
102 pointNormalsPtr_(NULL),
103 faceNormalsPtr_(NULL),
104 faceCentresPtr_(NULL),
106 globalBoundaryPointLabelPtr_(NULL),
107 globalBoundaryPointToLocalPtr_(NULL),
109 bpNeiProcsPtr_(NULL),
110 globalBoundaryEdgeLabelPtr_(NULL),
111 globalBoundaryEdgeToLocalPtr_(NULL),
113 beNeiProcsPtr_(NULL),
114 otherEdgeFaceAtProcPtr_(NULL),
115 otherEdgeFacePatchPtr_(NULL),
116 globalBoundaryFaceLabelPtr_(NULL)
118 calculateBoundaryFaces();
119 calculateBoundaryNodes();
122 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
124 meshSurfaceEngine::~meshSurfaceEngine()
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 void meshSurfaceEngine::clearOut()
133 deleteDemandDrivenData(boundaryPointsPtr_);
134 deleteDemandDrivenData(boundaryFacesPtr_);
135 deleteDemandDrivenData(boundaryFacePatchPtr_);
136 deleteDemandDrivenData(boundaryFaceOwnersPtr_);
137 deleteDemandDrivenData(pointFacesPtr_);
138 deleteDemandDrivenData(pointInFacePtr_);
139 deleteDemandDrivenData(pointPatchesPtr_);
140 deleteDemandDrivenData(bppPtr_);
141 deleteDemandDrivenData(pointPointsPtr_);
142 deleteDemandDrivenData(pointNormalsPtr_);
143 deleteDemandDrivenData(faceNormalsPtr_);
144 deleteDemandDrivenData(faceCentresPtr_);
145 deleteDemandDrivenData(edgesPtr_);
146 deleteDemandDrivenData(bpEdgesPtr_);
147 deleteDemandDrivenData(edgeFacesPtr_);
148 deleteDemandDrivenData(faceEdgesPtr_);
149 deleteDemandDrivenData(edgePatchesPtr_);
150 deleteDemandDrivenData(faceFacesPtr_);
152 deleteDemandDrivenData(globalBoundaryPointLabelPtr_);
153 deleteDemandDrivenData(globalBoundaryPointToLocalPtr_);
154 deleteDemandDrivenData(bpProcsPtr_);
155 deleteDemandDrivenData(bpNeiProcsPtr_);
156 deleteDemandDrivenData(globalBoundaryEdgeLabelPtr_);
157 deleteDemandDrivenData(globalBoundaryEdgeToLocalPtr_);
158 deleteDemandDrivenData(beProcsPtr_);
159 deleteDemandDrivenData(beNeiProcsPtr_);
160 deleteDemandDrivenData(otherEdgeFaceAtProcPtr_);
161 deleteDemandDrivenData(otherEdgeFacePatchPtr_);
162 deleteDemandDrivenData(globalBoundaryFaceLabelPtr_);
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 } // End namespace Foam
169 // ************************************************************************* //