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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "snapParameters.H"
29 #include "meshRefinement.H"
30 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
33 // Construct from dictionary
34 Foam::snapParameters::snapParameters(const dictionary& dict, const bool dryRun)
35 :
36  nSmoothPatch_
37  (
38  meshRefinement::get<label>(dict, "nSmoothPatch", dryRun)
39  ),
40  nSmoothInternal_(dict.lookupOrDefault("nSmoothInternal", 0)),
41  snapTol_
42  (
43  meshRefinement::get<scalar>(dict, "tolerance", dryRun)
44  ),
45  nSmoothDispl_
46  (
47  meshRefinement::get<label>(dict, "nSolveIter", dryRun)
48  ),
49  nSnap_
50  (
51  meshRefinement::get<label>(dict, "nRelaxIter", dryRun)
52  ),
53  nFeatureSnap_(dict.lookupOrDefault("nFeatureSnapIter", -1)),
54  explicitFeatureSnap_(dict.lookupOrDefault("explicitFeatureSnap", true)),
55  implicitFeatureSnap_(dict.lookupOrDefault("implicitFeatureSnap", false)),
56  multiRegionFeatureSnap_
57  (
58  dict.lookupOrDefault("multiRegionFeatureSnap", false)
59  ),
60  detectNearSurfacesSnap_
61  (
62  dict.lookupOrDefault("detectNearSurfacesSnap", true)
63  ),
64  strictRegionSnap_
65  (
66  dict.lookupOrDefault("strictRegionSnap", false)
67  ),
68  detectBaffles_(dict.lookupOrDefault("detectBaffles", true)),
69  baffleFeaturePoints_(dict.lookupOrDefault("baffleFeaturePoints", false)),
70  releasePoints_(dict.lookupOrDefault("releasePoints", false)),
71  stringFeatures_(dict.lookupOrDefault("stringFeatures", true)),
72  avoidDiagonal_(dict.lookupOrDefault("avoidDiagonal", false)),
73  nFaceSplitInterval_
74  (
75  dict.lookupOrDefault("nFaceSplitInterval", labelMin)
76  ),
77  concaveAngle_(dict.lookupOrDefault("concaveAngle", 45)),
78  minAreaRatio_(dict.lookupOrDefault("minAreaRatio", 0.3)),
79  dryRun_(dryRun)
80 {}
81 
82 
83 // ************************************************************************* //
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:62
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
meshRefinement.H
Foam::meshRefinement
Helper class which maintains intersections of (changing) mesh with (static) surfaces.
Definition: meshRefinement.H:86
snapParameters.H
Foam::labelMin
constexpr label labelMin
Definition: label.H:64