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/>.
25 meshSurfacePartitioner
28 Finds corners and edge points at the surface of the volume mesh
31 meshSurfacePartitioner.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef meshSurfacePartitioner_H
36 #define meshSurfacePartitioner_H
38 #include "meshSurfaceEngine.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class meshSurfacePartitioner Declaration
51 \*---------------------------------------------------------------------------*/
53 class meshSurfacePartitioner
56 //- reference to mesh surface engine
57 const meshSurfaceEngine& meshSurface_;
59 //- pointer to face patches
60 const labelList& facePatch_;
62 //- patches at a surface point
63 VRWGraph pointPatches_;
65 //- labels of corner points
66 labelHashSet corners_;
68 //- labels of edge points
69 labelHashSet edgePoints_;
71 //- patch-patches addressing
72 List<labelHashSet> patchPatches_;
74 //- number of edges attached to a surface point
75 labelList nEdgesAtPoint_;
77 //- labels of feature edges
78 labelHashSet featureEdges_;
80 // Private member functions
81 //- find corners, edge points and addressing
82 void calculateCornersEdgesAndAddressing();
84 //- Disallow default bitwise copy construct
85 meshSurfacePartitioner(const meshSurfacePartitioner&);
87 //- Disallow default bitwise assignment
88 void operator=(const meshSurfacePartitioner&);
94 //- Construct from meshSurfaceEngine
95 meshSurfacePartitioner(const meshSurfaceEngine&);
97 //- Construct from meshSurfaceEngine and face patches
98 meshSurfacePartitioner
100 const meshSurfaceEngine& meshSurface,
101 const labelList& facePatch
106 ~meshSurfacePartitioner();
109 //- return const reference to meshSurfaceEngine
110 inline const meshSurfaceEngine& surfaceEngine() const
115 //- return const reference to a list containing boudary patch index
116 //- for each boundary face
117 inline const labelList& boundaryFacePatches() const
122 //- return const reference to a graph of patches attached to a surface
124 inline const VRWGraph& pointPatches() const
126 return pointPatches_;
129 //- return labels of corner points (from the list of boundary points)
130 inline const labelHashSet& corners() const
135 //- return labels of edge points (from the list of boundary points)
136 inline const labelHashSet& edgePoints() const
141 //- return the number of feature edges attached to a boundary point
142 inline label numberOfFeatureEdgesAtPoint(const label bpI) const
144 return nEdgesAtPoint_[bpI];
147 //- return patch-patches addressing
148 inline const List<labelHashSet>& patchPatches() const
150 return patchPatches_;
153 //- return labels of boundary edges which are feature edges
154 inline const labelHashSet& featureEdges() const
156 return featureEdges_;
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 } // End namespace Foam
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 // ************************************************************************* //