meshSurfacePartitioner.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  meshSurfacePartitioner
26 
27 Description
28  Finds corners and edge points at the surface of the volume mesh
29 
30 SourceFiles
31  meshSurfacePartitioner.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef meshSurfacePartitioner_H
36 #define meshSurfacePartitioner_H
37 
38 #include "meshSurfaceEngine.H"
39 #include "VRWGraph.H"
40 #include "HashSet.H"
41 
42 #include <map>
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class meshSurfacePartitioner Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private data
56  //- reference to mesh surface engine
58 
59  //- pointer to face patches
60  const labelList& facePatch_;
61 
62  //- patches at a surface point
64 
65  //- labels of corner points
67 
68  //- labels of edge points
70 
71  //- patch-patches addressing
73 
74  //- number of edges attached to a surface point
76 
77  //- labels of feature edges
79 
80  // Private member functions
81  //- find corners, edge points and addressing
83 
84  //- Disallow default bitwise copy construct
86 
87  //- Disallow default bitwise assignment
88  void operator=(const meshSurfacePartitioner&);
89 
90 public:
91 
92  // Constructors
93 
94  //- Construct from meshSurfaceEngine
96 
97  //- Construct from meshSurfaceEngine and face patches
99  (
100  const meshSurfaceEngine& meshSurface,
101  const labelList& facePatch
102  );
103 
104  // Destructor
105 
107 
108  // Member Functions
109  //- return const reference to meshSurfaceEngine
110  inline const meshSurfaceEngine& surfaceEngine() const
111  {
112  return meshSurface_;
113  }
114 
115  //- return const reference to a list containing boudary patch index
116  //- for each boundary face
117  inline const labelList& boundaryFacePatches() const
118  {
119  return facePatch_;
120  }
121 
122  //- return const reference to a graph of patches attached to a surface
123  //- point
124  inline const VRWGraph& pointPatches() const
125  {
126  return pointPatches_;
127  }
128 
129  //- return labels of corner points (from the list of boundary points)
130  inline const labelHashSet& corners() const
131  {
132  return corners_;
133  }
134 
135  //- return labels of edge points (from the list of boundary points)
136  inline const labelHashSet& edgePoints() const
137  {
138  return edgePoints_;
139  }
140 
141  //- return the number of feature edges attached to a boundary point
142  inline label numberOfFeatureEdgesAtPoint(const label bpI) const
143  {
144  return nEdgesAtPoint_[bpI];
145  }
146 
147  //- return patch-patches addressing
148  inline const List<labelHashSet>& patchPatches() const
149  {
150  return patchPatches_;
151  }
152 
153  //- return labels of boundary edges which are feature edges
154  inline const labelHashSet& featureEdges() const
155  {
156  return featureEdges_;
157  }
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #endif
168 
169 // ************************************************************************* //
Foam::meshSurfacePartitioner::facePatch_
const labelList & facePatch_
pointer to face patches
Definition: meshSurfacePartitioner.H:59
Foam::meshSurfacePartitioner::operator=
void operator=(const meshSurfacePartitioner &)
Disallow default bitwise assignment.
Foam::meshSurfacePartitioner::calculateCornersEdgesAndAddressing
void calculateCornersEdgesAndAddressing()
find corners, edge points and addressing
Definition: meshSurfacePartitionerFunctions.C:38
VRWGraph.H
Foam::meshSurfacePartitioner::patchPatches_
List< labelHashSet > patchPatches_
patch-patches addressing
Definition: meshSurfacePartitioner.H:71
Foam::meshSurfacePartitioner::~meshSurfacePartitioner
~meshSurfacePartitioner()
Definition: meshSurfacePartitioner.C:74
Foam::HashSet< label, Hash< label > >
Foam::meshSurfacePartitioner::surfaceEngine
const meshSurfaceEngine & surfaceEngine() const
return const reference to meshSurfaceEngine
Definition: meshSurfacePartitioner.H:109
Foam::meshSurfacePartitioner::meshSurfacePartitioner
meshSurfacePartitioner(const meshSurfacePartitioner &)
Disallow default bitwise copy construct.
Foam::meshSurfacePartitioner::pointPatches
const VRWGraph & pointPatches() const
Definition: meshSurfacePartitioner.H:123
Foam::meshSurfacePartitioner::pointPatches_
VRWGraph pointPatches_
patches at a surface point
Definition: meshSurfacePartitioner.H:62
Foam::meshSurfacePartitioner::corners_
labelHashSet corners_
labels of corner points
Definition: meshSurfacePartitioner.H:65
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::meshSurfacePartitioner::featureEdges_
labelHashSet featureEdges_
labels of feature edges
Definition: meshSurfacePartitioner.H:77
Foam::meshSurfacePartitioner::patchPatches
const List< labelHashSet > & patchPatches() const
return patch-patches addressing
Definition: meshSurfacePartitioner.H:147
HashSet.H
Foam::meshSurfacePartitioner::numberOfFeatureEdgesAtPoint
label numberOfFeatureEdgesAtPoint(const label bpI) const
return the number of feature edges attached to a boundary point
Definition: meshSurfacePartitioner.H:141
Foam::meshSurfacePartitioner::edgePoints_
labelHashSet edgePoints_
labels of edge points
Definition: meshSurfacePartitioner.H:68
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
meshSurfaceEngine.H
Foam::meshSurfacePartitioner
Definition: meshSurfacePartitioner.H:52
Foam::meshSurfacePartitioner::boundaryFacePatches
const labelList & boundaryFacePatches() const
Definition: meshSurfacePartitioner.H:116
Foam::meshSurfacePartitioner::meshSurface_
const meshSurfaceEngine & meshSurface_
reference to mesh surface engine
Definition: meshSurfacePartitioner.H:56
Foam::meshSurfacePartitioner::edgePoints
const labelHashSet & edgePoints() const
return labels of edge points (from the list of boundary points)
Definition: meshSurfacePartitioner.H:135
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
Foam::meshSurfacePartitioner::nEdgesAtPoint_
labelList nEdgesAtPoint_
number of edges attached to a surface point
Definition: meshSurfacePartitioner.H:74
Foam::meshSurfacePartitioner::corners
const labelHashSet & corners() const
return labels of corner points (from the list of boundary points)
Definition: meshSurfacePartitioner.H:129
Foam::VRWGraph
Definition: VRWGraph.H:101
Foam::meshSurfaceEngine
Definition: meshSurfaceEngine.H:54
Foam::meshSurfacePartitioner::featureEdges
const labelHashSet & featureEdges() const
return labels of boundary edges which are feature edges
Definition: meshSurfacePartitioner.H:153