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::autoRefineDriver
33 \*---------------------------------------------------------------------------*/
35 #ifndef autoRefineDriver_H
36 #define autoRefineDriver_H
38 #include "treeBoundBox.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 // Forward declaration of classes
46 class featureEdgeMesh;
47 class refinementParameters;
49 class decompositionMethod;
50 class fvMeshDistribute;
52 /*---------------------------------------------------------------------------*\
53 Class autoRefineDriver Declaration
54 \*---------------------------------------------------------------------------*/
56 class autoRefineDriver
61 meshRefinement& meshRefiner_;
63 //- Reference to decomposition method
64 decompositionMethod& decomposer_;
66 //- Reference to mesh distribution engine
67 fvMeshDistribute& distributor_;
69 //- From surface region to patch
70 const labelList globalToPatch_;
73 // Private Member Functions
75 //- Read explicit feature edges
76 label readFeatureEdges
78 const PtrList<dictionary>& featDicts,
79 PtrList<featureEdgeMesh>& featureMeshes,
80 labelList& featureLevel
83 //- Refine all cells pierced by explicit feature edges
84 label featureEdgeRefine
86 const refinementParameters& refineParams,
87 const PtrList<dictionary>& featDicts,
92 //- Refine all cells interacting with the surface
93 label surfaceOnlyRefine
95 const refinementParameters& refineParams,
99 //- Remove all cells within intersected region
100 void removeInsideCells
102 const refinementParameters& refineParams,
103 const label nBufferLayers
106 //- Remove all cells inside/outside shell
109 const refinementParameters& refineParams,
113 //- Add baffles and remove unreachable cells
114 void baffleAndSplitMesh
116 const refinementParameters& refineParams,
117 const bool handleSnapProblems,
118 const dictionary& motionDict
122 void zonify(const refinementParameters& refineParams);
124 void splitAndMergeBaffles
126 const refinementParameters& refineParams,
127 const bool handleSnapProblems,
128 const dictionary& motionDict
131 //- Merge refined boundary faces (from exposing coarser cell)
134 const refinementParameters& refineParams
138 //- Disallow default bitwise copy construct
139 autoRefineDriver(const autoRefineDriver&);
141 //- Disallow default bitwise assignment
142 void operator=(const autoRefineDriver&);
147 //- Runtime type information
148 ClassName("autoRefineDriver");
153 //- Construct from components
156 meshRefinement& meshRefiner,
157 decompositionMethod& decomposer,
158 fvMeshDistribute& distributor,
159 const labelList& globalToPatch
165 //- Do all the refinement
168 const dictionary& refineDict,
169 const refinementParameters& refineParams,
170 const bool prepareForSnapping,
171 const dictionary& motionDict
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 } // End namespace Foam
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 // ************************************************************************* //