FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

refinementParameters.H

Go 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-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::refinementParameters
00026 
00027 Description
00028     Simple container to keep together refinement specific information.
00029 
00030 SourceFiles
00031     refinementParameters.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef refinementParameters_H
00036 #define refinementParameters_H
00037 
00038 #include <OpenFOAM/dictionary.H>
00039 #include <OpenFOAM/pointField.H>
00040 #include <OpenFOAM/Switch.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         //- FaceZone faces allowed which have owner and neighbour in same
00077         //  cellZone?
00078         Switch allowFreeStandingZoneFaces_;
00079 
00080         //- Allowed load unbalance
00081         scalar maxLoadUnbalance_;
00082 
00083 
00084     // Private Member Functions
00085 
00086         //- Disallow default bitwise copy construct
00087         refinementParameters(const refinementParameters&);
00088 
00089         //- Disallow default bitwise assignment
00090         void operator=(const refinementParameters&);
00091 
00092 
00093 public:
00094 
00095     // Constructors
00096 
00097         //- Construct from dictionary - old syntax
00098         refinementParameters(const dictionary& dict, const label dummy);
00099 
00100         //- Construct from dictionary - new syntax
00101         refinementParameters(const dictionary& dict);
00102 
00103 
00104     // Member Functions
00105 
00106         // Access
00107 
00108             //- Total number of cells
00109             label maxGlobalCells() const
00110             {
00111                 return maxGlobalCells_;
00112             }
00113 
00114             //- Per processor max number of cells
00115             label maxLocalCells() const
00116             {
00117                 return maxLocalCells_;
00118             }
00119 
00120             //- When to stop refining
00121             label minRefineCells() const
00122             {
00123                 return minRefineCells_;
00124             }
00125 
00126             //- Curvature
00127             scalar curvature() const
00128             {
00129                 return curvature_;
00130             }
00131 
00132             //- Number of layers between different refinement levels
00133             label nBufferLayers() const
00134             {
00135                 return nBufferLayers_;
00136             }
00137 
00138             //- Areas to keep
00139             const pointField& keepPoints() const
00140             {
00141                 return keepPoints_;
00142             }
00143 
00144             //- Are zone faces allowed only inbetween different cell zones
00145             //  or also just free standing?
00146             bool allowFreeStandingZoneFaces() const
00147             {
00148                 return allowFreeStandingZoneFaces_;
00149             }
00150 
00151             //- Allowed load unbalance
00152             scalar maxLoadUnbalance() const
00153             {
00154                 return maxLoadUnbalance_;
00155             }
00156 
00157 
00158         // Other
00159 
00160             //- Checks that cells are in mesh. Returns cells they are in.
00161             labelList findCells(const polyMesh&) const;
00162 
00163 };
00164 
00165 
00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00167 
00168 } // End namespace Foam
00169 
00170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00171 
00172 #endif
00173 
00174 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines