initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / autoMesh / autoHexMesh / autoHexMeshDriver / refinementParameters / refinementParameters.H
blob1e12dd30a943c74f5087617a83c3a90b4c1621c1
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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 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
19     for more details.
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
25 Class
26     Foam::refinementParameters
28 Description
29     Simple container to keep together refinement specific information.
31 SourceFiles
32     refinementParameters.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef refinementParameters_H
37 #define refinementParameters_H
39 #include "dictionary.H"
40 #include "pointField.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_;
77     // Private Member Functions
79         //- Disallow default bitwise copy construct
80         refinementParameters(const refinementParameters&);
82         //- Disallow default bitwise assignment
83         void operator=(const refinementParameters&);
86 public:
88     // Constructors
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);
97     // Member Functions
99         // Access
101             //- Total number of cells
102             label maxGlobalCells() const
103             {
104                 return maxGlobalCells_;
105             }
107             //- Per processor max number of cells
108             label maxLocalCells() const
109             {
110                 return maxLocalCells_;
111             }
113             //- When to stop refining
114             label minRefineCells() const
115             {
116                 return minRefineCells_;
117             }
119             //- Curvature
120             scalar curvature() const
121             {
122                 return curvature_;
123             }
125             //- Number of layers between different refinement levels
126             label nBufferLayers() const
127             {
128                 return nBufferLayers_;
129             }
131             //- Areas to keep
132             const pointField& keepPoints() const
133             {
134                 return keepPoints_;
135             }
138         // Other
140             //- Checks that cells are in mesh. Returns cells they are in.
141             labelList findCells(const polyMesh&) const;
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 } // End namespace Foam
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 #endif
154 // ************************************************************************* //