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/>.
28 Check the cells attached to the surface of the volume mesh and check
29 the existence o boundary layers. It also provides information how boundary
30 layers are connected over several patches.
33 detectBoundaryLayers.C
34 detectBoundaryLayersFunctions.C
36 \*---------------------------------------------------------------------------*/
38 #ifndef detectBoundaryLayers_H
39 #define detectBoundaryLayers_H
41 #include "polyMeshGenModifier.H"
42 #include "meshSurfaceEngine.H"
44 #include "labelLongList.H"
45 #include "labelPair.H"
46 #include "edgeLongList.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 // Forward declarations
54 class meshSurfacePartitioner;
56 /*---------------------------------------------------------------------------*\
57 Class detectBoundaryLayers Declaration
58 \*---------------------------------------------------------------------------*/
60 class detectBoundaryLayers
62 //- Reference to the meshSurfacePartitioner
63 const meshSurfacePartitioner& meshSurface_;
65 //- find the number of distinct layers in the mesh
66 //- at the boundary of the mesh
69 //- information about the existing boundary layer at a boundary face
70 labelList layerAtBndFace_;
72 //- layer at a boundary patch
73 List<DynList<label> > layerAtPatch_;
75 //- hair edges found in the mesh
76 edgeLongList hairEdges_;
78 //- hair edges at a boudary point
79 VRWGraph hairEdgesAtBoundaryPoint_;
84 // Private member functions
85 //- analyse layers to check their topology
88 //- provide hair edges in a cell above a boundary face
89 bool findHairsForFace(const label, DynList<edge>& hairEdges) const;
91 //- generate hair edges for all boundary points
92 void generateHairEdges();
94 //- Disallow bitwise copy construct
95 detectBoundaryLayers(const detectBoundaryLayers&);
97 //- Disallow bitwise assignment
98 void operator=(const detectBoundaryLayers&);
104 //- Construct from meshSurfacePartitioner and a bool providing
105 //- information whether the mesh is a 2D mesh. The default is false.
108 const meshSurfacePartitioner& meshSurface,
109 const bool is2DMesh = false
113 ~detectBoundaryLayers();
115 // Public member functions
116 //- return hair edges found in the detection process
117 inline const edgeLongList& hairEdges() const
122 //- hair edges attached to a boundary point
123 inline const VRWGraph& hairEdgesAtBndPoint() const
125 return hairEdgesAtBoundaryPoint_;
128 //- number of distinct layers which are at the boundary of the mesh
129 inline label nDistinctLayers() const
131 return nFirstLayers_;
134 //- index of a layer to which a boundary faces belong to
135 inline const labelList& faceInLayer() const
137 return layerAtBndFace_;
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 // ************************************************************************* //