detectBoundaryLayers.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  detectBoundaryLayers
26 
27 Description
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.
31 
32 SourceFiles
33  detectBoundaryLayers.C
34  detectBoundaryLayersFunctions.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef detectBoundaryLayers_H
39 #define detectBoundaryLayers_H
40 
41 #include "polyMeshGenModifier.H"
42 #include "meshSurfaceEngine.H"
43 #include "DynList.H"
44 #include "labelLongList.H"
45 #include "labelPair.H"
46 #include "edgeLongList.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // Forward declarations
55 
56 /*---------------------------------------------------------------------------*\
57  Class detectBoundaryLayers Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 {
62  //- Reference to the meshSurfacePartitioner
64 
65  //- find the number of distinct layers in the mesh
66  //- at the boundary of the mesh
68 
69  //- information about the existing boundary layer at a boundary face
71 
72  //- layer at a boundary patch
74 
75  //- hair edges found in the mesh
77 
78  //- hair edges at a boudary point
80 
81  //- is it a 2D mesh
82  const bool is2DMesh_;
83 
84  // Private member functions
85  //- analyse layers to check their topology
86  void analyseLayers();
87 
88  //- provide hair edges in a cell above a boundary face
89  bool findHairsForFace(const label, DynList<edge>& hairEdges) const;
90 
91  //- generate hair edges for all boundary points
92  void generateHairEdges();
93 
94  //- Disallow bitwise copy construct
96 
97  //- Disallow bitwise assignment
98  void operator=(const detectBoundaryLayers&);
99 
100 public:
101 
102  // Constructors
103 
104  //- Construct from meshSurfacePartitioner and a bool providing
105  //- information whether the mesh is a 2D mesh. The default is false.
107  (
108  const meshSurfacePartitioner& meshSurface,
109  const bool is2DMesh = false
110  );
111 
112  // Destructor
114 
115  // Public member functions
116  //- return hair edges found in the detection process
117  inline const edgeLongList& hairEdges() const
118  {
119  return hairEdges_;
120  }
121 
122  //- hair edges attached to a boundary point
123  inline const VRWGraph& hairEdgesAtBndPoint() const
124  {
126  }
127 
128  //- number of distinct layers which are at the boundary of the mesh
129  inline label nDistinctLayers() const
130  {
131  return nFirstLayers_;
132  }
133 
134  //- index of a layer to which a boundary faces belong to
135  inline const labelList& faceInLayer() const
136  {
137  return layerAtBndFace_;
138  }
139 };
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
Foam::detectBoundaryLayers::detectBoundaryLayers
detectBoundaryLayers(const detectBoundaryLayers &)
Disallow bitwise copy construct.
polyMeshGenModifier.H
Foam::detectBoundaryLayers::layerAtPatch_
List< DynList< label > > layerAtPatch_
layer at a boundary patch
Definition: detectBoundaryLayers.H:72
Foam::detectBoundaryLayers::meshSurface_
const meshSurfacePartitioner & meshSurface_
Reference to the meshSurfacePartitioner.
Definition: detectBoundaryLayers.H:62
Foam::LongList< edge >
Foam::detectBoundaryLayers::~detectBoundaryLayers
~detectBoundaryLayers()
Definition: detectBoundaryLayers.C:64
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::detectBoundaryLayers::is2DMesh_
const bool is2DMesh_
is it a 2D mesh
Definition: detectBoundaryLayers.H:81
Foam::detectBoundaryLayers::hairEdges
const edgeLongList & hairEdges() const
return hair edges found in the detection process
Definition: detectBoundaryLayers.H:116
edgeLongList.H
meshSurfacePartitioner
Finds corners and edge points at the surface of the volume mesh.
Foam::detectBoundaryLayers::hairEdgesAtBndPoint
const VRWGraph & hairEdgesAtBndPoint() const
hair edges attached to a boundary point
Definition: detectBoundaryLayers.H:122
Foam::detectBoundaryLayers::hairEdgesAtBoundaryPoint_
VRWGraph hairEdgesAtBoundaryPoint_
hair edges at a boudary point
Definition: detectBoundaryLayers.H:78
Foam::detectBoundaryLayers::generateHairEdges
void generateHairEdges()
generate hair edges for all boundary points
Definition: detectBoundaryLayersFunctions.C:570
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
meshSurfaceEngine.H
Foam::detectBoundaryLayers::hairEdges_
edgeLongList hairEdges_
hair edges found in the mesh
Definition: detectBoundaryLayers.H:75
Foam::DynList
Definition: DynList.H:53
Foam::meshSurfacePartitioner
Definition: meshSurfacePartitioner.H:52
Foam::detectBoundaryLayers::operator=
void operator=(const detectBoundaryLayers &)
Disallow bitwise assignment.
Foam::detectBoundaryLayers::analyseLayers
void analyseLayers()
analyse layers to check their topology
Definition: detectBoundaryLayersFunctions.C:333
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
labelLongList.H
Foam::detectBoundaryLayers::findHairsForFace
bool findHairsForFace(const label, DynList< edge > &hairEdges) const
provide hair edges in a cell above a boundary face
Definition: detectBoundaryLayersFunctions.C:461
Foam::detectBoundaryLayers::layerAtBndFace_
labelList layerAtBndFace_
information about the existing boundary layer at a boundary face
Definition: detectBoundaryLayers.H:69
Foam::detectBoundaryLayers::faceInLayer
const labelList & faceInLayer() const
index of a layer to which a boundary faces belong to
Definition: detectBoundaryLayers.H:134
Foam::detectBoundaryLayers
Definition: detectBoundaryLayers.H:59
Foam::VRWGraph
Definition: VRWGraph.H:101
DynList.H
Foam::detectBoundaryLayers::nFirstLayers_
label nFirstLayers_
Definition: detectBoundaryLayers.H:66
labelPair.H
Foam::detectBoundaryLayers::nDistinctLayers
label nDistinctLayers() const
number of distinct layers which are at the boundary of the mesh
Definition: detectBoundaryLayers.H:128