triSurfaceClassifyEdges.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  triSurfaceClassifyEdges
26 
27 Description
28  Divides the surface mesh into regions bounded by feature edges
29 
30 SourceFiles
31  triSurfaceClassifyEdges.C
32  triSurfaceClassifyEdgesFunctions.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef triSurfaceClassifyEdges_H
37 #define triSurfaceClassifyEdges_H
38 
39 #include "triSurf.H"
40 #include "VRWGraph.H"
41 #include "boolList.H"
42 #include "direction.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 //- Forward declarations
50 class meshOctree;
51 
52 /*---------------------------------------------------------------------------*\
53  Class triSurfaceClassifyEdges Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 {
58  // Private data
59  //- reference to meshOctree
60  const meshOctree& octree_;
61 
62  //- flags for surface edges
64 
65  //- orientation of facet's normal (0 - unknown, 1- outward, 2- inward)
67 
68  // Private member functions
69  //- check the orientation of the patches in the triangulated surface
70  void checkOrientation();
71 
72  //- classify edges based on the orientation of the surface facets
73  void classifyEdgesTypes();
74 
75  //- Disallow default bitwise copy construct
77 
78  //- Disallow default bitwise assignment
80 
81 public:
82 
83  // Enumerators
84 
85  enum edgeType_
86  {
87  NONE = 0,
91  FEATUREEDGE = 8
92  };
93 
94  // Constructors
95 
96  //- Construct from octree
97  triSurfaceClassifyEdges(const meshOctree& octree);
98 
99  // Destructor
100 
102 
103 
104  // Member Functions
105 
106  //- return the edge type according to the above enumerator
107  inline direction edgeType(const label edgeI) const
108  {
109  return edgeTypes_[edgeI];
110  }
111 
112  //- return the list of edge classification
113  const List<direction>& edgeTypes() const;
114 };
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
Foam::triSurfaceClassifyEdges::checkOrientation
void checkOrientation()
check the orientation of the patches in the triangulated surface
Definition: triSurfaceClassifyEdgesFunctions.C:46
triSurf.H
boolList.H
Foam::triSurfaceClassifyEdges::edgeTypes_
List< direction > edgeTypes_
flags for surface edges
Definition: triSurfaceClassifyEdges.H:62
VRWGraph.H
Foam::triSurfaceClassifyEdges::~triSurfaceClassifyEdges
~triSurfaceClassifyEdges()
Definition: triSurfaceClassifyEdges.C:54
Foam::triSurfaceClassifyEdges::facetOrientation_
List< direction > facetOrientation_
orientation of facet's normal (0 - unknown, 1- outward, 2- inward)
Definition: triSurfaceClassifyEdges.H:65
Foam::triSurfaceClassifyEdges::edgeTypes
const List< direction > & edgeTypes() const
return the list of edge classification
Definition: triSurfaceClassifyEdges.C:59
Foam::triSurfaceClassifyEdges::CONCAVEEDGE
@ CONCAVEEDGE
Definition: triSurfaceClassifyEdges.H:88
Foam::triSurfaceClassifyEdges::CONVEXEDGE
@ CONVEXEDGE
Definition: triSurfaceClassifyEdges.H:87
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::triSurfaceClassifyEdges::FLATSURFACEEDGE
@ FLATSURFACEEDGE
Definition: triSurfaceClassifyEdges.H:89
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::triSurfaceClassifyEdges::NONE
@ NONE
Definition: triSurfaceClassifyEdges.H:86
direction.H
Direction is an integer type used to represent the Cartesian directions etc. Currently it is a typede...
Foam::triSurfaceClassifyEdges
Definition: triSurfaceClassifyEdges.H:55
Foam::triSurfaceClassifyEdges::operator=
void operator=(const triSurfaceClassifyEdges &)
Disallow default bitwise assignment.
Foam::triSurfaceClassifyEdges::classifyEdgesTypes
void classifyEdgesTypes()
classify edges based on the orientation of the surface facets
Definition: triSurfaceClassifyEdgesFunctions.C:276
Foam::triSurfaceClassifyEdges::edgeType
direction edgeType(const label edgeI) const
return the edge type according to the above enumerator
Definition: triSurfaceClassifyEdges.H:106
Foam::List< direction >
Foam::meshOctree
Definition: meshOctree.H:55
Foam::triSurfaceClassifyEdges::triSurfaceClassifyEdges
triSurfaceClassifyEdges(const triSurfaceClassifyEdges &)
Disallow default bitwise copy construct.
meshOctree
Octree for mesh generation.
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::triSurfaceClassifyEdges::FEATUREEDGE
@ FEATUREEDGE
Definition: triSurfaceClassifyEdges.H:90
Foam::triSurfaceClassifyEdges::octree_
const meshOctree & octree_
reference to meshOctree
Definition: triSurfaceClassifyEdges.H:59
Foam::triSurfaceClassifyEdges::edgeType_
edgeType_
Definition: triSurfaceClassifyEdges.H:84