|
|
|
refinementParameters.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 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 the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 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, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::refinementParameters 00027 00028 Description 00029 Simple container to keep together refinement specific information. 00030 00031 SourceFiles 00032 refinementParameters.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef refinementParameters_H 00037 #define refinementParameters_H 00038 00039 #include "dictionary.H" 00040 #include "pointField.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 // Class forward declarations 00048 class polyMesh; 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class refinementParameters Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class refinementParameters 00055 { 00056 // Private data 00057 00058 //- Total number of cells 00059 const label maxGlobalCells_; 00060 00061 //- Per processor max number of cells 00062 const label maxLocalCells_; 00063 00064 //- When to stop refining 00065 const label minRefineCells_; 00066 00067 //- Curvature 00068 scalar curvature_; 00069 00070 //- Number of layers between different refinement levels 00071 const label nBufferLayers_; 00072 00073 //- Areas to keep 00074 const pointField keepPoints_; 00075 00076 00077 // Private Member Functions 00078 00079 //- Disallow default bitwise copy construct 00080 refinementParameters(const refinementParameters&); 00081 00082 //- Disallow default bitwise assignment 00083 void operator=(const refinementParameters&); 00084 00085 00086 public: 00087 00088 // Constructors 00089 00090 //- Construct from dictionary - old syntax 00091 refinementParameters(const dictionary& dict, const label dummy); 00092 00093 //- Construct from dictionary - new syntax 00094 refinementParameters(const dictionary& dict); 00095 00096 00097 // Member Functions 00098 00099 // Access 00100 00101 //- Total number of cells 00102 label maxGlobalCells() const 00103 { 00104 return maxGlobalCells_; 00105 } 00106 00107 //- Per processor max number of cells 00108 label maxLocalCells() const 00109 { 00110 return maxLocalCells_; 00111 } 00112 00113 //- When to stop refining 00114 label minRefineCells() const 00115 { 00116 return minRefineCells_; 00117 } 00118 00119 //- Curvature 00120 scalar curvature() const 00121 { 00122 return curvature_; 00123 } 00124 00125 //- Number of layers between different refinement levels 00126 label nBufferLayers() const 00127 { 00128 return nBufferLayers_; 00129 } 00130 00131 //- Areas to keep 00132 const pointField& keepPoints() const 00133 { 00134 return keepPoints_; 00135 } 00136 00137 00138 // Other 00139 00140 //- Checks that cells are in mesh. Returns cells they are in. 00141 labelList findCells(const polyMesh&) const; 00142 00143 }; 00144 00145 00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00147 00148 } // End namespace Foam 00149 00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00151 00152 #endif 00153 00154 // ************************************************************************* // |