snapParameters.C
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) 2011-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 \*---------------------------------------------------------------------------*/
25 
26 #include "snapParameters.H"
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 // Construct from dictionary
32 :
33  nSmoothPatch_(readLabel(dict.lookup("nSmoothPatch"))),
34  nSmoothInternal_(dict.lookupOrDefault("nSmoothInternal", 0)),
35  snapTol_(readScalar(dict.lookup("tolerance"))),
36  nSmoothDispl_(readLabel(dict.lookup("nSolveIter"))),
37  nSnap_(readLabel(dict.lookup("nRelaxIter"))),
38  nFeatureSnap_(dict.lookupOrDefault("nFeatureSnapIter", -1)),
39  explicitFeatureSnap_(dict.lookupOrDefault("explicitFeatureSnap", true)),
40  implicitFeatureSnap_(dict.lookupOrDefault("implicitFeatureSnap", false)),
41  multiRegionFeatureSnap_
42  (
43  dict.lookupOrDefault("multiRegionFeatureSnap", false)
44  ),
45  detectNearSurfacesSnap_
46  (
47  dict.lookupOrDefault("detectNearSurfacesSnap", true)
48  ),
49  strictRegionSnap_
50  (
51  dict.lookupOrDefault("strictRegionSnap", false)
52  ),
53  detectBaffles_(dict.lookupOrDefault("detectBaffles", true)),
54  baffleFeaturePoints_(dict.lookupOrDefault("baffleFeaturePoints", false)),
55  releasePoints_(dict.lookupOrDefault("releasePoints", false)),
56  stringFeatures_(dict.lookupOrDefault("stringFeatures", true)),
57  avoidDiagonal_(dict.lookupOrDefault("avoidDiagonal", false)),
58  nFaceSplitInterval_
59  (
60  dict.lookupOrDefault("nFaceSplitInterval", labelMin)
61  ),
62  concaveAngle_(dict.lookupOrDefault("concaveAngle", 45)),
63  minAreaRatio_(dict.lookupOrDefault("minAreaRatio", 0.3))
64 {}
65 
66 
67 // ************************************************************************* //
Foam::labelMin
static const label labelMin
Definition: label.H:61
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
readScalar
#define readScalar
Definition: doubleScalar.C:38
Foam::snapParameters::snapParameters
snapParameters(const snapParameters &)
Disallow default bitwise copy construct.
snapParameters.H
Foam::readLabel
label readLabel(Istream &is)
Definition: label.H:64
lookup
stressControl lookup("compactNormalStress") >> compactNormalStress