00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::snapParameters 00026 00027 Description 00028 Simple container to keep together snap specific information. 00029 00030 SourceFiles 00031 snapParameters.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef snapParameters_H 00036 #define snapParameters_H 00037 00038 #include <OpenFOAM/dictionary.H> 00039 #include <OpenFOAM/scalar.H> 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 // Class forward declarations 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class snapParameters Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class snapParameters 00053 { 00054 // Private data 00055 00056 const label nSmoothPatch_; 00057 00058 const scalar snapTol_; 00059 00060 const label nSmoothDispl_; 00061 00062 const label nSnap_; 00063 00064 00065 // Private Member Functions 00066 00067 //- Disallow default bitwise copy construct 00068 snapParameters(const snapParameters&); 00069 00070 //- Disallow default bitwise assignment 00071 void operator=(const snapParameters&); 00072 00073 00074 public: 00075 00076 // Constructors 00077 00078 //- Construct from dictionary - old syntax 00079 snapParameters(const dictionary& dict, const label dummy); 00080 00081 //- Construct from dictionary - new syntax 00082 snapParameters(const dictionary& dict); 00083 00084 00085 // Member Functions 00086 00087 // Access 00088 00089 //- Number of patch smoothing iterations before finding 00090 // correspondence to surface 00091 label nSmoothPatch() const 00092 { 00093 return nSmoothPatch_; 00094 } 00095 00096 //- Relative distance for points to be attracted by surface 00097 // feature point 00098 // or edge. True distance is this factor times local 00099 // maximum edge length. 00100 scalar snapTol() const 00101 { 00102 return snapTol_; 00103 } 00104 00105 //- Number of mesh displacement smoothing iterations. 00106 label nSmoothDispl() const 00107 { 00108 return nSmoothDispl_; 00109 } 00110 00111 //- Maximum number of snapping relaxation iterations. Should stop 00112 // before upon reaching a correct mesh. 00113 label nSnap() const 00114 { 00115 return nSnap_; 00116 } 00117 }; 00118 00119 00120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00121 00122 } // End namespace Foam 00123 00124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00125 00126 #endif 00127 00128 // ************************ vim: set sw=4 sts=4 et: ************************ //