FreeFOAM The Cross-Platform CFD Toolkit
snapParameters.H
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) 1991-2010 OpenCFD Ltd.
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 <OpenFOAM/dictionary.H>
39 #include <OpenFOAM/scalar.H>
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Class forward declarations
47 
48 /*---------------------------------------------------------------------------*\
49  Class snapParameters Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private data
55 
56  const label nSmoothPatch_;
57 
58  const scalar snapTol_;
59 
60  const label nSmoothDispl_;
61 
62  const label nSnap_;
63 
64 
65  // Private Member Functions
66 
67  //- Disallow default bitwise copy construct
69 
70  //- Disallow default bitwise assignment
71  void operator=(const snapParameters&);
72 
73 
74 public:
75 
76  // Constructors
77 
78  //- Construct from dictionary - old syntax
79  snapParameters(const dictionary& dict, const label dummy);
80 
81  //- Construct from dictionary - new syntax
82  snapParameters(const dictionary& dict);
83 
84 
85  // Member Functions
86 
87  // Access
88 
89  //- Number of patch smoothing iterations before finding
90  // correspondence to surface
91  label nSmoothPatch() const
92  {
93  return nSmoothPatch_;
94  }
95 
96  //- Relative distance for points to be attracted by surface
97  // feature point
98  // or edge. True distance is this factor times local
99  // maximum edge length.
100  scalar snapTol() const
101  {
102  return snapTol_;
103  }
104 
105  //- Number of mesh displacement smoothing iterations.
106  label nSmoothDispl() const
107  {
108  return nSmoothDispl_;
109  }
110 
111  //- Maximum number of snapping relaxation iterations. Should stop
112  // before upon reaching a correct mesh.
113  label nSnap() const
114  {
115  return nSnap_;
116  }
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************ vim: set sw=4 sts=4 et: ************************ //