-
Notifications
You must be signed in to change notification settings - Fork 123
/
cvControls.H
363 lines (240 loc) · 11.7 KB
/
cvControls.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::cvControls
Description
Controls for the conformalVoronoiMesh mesh generator
SourceFiles
cvControls.C
\*---------------------------------------------------------------------------*/
#ifndef cvControls_H
#define cvControls_H
#include "dictionary.H"
#include "Switch.H"
#include "vector.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of classes
class conformalVoronoiMesh;
/*---------------------------------------------------------------------------*\
Class cvControls Declaration
\*---------------------------------------------------------------------------*/
class cvControls
{
// Private data
//- Reference to the foamyHexMeshDict
const dictionary& foamyHexMeshDict_;
// Surface conformation controls
//- Point pair spacing coefficient - fraction of the local target
// cell size
scalar pointPairDistanceCoeff_;
//- Distance along feature edge to place mixed feature point
// conformation groups - to be multiple of pointPairDistanceCoeff_.
scalar mixedFeaturePointPPDistanceCoeff_;
//- Distance to a feature point within which surface and edge
// conformation points are excluded - fraction of the local target
// cell size
scalar featurePointExclusionDistanceCoeff_;
//- Distance to an existing feature edge conformation location
// within which other edge conformation location are excluded -
// fraction of the local target cell size
scalar featureEdgeExclusionDistanceCoeff_;
//- Surface search distance coefficient - fraction of the local
// target cell size
scalar surfaceSearchDistanceCoeff_;
//- Maximum allowable protrusion through the surface before
// conformation points are added - fraction of the local target
// cell size
scalar maxSurfaceProtrusionCoeff_;
//- Maximum quadrant angle allowed at a concave edge before
// additional "mitering" lines are added
scalar maxQuadAngle_;
//- Now often to rebuild the surface conformation
label surfaceConformationRebuildFrequency_;
// Controls for feature point conformation
//-
Switch guardFeaturePoints_;
//-
Switch edgeAiming_;
//-
Switch snapFeaturePoints_;
//-
Switch circulateEdges_;
//- Switch for using specialised feature points
Switch specialiseFeaturePoints_;
// Controls for coarse surface conformation
//- Distance to an existing surface conformation point location
// within which other surface point locations are excluded
// - fraction of the local target cell size
scalar surfacePtExclusionDistanceCoeff_;
//- Distance to search for feature edges near to
// surface protrusions - fraction of the local target
// cell size.
scalar edgeSearchDistCoeffSqr_;
//- Proximity to a feature edge where a surface hit is
// not created, only the edge conformation is created
// - fraction of the local target cell size.
scalar surfacePtReplaceDistCoeffSqr_;
//- Maximum allowed number surface conformation iterations.
label maxConformationIterations_;
//- Termination criterion for conformation iterations.
// When the number of surface protrusions drops below this
// ratio of the initial number of protrusions.
scalar iterationToInitialHitRatioLimit_;
// Motion control controls
// Cell size criteria
//- Default cell size
scalar defaultCellSize_;
//- Minimum cell size
scalar minimumCellSize_;
//- Switch to control the output of obj files for debug
Switch objOutput_;
//- Switch to control the reporting of detailed timeChecks
Switch timeChecks_;
//- Switch to control the reporting of detailed vertex information
Switch printVertexInfo_;
//- Allowed relative load unbalance
scalar maxLoadUnbalance_;
//- Cosine of angle of alignment with required direction within which a
// face will be accepted for rotation
scalar cosAlignmentAcceptanceAngle_;
// Point insertion criteria
//- Length between Delaunay vertices above which a new Dv should be
// inserted - fraction of the local target cell size
scalar insertionDistCoeff_;
//- Minimum dual face area corresponding to long Delaunay edge where
// a new Dv is to be inserted - fraction of the local target cell
// size
scalar faceAreaRatioCoeff_;
//- Cosine of the angle of alignment with the required direction
// within which a long De will be accepted for a new Dv insertion
scalar cosInsertionAcceptanceAngle_;
// Point removal criteria
//- Length between Delaunay vertices below which a Dv should be
// removed - fraction of the local target cell size
scalar removalDistCoeff_;
// polyMesh filtering controls
//- Activates the mesh edge filtering. On by default.
Switch filterEdges_;
//- Activates the mesh face filtering. Off by default.
Switch filterFaces_;
//- Write tet mesh at output time (it always writes the Voronoi)
Switch writeTetDualMesh_;
Switch writeCellShapeControlMesh_;
Switch writeBackgroundMeshDecomposition_;
// Private Member Functions
//- Disallow default bitwise copy construct
cvControls(const cvControls&);
//- Disallow default bitwise assignment
void operator=(const cvControls&);
public:
// Constructors
//- Construct from references to conformalVoronoiMesh and dictionary
cvControls
(
const dictionary& foamyHexMeshDict
);
//- Destructor
~cvControls();
// Member Functions
// Access
//- Return the foamyHexMeshDict
inline const dictionary& foamyHexMeshDict() const;
//- Return the pointPairDistanceCoeff
inline scalar pointPairDistanceCoeff() const;
//- Return the mixedFeaturePointPPDistanceCoeff
inline scalar mixedFeaturePointPPDistanceCoeff() const;
//- Return the featurePointExclusionDistanceCoeff
inline scalar featurePointExclusionDistanceCoeff() const;
//- Return the featureEdgeExclusionDistanceCoeff
inline scalar featureEdgeExclusionDistanceCoeff() const;
//-
inline Switch guardFeaturePoints() const;
//-
inline Switch edgeAiming() const;
//-
inline Switch snapFeaturePoints() const;
//-
inline Switch circulateEdges() const;
//- Return the surfacePtExclusionDistanceCoeff
inline scalar surfacePtExclusionDistanceCoeff() const;
//- Return whether to use specialised feature points
inline Switch specialiseFeaturePoints() const;
//- Return the surfaceSearchDistanceCoeff
inline scalar surfaceSearchDistanceCoeff() const;
//- Return the maxSurfaceProtrusionCoeff
inline scalar maxSurfaceProtrusionCoeff() const;
//- Return the maxQuadAngle
inline scalar maxQuadAngle() const;
//- Return the surfaceConformationRebuildFrequency
inline label surfaceConformationRebuildFrequency() const;
//- Return the edgeSearchDistCoeffSqr for conformation.
scalar edgeSearchDistCoeffSqr() const;
//- Return the surfacePtReplaceDistCoeffSqr for conformation.
scalar surfacePtReplaceDistCoeffSqr() const;
//- Return the maxConformationIterations
label maxConformationIterations() const;
//- Return the iterationToInitialHitRatioLimit
scalar iterationToInitialHitRatioLimit() const;
//- Return the defaultCellSize
inline scalar defaultCellSize() const;
//- Return the minimumCellSize
inline scalar minimumCellSize() const;
//- Return the objOutput Switch
inline Switch objOutput() const;
//- Return the timeChecks Switch
inline Switch timeChecks() const;
//- Return the printVertexInfo Switch
inline Switch printVertexInfo() const;
//- Return the maxLoadUnbalance
inline scalar maxLoadUnbalance() const;
//- Return the cosAlignmentAcceptanceAngle
inline scalar cosAlignmentAcceptanceAngle() const;
//- Return the aspectRatio
inline scalar aspectRatio() const;
//- Return the aspectRatioDirection
inline const vector& aspectRatioDirection() const;
//- Return the insertionDistCoeff
inline scalar insertionDistCoeff() const;
//- Return the faceAreaRatioCoeff
inline scalar faceAreaRatioCoeff() const;
//- Return the cosInsertionAcceptanceAngle
inline scalar cosInsertionAcceptanceAngle() const;
//- Return removalDistCoeff
inline scalar removalDistCoeff() const;
//- Filter edges at output time
inline Switch filterEdges() const;
//- Filter faces at output time
inline Switch filterFaces() const;
//- Write tetMesh at output time
inline Switch writeTetDualMesh() const;
//- Write cellShapeControlMesh at output time
inline Switch writeCellShapeControlMesh() const;
//- Write backgroundMeshDecomposition at output time
inline Switch writeBackgroundMeshDecomposition() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "cvControlsI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //