1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::refinementParameters
28 Simple container to keep together refinement specific information.
31 refinementParameters.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef refinementParameters_H
36 #define refinementParameters_H
38 #include "dictionary.H"
39 #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_;
76 //- FaceZone faces allowed which have owner and neighbour in same
78 Switch allowFreeStandingZoneFaces_;
80 //- Allowed load unbalance
81 scalar maxLoadUnbalance_;
84 // Private Member Functions
86 //- Disallow default bitwise copy construct
87 refinementParameters(const refinementParameters&);
89 //- Disallow default bitwise assignment
90 void operator=(const refinementParameters&);
97 //- Construct from dictionary - old syntax
98 refinementParameters(const dictionary& dict, const label dummy);
100 //- Construct from dictionary - new syntax
101 refinementParameters(const dictionary& dict);
108 //- Total number of cells
109 label maxGlobalCells() const
111 return maxGlobalCells_;
114 //- Per processor max number of cells
115 label maxLocalCells() const
117 return maxLocalCells_;
120 //- When to stop refining
121 label minRefineCells() const
123 return minRefineCells_;
127 scalar curvature() const
132 //- Number of layers between different refinement levels
133 label nBufferLayers() const
135 return nBufferLayers_;
139 const pointField& keepPoints() const
144 //- Are zone faces allowed only inbetween different cell zones
145 // or also just free standing?
146 bool allowFreeStandingZoneFaces() const
148 return allowFreeStandingZoneFaces_;
151 //- Allowed load unbalance
152 scalar maxLoadUnbalance() const
154 return maxLoadUnbalance_;
160 //- Checks that cells are in mesh. Returns cells they are in.
161 labelList findCells(const polyMesh&) const;
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 } // End namespace Foam
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 // ************************************************************************* //