snapParameters.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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::snapParameters
26 
27 Description
28  Simple container to keep together snap specific information.
29 
30 SourceFiles
31  snapParameters.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef snapParameters_H
36 #define snapParameters_H
37 
38 #include "dictionary.H"
39 #include "scalar.H"
40 #include "Switch.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Class forward declarations
48 
49 /*---------------------------------------------------------------------------*\
50  Class snapParameters Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class snapParameters
54 {
55  // Private data
56 
57  const label nSmoothPatch_;
58 
59  const scalar snapTol_;
60 
61  const label nSmoothDispl_;
62 
63  const label nSnap_;
64 
65  const label nFeatureSnap_;
66 
67  const Switch explicitFeatureSnap_;
68 
69  const Switch implicitFeatureSnap_;
70 
71  const Switch multiRegionFeatureSnap_;
72 
73  const Switch detectNearSurfacesSnap_;
74 
75 
76  // Private Member Functions
77 
78  //- Disallow default bitwise copy construct
80 
81  //- Disallow default bitwise assignment
82  void operator=(const snapParameters&);
83 
84 
85 public:
86 
87  // Constructors
88 
89  //- Construct from dictionary
91 
92 
93  // Member Functions
94 
95  // Access
96 
97  //- Number of patch smoothing iterations before finding
98  // correspondence to surface
99  label nSmoothPatch() const
100  {
101  return nSmoothPatch_;
102  }
103 
104  //- Relative distance for points to be attracted by surface
105  // feature point
106  // or edge. True distance is this factor times local
107  // maximum edge length.
108  scalar snapTol() const
109  {
110  return snapTol_;
111  }
112 
113  //- Number of mesh displacement smoothing iterations.
114  label nSmoothDispl() const
115  {
116  return nSmoothDispl_;
117  }
118 
119  //- Maximum number of snapping relaxation iterations. Should stop
120  // before upon reaching a correct mesh.
121  label nSnap() const
122  {
123  return nSnap_;
124  }
126  label nFeatureSnap() const
127  {
128  return nFeatureSnap_;
129  }
132  {
133  return explicitFeatureSnap_;
134  }
137  {
138  return implicitFeatureSnap_;
139  }
142  {
143  return multiRegionFeatureSnap_;
144  }
147  {
148  return detectNearSurfacesSnap_;
149  }
150 
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
Switch detectNearSurfacesSnap() const
dictionary dict
label nSmoothDispl() const
Number of mesh displacement smoothing iterations.
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
label nSmoothPatch() const
Number of patch smoothing iterations before finding.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Definition: Switch.H:60
Switch multiRegionFeatureSnap() const
label nFeatureSnap() const
Switch explicitFeatureSnap() const
Switch implicitFeatureSnap() const
Simple container to keep together snap specific information.
label nSnap() const
Maximum number of snapping relaxation iterations. Should stop.
scalar snapTol() const
Relative distance for points to be attracted by surface.
Namespace for OpenFOAM.