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::autoRefineDriver
32 \*---------------------------------------------------------------------------*/
34 #ifndef autoRefineDriver_H
35 #define autoRefineDriver_H
37 #include "treeBoundBox.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 // Forward declaration of classes
45 class refinementParameters;
47 class decompositionMethod;
48 class fvMeshDistribute;
50 /*---------------------------------------------------------------------------*\
51 Class autoRefineDriver Declaration
52 \*---------------------------------------------------------------------------*/
54 class autoRefineDriver
59 meshRefinement& meshRefiner_;
61 //- Reference to decomposition method
62 decompositionMethod& decomposer_;
64 //- Reference to mesh distribution engine
65 fvMeshDistribute& distributor_;
67 //- From surface region to patch
68 const labelList globalToPatch_;
71 // Private Member Functions
73 //- Refine all cells pierced by explicit feature edges
74 label featureEdgeRefine
76 const refinementParameters& refineParams,
81 //- Refine all cells interacting with the surface
82 label surfaceOnlyRefine
84 const refinementParameters& refineParams,
88 //- Remove all cells within intersected region
89 void removeInsideCells
91 const refinementParameters& refineParams,
92 const label nBufferLayers
95 //- Remove all cells inside/outside shell
98 const refinementParameters& refineParams,
102 //- Add baffles and remove unreachable cells
103 void baffleAndSplitMesh
105 const refinementParameters& refineParams,
106 const bool handleSnapProblems,
107 const dictionary& motionDict
111 void zonify(const refinementParameters& refineParams);
113 void splitAndMergeBaffles
115 const refinementParameters& refineParams,
116 const bool handleSnapProblems,
117 const dictionary& motionDict
120 //- Merge refined boundary faces (from exposing coarser cell)
123 const refinementParameters& refineParams,
124 const dictionary& motionDict
128 //- Disallow default bitwise copy construct
129 autoRefineDriver(const autoRefineDriver&);
131 //- Disallow default bitwise assignment
132 void operator=(const autoRefineDriver&);
137 //- Runtime type information
138 ClassName("autoRefineDriver");
143 //- Construct from components
146 meshRefinement& meshRefiner,
147 decompositionMethod& decomposer,
148 fvMeshDistribute& distributor,
149 const labelList& globalToPatch
155 //- Do all the refinement
158 const dictionary& refineDict,
159 const refinementParameters& refineParams,
160 const bool prepareForSnapping,
161 const dictionary& motionDict
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 } // End namespace Foam
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 // ************************************************************************* //