1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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
29 Encapsulates queries for volume refinement ('refine all cells within
35 \*---------------------------------------------------------------------------*/
37 #ifndef shellSurfaces_H
38 #define shellSurfaces_H
40 #include "searchableSurface.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 class searchableSurfaces;
50 /*---------------------------------------------------------------------------*\
51 Class shellSurfaces Declaration
52 \*---------------------------------------------------------------------------*/
60 //- Volume refinement controls
63 INSIDE, // Refine all inside shell
64 OUTSIDE, // ,, outside
65 DISTANCE // Refine based on distance to shell
73 //- Reference to all geometry.
74 const searchableSurfaces& allGeometry_;
76 //- Indices of surfaces that are shells
79 //- Per shell whether to refine inside or outside
80 List<refineMode> modes_;
82 //- Per shell the list of ranges
83 List<scalarField> distances_;
85 //- Per shell per distance the refinement level
86 labelListList levels_;
92 static const NamedEnum<refineMode, 3> refineModeNames_;
95 // Private Member Functions
97 //- Helper function for initialisation.
98 void setAndCheckLevels
101 const List<Tuple2<scalar, label> >&
108 const pointField& pt,
117 //- Construct from components
120 const searchableSurfaces& allGeometry,
121 const labelList& shells,
122 const List<refineMode>& modes,
123 const List<scalarField>& distances,
124 const labelListList& levels
127 //- Construct from geometry and dictionaries
130 const searchableSurfaces& allGeometry,
131 const PtrList<dictionary>& shellDicts
134 //- Construct from geometry and dictionary
137 const searchableSurfaces& allGeometry,
138 const dictionary& shellsDict
146 //const List<scalarField>& distances() const
148 // return distances_;
151 ////- Per shell per distance the refinement level
152 //const labelListList& levels() const
160 //- Highest shell level
161 label maxLevel() const;
163 //- Find shell level higher than ptLevel
166 const pointField& pt,
167 const labelList& ptLevel,
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 // ************************************************************************* //