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