1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::refinementParameters
29 Simple container to keep together refinement specific information.
32 refinementParameters.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef refinementParameters_H
37 #define refinementParameters_H
39 #include "dictionary.H"
40 #include "pointField.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Class forward declarations
50 /*---------------------------------------------------------------------------*\
51 Class refinementParameters Declaration
52 \*---------------------------------------------------------------------------*/
54 class refinementParameters
58 //- Total number of cells
59 const label maxGlobalCells_;
61 //- Per processor max number of cells
62 const label maxLocalCells_;
64 //- When to stop refining
65 const label minRefineCells_;
70 //- Number of layers between different refinement levels
71 const label nBufferLayers_;
74 const pointField keepPoints_;
77 // Private Member Functions
79 //- Disallow default bitwise copy construct
80 refinementParameters(const refinementParameters&);
82 //- Disallow default bitwise assignment
83 void operator=(const refinementParameters&);
90 //- Construct from dictionary - old syntax
91 refinementParameters(const dictionary& dict, const label dummy);
93 //- Construct from dictionary - new syntax
94 refinementParameters(const dictionary& dict);
101 //- Total number of cells
102 label maxGlobalCells() const
104 return maxGlobalCells_;
107 //- Per processor max number of cells
108 label maxLocalCells() const
110 return maxLocalCells_;
113 //- When to stop refining
114 label minRefineCells() const
116 return minRefineCells_;
120 scalar curvature() const
125 //- Number of layers between different refinement levels
126 label nBufferLayers() const
128 return nBufferLayers_;
132 const pointField& keepPoints() const
140 //- Checks that cells are in mesh. Returns cells they are in.
141 labelList findCells(const polyMesh&) const;
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 // ************************************************************************* //