featurePointConformer.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::featurePointConformer
26 
27 Description
28  The Delaunay vertices required to conform to a feature point can be
29  determined upon initialisation because the feature points are fixed and
30  do not change throughout the meshing process.
31 
32 SourceFiles
33  featurePointConformerI.H
34  featurePointConformer.C
35  featurePointConformerSpecialisations.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef featurePointConformer_H
40 #define featurePointConformer_H
41 
42 // Include uint.H before CGAL headers to define __STDC_LIMIT_MACROS
43 #include "uint.H"
45 #include "vector.H"
46 #include "DynamicList.H"
47 #include "List.H"
49 #include "pointPairs.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 class conformalVoronoiMesh;
57 class cvControls;
58 class conformationSurfaces;
59 class pointFeatureEdgesTypes;
60 class backgroundMeshDecomposition;
61 
62 /*---------------------------------------------------------------------------*\
63  Class featurePointConformer Declaration
64 \*---------------------------------------------------------------------------*/
65 
67 {
68  // Static data
69 
70  //- Tolerance within which two lines are said to be parallel.
71  static const scalar tolParallel;
72 
73 
74  // Private data
75 
76  //- Reference to the mesher.
78 
79  //- Reference to the mesher controls.
81 
82  //- Reference to the conformation surfaces.
84 
85  //- Store the feature constraining points, to be reinserted after a
86  // triangulation clear.
88 
89  //-
91 
92 
93  // Private Member Functions
94 
95  //- Calculate the shared face normal between two edges geometrically.
97  (
98  const extendedFeatureEdgeMesh& feMesh,
99  const label edgeI,
100  const label nextEdgeI
101  ) const;
102 
104 
106  (
107  const extendedFeatureEdgeMesh& feMesh,
108  const labelList& pEds,
109  const pointFeatureEdgesTypes& pFEdgesTypes,
111  const label ptI,
112  DynamicList<Vb>& pts
113  ) const;
114 
115 
117  (
118  const DynamicList<point>& masterPoints,
119  const DynamicList<indexedVertexEnum::vertexType>& masterPointsTypes,
120  const Map<DynamicList<autoPtr<plane> > >& masterPointReflections,
121  DynamicList<Vb>& pts,
122  const label ptI
123  ) const;
124 
125  //- Helper function for conforming to feature points
127  (
128  const extendedFeatureEdgeMesh& feMesh,
129  const label ptI,
130  DynamicList<Vb>& pts
131  ) const;
132 
133  void createMixedFeaturePoints(DynamicList<Vb>& pts) const;
134 
135  //- Create the points that will conform to the feature
137 
138  //- Disallow default bitwise copy construct
140 
141  //- Disallow default bitwise assignment
142  void operator=(const featurePointConformer&);
143 
144 
145 public:
146 
147  //- Runtime type information
148  ClassName("featurePointConformer");
149 
150 
151  // Constructors
152 
153  //- Construct from components
154  explicit featurePointConformer
155  (
156  const conformalVoronoiMesh& foamyHexMesh
157  );
158 
159 
160  //- Destructor
162 
163 
164  // Member Functions
165 
166  // Access
167 
168  //- Return the feature point vertices for insertion into the
169  // triangulation.
170  inline const List<Vb>& featurePointVertices() const;
171 
172  //- Return the feature point pair table
173  inline const pointPairs<Delaunay>& featurePointPairs() const;
174 
175 
176  // Edit
177 
178  //- Distribute the feature point vertices according to the
179  // supplied background mesh
180  void distribute(const backgroundMeshDecomposition& decomposition);
181 
182  //- Reindex the feature point pairs using the map.
183  void reIndexPointPairs(const Map<label>& oldToNewIndices);
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #include "featurePointConformerI.H"
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 #endif
198 
199 // ************************************************************************* //
Foam::conformalVoronoiMesh
Definition: conformalVoronoiMesh.H:97
Foam::extendedEdgeMesh::edgeStatus
edgeStatus
Definition: extendedEdgeMesh.H:101
Foam::cvControls
Controls for the conformalVoronoiMesh mesh generator.
Definition: cvControls.H:53
featurePointConformerI.H
List.H
Foam::DynamicList
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:56
Foam::featurePointConformer::getSign
label getSign(const extendedFeatureEdgeMesh::edgeStatus eStatus) const
Foam::featurePointConformer::~featurePointConformer
~featurePointConformer()
Destructor.
Foam::featurePointConformer::featurePointVertices
const List< Vb > & featurePointVertices() const
Return the feature point vertices for insertion into the.
Definition: featurePointConformerI.H:26
Foam::featurePointConformer::createSpecialisedFeaturePoint
bool createSpecialisedFeaturePoint(const extendedFeatureEdgeMesh &feMesh, const labelList &pEds, const pointFeatureEdgesTypes &pFEdgesTypes, const List< extendedFeatureEdgeMesh::edgeStatus > &allEdStat, const label ptI, DynamicList< Vb > &pts) const
Foam::Map
A HashTable to objects of type <T> with a label key.
Definition: PrimitivePatchTemplate.H:68
Foam::featurePointConformer::createFeaturePoints
void createFeaturePoints(DynamicList< Vb > &pts)
Create the points that will conform to the feature.
Foam::featurePointConformer::createMixedFeaturePoints
void createMixedFeaturePoints(DynamicList< Vb > &pts) const
Foam::featurePointConformer::operator=
void operator=(const featurePointConformer &)
Disallow default bitwise assignment.
Foam::conformationSurfaces
Definition: conformationSurfaces.H:53
extendedFeatureEdgeMesh.H
Foam::featurePointConformer::featurePointConformer
featurePointConformer(const featurePointConformer &)
Disallow default bitwise copy construct.
Foam::featurePointConformer::ClassName
ClassName("featurePointConformer")
Runtime type information.
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::pointPairs< Delaunay >
Foam::featurePointConformer::featurePointVertices_
List< Vb > featurePointVertices_
Store the feature constraining points, to be reinserted after a.
Definition: featurePointConformer.H:86
Foam::featurePointConformer::tolParallel
static const scalar tolParallel
Tolerance within which two lines are said to be parallel.
Definition: featurePointConformer.H:70
Foam::featurePointConformer::foamyHexMeshControls_
const cvControls & foamyHexMeshControls_
Reference to the mesher controls.
Definition: featurePointConformer.H:79
pointPairs.H
Foam::featurePointConformer::sharedFaceNormal
vector sharedFaceNormal(const extendedFeatureEdgeMesh &feMesh, const label edgeI, const label nextEdgeI) const
Calculate the shared face normal between two edges geometrically.
Foam::featurePointConformer::reIndexPointPairs
void reIndexPointPairs(const Map< label > &oldToNewIndices)
Reindex the feature point pairs using the map.
Foam::featurePointConformer::addMasterAndSlavePoints
void addMasterAndSlavePoints(const DynamicList< point > &masterPoints, const DynamicList< indexedVertexEnum::vertexType > &masterPointsTypes, const Map< DynamicList< autoPtr< plane > > > &masterPointReflections, DynamicList< Vb > &pts, const label ptI) const
Foam::featurePointConformer::createMasterAndSlavePoints
void createMasterAndSlavePoints(const extendedFeatureEdgeMesh &feMesh, const label ptI, DynamicList< Vb > &pts) const
Helper function for conforming to feature points.
Foam::featurePointConformer
The Delaunay vertices required to conform to a feature point can be determined upon initialisation be...
Definition: featurePointConformer.H:65
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
uint.H
System uinteger.
Foam::featurePointConformer::distribute
void distribute(const backgroundMeshDecomposition &decomposition)
Distribute the feature point vertices according to the.
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::featurePointConformer::geometryToConformTo_
const conformationSurfaces & geometryToConformTo_
Reference to the conformation surfaces.
Definition: featurePointConformer.H:82
Foam::Vector< scalar >
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::backgroundMeshDecomposition
Store a background polyMesh to use for the decomposition of space and queries for parallel conformalV...
Definition: backgroundMeshDecomposition.H:92
Foam::pointFeatureEdgesTypes
Hold the types of feature edges attached to the point.
Definition: pointFeatureEdgesTypes.H:51
vector.H
Foam::extendedFeatureEdgeMesh
extendedEdgeMesh + IO.
Definition: extendedFeatureEdgeMesh.H:52
DynamicList.H
Foam::featurePointConformer::ftPtPairs_
pointPairs< Delaunay > ftPtPairs_
Definition: featurePointConformer.H:89
Foam::featurePointConformer::featurePointPairs
const pointPairs< Delaunay > & featurePointPairs() const
Return the feature point pair table.
Definition: featurePointConformerI.H:32
CGALTriangulation3Ddefs.H
CGAL data structures used for 3D Delaunay meshing.
Foam::featurePointConformer::foamyHexMesh_
const conformalVoronoiMesh & foamyHexMesh_
Reference to the mesher.
Definition: featurePointConformer.H:76