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-2020 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 public:
77 
78  // Constructors
79 
80  //- Construct from dictionary
82 
83  //- Disallow default bitwise copy construction
84  snapParameters(const snapParameters&) = delete;
85 
86 
87  // Member Functions
88 
89  // Access
90 
91  //- Number of patch smoothing iterations before finding
92  // correspondence to surface
93  label nSmoothPatch() const
94  {
95  return nSmoothPatch_;
96  }
97 
98  //- Relative distance for points to be attracted by surface
99  // feature point
100  // or edge. True distance is this factor times local
101  // maximum edge length.
102  scalar snapTol() const
103  {
104  return snapTol_;
105  }
106 
107  //- Number of mesh displacement smoothing iterations.
108  label nSmoothDispl() const
109  {
110  return nSmoothDispl_;
111  }
112 
113  //- Maximum number of snapping relaxation iterations. Should stop
114  // before upon reaching a correct mesh.
115  label nSnap() const
116  {
117  return nSnap_;
118  }
119 
120  label nFeatureSnap() const
121  {
122  return nFeatureSnap_;
123  }
124 
126  {
127  return explicitFeatureSnap_;
128  }
129 
131  {
132  return implicitFeatureSnap_;
133  }
134 
136  {
137  return multiRegionFeatureSnap_;
138  }
139 
141  {
142  return detectNearSurfacesSnap_;
143  }
144 
145 
146  // Member Operators
147 
148  //- Disallow default bitwise assignment
149  void operator=(const snapParameters&) = delete;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:61
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Simple container to keep together snap specific information.
label nSmoothDispl() const
Number of mesh displacement smoothing iterations.
snapParameters(const dictionary &dict)
Construct from dictionary.
Switch explicitFeatureSnap() const
scalar snapTol() const
Relative distance for points to be attracted by surface.
void operator=(const snapParameters &)=delete
Disallow default bitwise assignment.
label nSnap() const
Maximum number of snapping relaxation iterations. Should stop.
label nSmoothPatch() const
Number of patch smoothing iterations before finding.
label nFeatureSnap() const
Switch implicitFeatureSnap() const
Switch detectNearSurfacesSnap() const
Switch multiRegionFeatureSnap() const
Namespace for OpenFOAM.
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
dictionary dict