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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::featurePointConformer
28
29Description
30 The Delaunay vertices required to conform to a feature point can be
31 determined upon initialisation because the feature points are fixed and
32 do not change throughout the meshing process.
33
34SourceFiles
35 featurePointConformerI.H
36 featurePointConformer.C
37 featurePointConformerSpecialisations.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef featurePointConformer_H
42#define featurePointConformer_H
43
45#include "vector.H"
46#include "DynamicList.H"
47#include "List.H"
49#include "pointPairs.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56class conformalVoronoiMesh;
57class cvControls;
58class conformationSurfaces;
59class pointFeatureEdgesTypes;
60class backgroundMeshDecomposition;
61
62/*---------------------------------------------------------------------------*\
63 Class featurePointConformer Declaration
64\*---------------------------------------------------------------------------*/
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.
77 const conformalVoronoiMesh& foamyHexMesh_;
78
79 //- Reference to the mesher controls.
80 const cvControls& foamyHexMeshControls_;
81
82 //- Reference to the conformation surfaces.
83 const conformationSurfaces& geometryToConformTo_;
84
85 //- Store the feature constraining points, to be reinserted after a
86 // triangulation clear.
87 List<Vb> featurePointVertices_;
88
89 //-
90 mutable pointPairs<Delaunay> ftPtPairs_;
91
92
93 // Private Member Functions
94
95 //- Calculate the shared face normal between two edges geometrically.
96 vector sharedFaceNormal
97 (
98 const extendedFeatureEdgeMesh& feMesh,
99 const label edgeI,
100 const label nextEdgeI
101 ) const;
102
103 label getSign(const extendedFeatureEdgeMesh::edgeStatus eStatus) const;
104
105 bool createSpecialisedFeaturePoint
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
116 void addMasterAndSlavePoints
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
126 void createMasterAndSlavePoints
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
136 void createFeaturePoints(DynamicList<Vb>& pts);
137
138 //- No copy construct
140
141 //- No copy assignment
142 void operator=(const featurePointConformer&) = delete;
143
144
145public:
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
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197#endif
198
199// ************************************************************************* //
CGAL data structures used for 3D Delaunay meshing.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:72
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
A HashTable to objects of type <T> with a label key.
Definition: Map.H:60
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Store a background polyMesh to use for the decomposition of space and queries for parallel conformalV...
Controls for the conformalVoronoiMesh mesh generator.
Definition: cvControls.H:56
The Delaunay vertices required to conform to a feature point can be determined upon initialisation be...
featurePointConformer(const conformalVoronoiMesh &foamyHexMesh)
Construct from components.
void reIndexPointPairs(const Map< label > &oldToNewIndices)
Reindex the feature point pairs using the map.
const pointPairs< Delaunay > & featurePointPairs() const
Return the feature point pair table.
ClassName("featurePointConformer")
Runtime type information.
~featurePointConformer()
Destructor.
const List< Vb > & featurePointVertices() const
Return the feature point vertices for insertion into the.
void distribute(const backgroundMeshDecomposition &decomposition)
Distribute the feature point vertices according to the.
Hold the types of feature edges attached to the point.
HashSet of unique edges. The edges are stored as a pair of pairs:
Definition: pointPairs.H:59
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
Namespace for OpenFOAM.