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