Loading...
Searching...
No Matches
cv2DControls.H
Go to the documentation of this file.
1/*--------------------------------*- C++ -*----------------------------------*\
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::cv2DControls
28
29Description
30 Controls for the 2D CV mesh generator.
31
32SourceFiles
33 cv2DControls.C
34 cv2DControlsI.H
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef cv2DControls_H
39#define cv2DControls_H
40
41#include "Switch.H"
42#include "dictionary.H"
43#include "boundBox.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
50// Forward declaration of friend functions and operators
51
52class cv2DControls;
53
55
57/*---------------------------------------------------------------------------*\
58 Class cv2DControls Declaration
59\*---------------------------------------------------------------------------*/
60
61class cv2DControls
62{
63 // Private Data
64
65 //- Description of data
66
67 const dictionary& motionControl_;
68
69 const dictionary& conformationControl_;
70
71
72 // Private Member Functions
73
74 //- No copy construct
75 cv2DControls(const cv2DControls&) = delete;
76
77 //- No copy assignment
78 void operator=(const cv2DControls&) = delete;
79
80
81public:
82
83 // Controls
84
85 //- Minimum cell size below which protrusions through the surface
86 //- are not split
87 scalar minCellSize_;
88
89 //- Square of minCellSize
91
92 //- Maximum quadrant angle allowed at a concave corner before
93 //- additional "mitering" lines are added
94 scalar maxQuadAngle_;
96 //- Near-wall region where cells are aligned with the wall
98
99 //- Square of nearWallAlignedDist
102 //- Insert near-boundary point mirror or point-pairs
104
105 //- Mirror near-boundary points rather than insert point-pairs
107
108 //- Insert point-pairs vor dual-cell vertices very near the surface
110
112
114
117 scalar randomPerturbation_;
118
120
122 // Tolerances
123
124 //- Maximum cartesian span of the geometry
125 scalar span_;
127 //- Square of span
128 scalar span2_;
129
130 //- Minimum edge-length of the cell size below which protrusions
131 //- through the surface are not split
133
134 //- Square of minEdgeLen
135 scalar minEdgeLen2_;
137 //- Maximum notch size below which protusions into the surface are
138 //- not filled
139 scalar maxNotchLen_;
140
141 //- Square of maxNotchLen
142 scalar maxNotchLen2_;
143
144 //- The minimum distance allowed between a dual-cell vertex
145 //- and the surface before a point-pair is introduced
146 scalar minNearPointDist_;
147
148 //- Square of minNearPoint
150
151 //- Distance between boundary conforming point-pairs
152 scalar ppDist_;
153
154 //- Square of ppDist
155 scalar ppDist2_;
156
157
158 // Constructors
159
160 cv2DControls
161 (
162 const dictionary& controlDict,
163 const boundBox& bb
164 );
165
167 //- Destructor
168 ~cv2DControls() = default;
169
170
171 // Member Functions
172
173 // Access
174
175 //- Return the minimum cell size
176 inline scalar minCellSize() const;
178 //- Return the square of the minimum cell size
179 inline scalar minCellSize2() const;
180
181 //- Return the maximum quadrant angle
182 inline scalar maxQuadAngle() const;
183
184 //- Return number of layers to align with the nearest wall
185 inline scalar nearWallAlignedDist() const;
186
187 //- Return square of nearWallAlignedDist
188 inline scalar nearWallAlignedDist2() const;
189
190 //- Return insertSurfaceNearestPointPairs Switch
193 //- Return mirrorPoints Switch
194 inline Switch mirrorPoints() const;
195
196 //- Return insertSurfaceNearPointPairs Switch
198
199 //- Return the objOutput Switch
200 inline Switch objOutput() const;
201
202 //- Return the meshedSurfaceOutput Switch
203 inline Switch meshedSurfaceOutput() const;
204
205 //- Return the randomise initial point layout Switch
206 inline Switch randomiseInitialGrid() const;
208 //- Return the random perturbation factor
209 inline scalar randomPerturbation() const;
210
211 //- Return the maximum number of boundary conformation iterations
212 inline label maxBoundaryConformingIter() const;
213
214 //- Return the span
215 inline scalar span() const;
216
217 //- Return the span squared
218 inline scalar span2() const;
219
220 //- Return the minEdgeLen
221 inline scalar minEdgeLen() const;
222
223 //- Return the minEdgeLen squared
224 inline scalar minEdgeLen2() const;
225
226 //- Return the maxNotchLen
227 inline scalar maxNotchLen() const;
228
229 //- Return the maxNotchLen squared
230 inline scalar maxNotchLen2() const;
231
232 //- Return the minNearPointDist
233 inline scalar minNearPointDist() const;
234
235 //- Return the minNearPointDist squared
236 inline scalar minNearPointDist2() const;
237
238 //- Return the ppDist
239 inline scalar ppDist() const;
240
241
242 // Write
243
244 //- Write controls to output stream.
245 void write(Ostream& os) const;
246
247 //- Ostream Operator
248 friend Ostream& operator<<
249 (
250 Ostream& os,
251 const cv2DControls& s
252 );
253};
254
255
256// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
257
258} // End namespace Foam
259
260// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
261
262#include "cv2DControlsI.H"
263
264// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
265
266#endif
267
268// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition Switch.H:81
A bounding box defined in terms of min/max extrema points.
Definition boundBox.H:71
Controls for the 2D CV mesh generator.
scalar span2() const
Return the span squared.
Switch objOutput() const
Return the objOutput Switch.
Switch insertSurfaceNearPointPairs() const
Return insertSurfaceNearPointPairs Switch.
scalar minEdgeLen2_
Square of minEdgeLen.
Switch mirrorPoints_
Mirror near-boundary points rather than insert point-pairs.
scalar minNearPointDist_
The minimum distance allowed between a dual-cell vertex and the surface before a point-pair is introd...
scalar minCellSize2_
Square of minCellSize.
scalar maxNotchLen2_
Square of maxNotchLen.
Switch mirrorPoints() const
Return mirrorPoints Switch.
scalar span_
Maximum cartesian span of the geometry.
scalar minEdgeLen() const
Return the minEdgeLen.
scalar maxQuadAngle_
Maximum quadrant angle allowed at a concave corner before additional "mitering" lines are added.
~cv2DControls()=default
Destructor.
scalar span2_
Square of span.
scalar nearWallAlignedDist2() const
Return square of nearWallAlignedDist.
scalar ppDist() const
Return the ppDist.
scalar nearWallAlignedDist() const
Return number of layers to align with the nearest wall.
Switch insertSurfaceNearestPointPairs() const
Return insertSurfaceNearestPointPairs Switch.
label maxBoundaryConformingIter() const
Return the maximum number of boundary conformation iterations.
scalar minCellSize2() const
Return the square of the minimum cell size.
scalar minNearPointDist2_
Square of minNearPoint.
scalar maxNotchLen2() const
Return the maxNotchLen squared.
scalar maxNotchLen() const
Return the maxNotchLen.
label maxBoundaryConformingIter_
scalar minNearPointDist() const
Return the minNearPointDist.
scalar randomPerturbation() const
Return the random perturbation factor.
void write(Ostream &os) const
Write controls to output stream.
scalar minCellSize_
Minimum cell size below which protrusions through the surface are not split.
scalar nearWallAlignedDist2_
Square of nearWallAlignedDist.
Switch randomiseInitialGrid() const
Return the randomise initial point layout Switch.
scalar maxNotchLen_
Maximum notch size below which protusions into the surface are not filled.
scalar ppDist_
Distance between boundary conforming point-pairs.
scalar ppDist2_
Square of ppDist.
scalar maxQuadAngle() const
Return the maximum quadrant angle.
scalar nearWallAlignedDist_
Near-wall region where cells are aligned with the wall.
scalar minCellSize() const
Return the minimum cell size.
scalar span() const
Return the span.
cv2DControls(const dictionary &controlDict, const boundBox &bb)
scalar minNearPointDist2() const
Return the minNearPointDist squared.
Switch meshedSurfaceOutput() const
Return the meshedSurfaceOutput Switch.
scalar minEdgeLen2() const
Return the minEdgeLen squared.
Switch insertSurfaceNearestPointPairs_
Insert near-boundary point mirror or point-pairs.
Switch insertSurfaceNearPointPairs_
Insert point-pairs vor dual-cell vertices very near the surface.
scalar minEdgeLen_
Minimum edge-length of the cell size below which protrusions through the surface are not split.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
runTime controlDict().readEntry("adjustTimeStep"
OBJstream os(runTime.globalPath()/outputName)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
runTime write()