ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / mesh / autoMesh / autoHexMesh / autoHexMeshDriver / refinementParameters / refinementParameters.H
blob66867e7f555315ea8acb8ae7bda833cf457ef580
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     Foam::refinementParameters
27 Description
28     Simple container to keep together refinement specific information.
30 SourceFiles
31     refinementParameters.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef refinementParameters_H
36 #define refinementParameters_H
38 #include "dictionary.H"
39 #include "pointField.H"
40 #include "Switch.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Class forward declarations
48 class polyMesh;
50 /*---------------------------------------------------------------------------*\
51                            Class refinementParameters Declaration
52 \*---------------------------------------------------------------------------*/
54 class refinementParameters
56     // Private data
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_;
67         //- Curvature
68         scalar curvature_;
70         //- Number of layers between different refinement levels
71         const label nBufferLayers_;
73         //- Areas to keep
74         const pointField keepPoints_;
76         //- FaceZone faces allowed which have owner and neighbour in same
77         //  cellZone?
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&);
93 public:
95     // Constructors
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);
104     // Member Functions
106         // Access
108             //- Total number of cells
109             label maxGlobalCells() const
110             {
111                 return maxGlobalCells_;
112             }
114             //- Per processor max number of cells
115             label maxLocalCells() const
116             {
117                 return maxLocalCells_;
118             }
120             //- When to stop refining
121             label minRefineCells() const
122             {
123                 return minRefineCells_;
124             }
126             //- Curvature
127             scalar curvature() const
128             {
129                 return curvature_;
130             }
132             //- Number of layers between different refinement levels
133             label nBufferLayers() const
134             {
135                 return nBufferLayers_;
136             }
138             //- Areas to keep
139             const pointField& keepPoints() const
140             {
141                 return keepPoints_;
142             }
144             //- Are zone faces allowed only inbetween different cell zones
145             //  or also just free standing?
146             bool allowFreeStandingZoneFaces() const
147             {
148                 return allowFreeStandingZoneFaces_;
149             }
151             //- Allowed load unbalance
152             scalar maxLoadUnbalance() const
153             {
154                 return maxLoadUnbalance_;
155             }
158         // Other
160             //- Checks that cells are in mesh. Returns cells they are in.
161             labelList findCells(const polyMesh&) const;
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 } // End namespace Foam
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 #endif
174 // ************************************************************************* //