OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

autoRefineDriver.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*----------------------------------------------------------------------------*/
00026 
00027 #include "autoRefineDriver.H"
00028 #include "meshRefinement.H"
00029 #include "fvMesh.H"
00030 #include "Time.H"
00031 #include "boundBox.H"
00032 #include "mapDistributePolyMesh.H"
00033 #include "cellSet.H"
00034 #include "syncTools.H"
00035 #include "refinementParameters.H"
00036 #include "featureEdgeMesh.H"
00037 #include "refinementSurfaces.H"
00038 #include "shellSurfaces.H"
00039 
00040 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 defineTypeNameAndDebug(autoRefineDriver, 0);
00046 
00047 } // End namespace Foam
00048 
00049 
00050 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
00051 
00052 // Read explicit feature edges
00053 Foam::label Foam::autoRefineDriver::readFeatureEdges
00054 (
00055     const PtrList<dictionary>& featDicts,
00056     PtrList<featureEdgeMesh>& featureMeshes,
00057     labelList& featureLevels
00058 ) const
00059 {
00060     Info<< "Reading external feature lines." << endl;
00061 
00062     const fvMesh& mesh = meshRefiner_.mesh();
00063 
00064     featureMeshes.setSize(featDicts.size());
00065     featureLevels.setSize(featDicts.size());
00066 
00067     forAll(featDicts, i)
00068     {
00069         const dictionary& dict = featDicts[i];
00070 
00071         fileName featFileName(dict.lookup("file"));
00072 
00073         featureMeshes.set
00074         (
00075             i,
00076             new featureEdgeMesh
00077             (
00078                 IOobject
00079                 (
00080                     featFileName,                       // name
00081                     mesh.time().findInstance("triSurface", featFileName),
00082                                                         // instance
00083                     "triSurface",                       // local
00084                     mesh.time(),                        // registry
00085                     IOobject::MUST_READ,
00086                     IOobject::NO_WRITE,
00087                     false
00088                 )
00089             )
00090         );
00091 
00092         featureMeshes[i].mergePoints(meshRefiner_.mergeDistance());
00093         featureLevels[i] = readLabel(dict.lookup("level"));
00094 
00095         Info<< "Refinement level " << featureLevels[i]
00096             << " for all cells crossed by feature " << featFileName
00097             << " (" << featureMeshes[i].points().size() << " points, "
00098             << featureMeshes[i].edges().size() << " edges)." << endl;
00099     }
00100 
00101     Info<< "Read feature lines in = "
00102         << mesh.time().cpuTimeIncrement() << " s" << nl << endl;
00103 
00104     return featureMeshes.size();
00105 }
00106 
00107 
00108 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00109 
00110 // Construct from components
00111 Foam::autoRefineDriver::autoRefineDriver
00112 (
00113     meshRefinement& meshRefiner,
00114     decompositionMethod& decomposer,
00115     fvMeshDistribute& distributor,
00116     const labelList& globalToPatch
00117 )
00118 :
00119     meshRefiner_(meshRefiner),
00120     decomposer_(decomposer),
00121     distributor_(distributor),
00122     globalToPatch_(globalToPatch)
00123 {}
00124 
00125 
00126 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00127 
00128 Foam::label Foam::autoRefineDriver::featureEdgeRefine
00129 (
00130     const refinementParameters& refineParams,
00131     const PtrList<dictionary>& featDicts,
00132     const label maxIter,
00133     const label minRefine
00134 )
00135 {
00136     const fvMesh& mesh = meshRefiner_.mesh();
00137 
00138     // Read explicit feature edges
00139     PtrList<featureEdgeMesh> featureMeshes;
00140     // Per feature the refinement level
00141     labelList featureLevels;
00142     readFeatureEdges(featDicts, featureMeshes, featureLevels);
00143 
00144 
00145     label iter = 0;
00146 
00147     if (featureMeshes.size() && maxIter > 0)
00148     {
00149         for (; iter < maxIter; iter++)
00150         {
00151             Info<< nl
00152                 << "Feature refinement iteration " << iter << nl
00153                 << "------------------------------" << nl
00154                 << endl;
00155 
00156             labelList candidateCells
00157             (
00158                 meshRefiner_.refineCandidates
00159                 (
00160                     refineParams.keepPoints()[0],    // For now only use one.
00161                     refineParams.curvature(),
00162 
00163                     featureMeshes,
00164                     featureLevels,
00165 
00166                     true,               // featureRefinement
00167                     false,              // internalRefinement
00168                     false,              // surfaceRefinement
00169                     false,              // curvatureRefinement
00170                     refineParams.maxGlobalCells(),
00171                     refineParams.maxLocalCells()
00172                 )
00173             );
00174             labelList cellsToRefine
00175             (
00176                 meshRefiner_.meshCutter().consistentRefinement
00177                 (
00178                     candidateCells,
00179                     true
00180                 )
00181             );
00182             Info<< "Determined cells to refine in = "
00183                 << mesh.time().cpuTimeIncrement() << " s" << endl;
00184 
00185 
00186 
00187             label nCellsToRefine = cellsToRefine.size();
00188             reduce(nCellsToRefine, sumOp<label>());
00189 
00190             Info<< "Selected for feature refinement : " << nCellsToRefine
00191                 << " cells (out of " << mesh.globalData().nTotalCells()
00192                 << ')' << endl;
00193 
00194             if (nCellsToRefine <= minRefine)
00195             {
00196                 Info<< "Stopping refining since too few cells selected."
00197                     << nl << endl;
00198                 break;
00199             }
00200 
00201 
00202             if (debug > 0)
00203             {
00204                 const_cast<Time&>(mesh.time())++;
00205             }
00206 
00207             meshRefiner_.refineAndBalance
00208             (
00209                 "feature refinement iteration " + name(iter),
00210                 decomposer_,
00211                 distributor_,
00212                 cellsToRefine
00213             );
00214         }
00215     }
00216     return iter;
00217 }
00218 
00219 
00220 Foam::label Foam::autoRefineDriver::surfaceOnlyRefine
00221 (
00222     const refinementParameters& refineParams,
00223     const label maxIter
00224 )
00225 {
00226     const fvMesh& mesh = meshRefiner_.mesh();
00227 
00228     // Determine the maximum refinement level over all surfaces. This
00229     // determines the minumum number of surface refinement iterations.
00230     label overallMaxLevel = max(meshRefiner_.surfaces().maxLevel());
00231 
00232     label iter;
00233     for (iter = 0; iter < maxIter; iter++)
00234     {
00235         Info<< nl
00236             << "Surface refinement iteration " << iter << nl
00237             << "------------------------------" << nl
00238             << endl;
00239 
00240 
00241         // Determine cells to refine
00242         // ~~~~~~~~~~~~~~~~~~~~~~~~~
00243         // Only look at surface intersections (minLevel and surface curvature),
00244         // do not do internal refinement (refinementShells)
00245 
00246         const PtrList<featureEdgeMesh> dummyFeatures;
00247 
00248         labelList candidateCells
00249         (
00250             meshRefiner_.refineCandidates
00251             (
00252                 refineParams.keepPoints()[0],
00253                 refineParams.curvature(),
00254 
00255                 dummyFeatures,      // dummy featureMeshes;
00256                 labelList(0),       // dummy featureLevels;
00257 
00258                 false,              // featureRefinement
00259                 false,              // internalRefinement
00260                 true,               // surfaceRefinement
00261                 true,               // curvatureRefinement
00262                 refineParams.maxGlobalCells(),
00263                 refineParams.maxLocalCells()
00264             )
00265         );
00266         labelList cellsToRefine
00267         (
00268             meshRefiner_.meshCutter().consistentRefinement
00269             (
00270                 candidateCells,
00271                 true
00272             )
00273         );
00274         Info<< "Determined cells to refine in = "
00275             << mesh.time().cpuTimeIncrement() << " s" << endl;
00276 
00277 
00278         label nCellsToRefine = cellsToRefine.size();
00279         reduce(nCellsToRefine, sumOp<label>());
00280 
00281         Info<< "Selected for refinement : " << nCellsToRefine
00282             << " cells (out of " << mesh.globalData().nTotalCells()
00283             << ')' << endl;
00284 
00285         // Stop when no cells to refine or have done minimum nessecary
00286         // iterations and not enough cells to refine.
00287         if
00288         (
00289             nCellsToRefine == 0
00290          || (
00291                 iter >= overallMaxLevel
00292              && nCellsToRefine <= refineParams.minRefineCells()
00293             )
00294         )
00295         {
00296             Info<< "Stopping refining since too few cells selected."
00297                 << nl << endl;
00298             break;
00299         }
00300 
00301 
00302         if (debug)
00303         {
00304             const_cast<Time&>(mesh.time())++;
00305         }
00306 
00307         meshRefiner_.refineAndBalance
00308         (
00309             "surface refinement iteration " + name(iter),
00310             decomposer_,
00311             distributor_,
00312             cellsToRefine
00313         );
00314     }
00315     return iter;
00316 }
00317 
00318 
00319 void Foam::autoRefineDriver::removeInsideCells
00320 (
00321     const refinementParameters& refineParams,
00322     const label nBufferLayers
00323 )
00324 {
00325     Info<< nl
00326         << "Removing mesh beyond surface intersections" << nl
00327         << "------------------------------------------" << nl
00328         << endl;
00329 
00330     const fvMesh& mesh = meshRefiner_.mesh();
00331 
00332     if (debug)
00333     {
00334        const_cast<Time&>(mesh.time())++;
00335     }
00336 
00337     meshRefiner_.splitMesh
00338     (
00339         nBufferLayers,                  // nBufferLayers
00340         globalToPatch_,
00341         refineParams.keepPoints()[0]
00342     );
00343 
00344     if (debug)
00345     {
00346         Pout<< "Writing subsetted mesh to time "
00347             << meshRefiner_.timeName() << '.' << endl;
00348         meshRefiner_.write(debug, mesh.time().path()/meshRefiner_.timeName());
00349         Pout<< "Dumped mesh in = "
00350             << mesh.time().cpuTimeIncrement() << " s\n" << nl << endl;
00351     }
00352 }
00353 
00354 
00355 Foam::label Foam::autoRefineDriver::shellRefine
00356 (
00357     const refinementParameters& refineParams,
00358     const label maxIter
00359 )
00360 {
00361     const fvMesh& mesh = meshRefiner_.mesh();
00362 
00363     // Mark current boundary faces with 0. Have meshRefiner maintain them.
00364     meshRefiner_.userFaceData().setSize(1);
00365 
00366     // mark list to remove any refined faces
00367     meshRefiner_.userFaceData()[0].first() = meshRefinement::REMOVE;
00368     meshRefiner_.userFaceData()[0].second() = createWithValues<labelList>
00369     (
00370         mesh.nFaces(),
00371         -1,
00372         meshRefiner_.intersectedFaces(),
00373         0
00374     );
00375 
00376     // Determine the maximum refinement level over all volume refinement
00377     // regions. This determines the minumum number of shell refinement
00378     // iterations.
00379     label overallMaxShellLevel = meshRefiner_.shells().maxLevel();
00380 
00381     label iter;
00382     for (iter = 0; iter < maxIter; iter++)
00383     {
00384         Info<< nl
00385             << "Shell refinement iteration " << iter << nl
00386             << "----------------------------" << nl
00387             << endl;
00388 
00389         const PtrList<featureEdgeMesh> dummyFeatures;
00390 
00391         labelList candidateCells
00392         (
00393             meshRefiner_.refineCandidates
00394             (
00395                 refineParams.keepPoints()[0],
00396                 refineParams.curvature(),
00397 
00398                 dummyFeatures,      // dummy featureMeshes;
00399                 labelList(0),       // dummy featureLevels;
00400 
00401                 false,              // featureRefinement
00402                 true,               // internalRefinement
00403                 false,              // surfaceRefinement
00404                 false,              // curvatureRefinement
00405                 refineParams.maxGlobalCells(),
00406                 refineParams.maxLocalCells()
00407             )
00408         );
00409 
00410         if (debug)
00411         {
00412             Pout<< "Dumping " << candidateCells.size()
00413                 << " cells to cellSet candidateCellsFromShells." << endl;
00414 
00415             cellSet(mesh, "candidateCellsFromShells", candidateCells).write();
00416         }
00417 
00418         // Problem choosing starting faces for bufferlayers (bFaces)
00419         //  - we can't use the current intersected boundary faces
00420         //    (intersectedFaces) since this grows indefinitely
00421         //  - if we use 0 faces we don't satisfy bufferLayers from the
00422         //    surface.
00423         //  - possibly we want to have bFaces only the initial set of faces
00424         //    and maintain the list while doing the refinement.
00425         labelList bFaces
00426         (
00427             findIndices(meshRefiner_.userFaceData()[0].second(), 0)
00428         );
00429 
00430         //Info<< "Collected boundary faces : "
00431         //    << returnReduce(bFaces.size(), sumOp<label>()) << endl;
00432 
00433         labelList cellsToRefine;
00434 
00435         if (refineParams.nBufferLayers() <= 2)
00436         {
00437             cellsToRefine = meshRefiner_.meshCutter().consistentSlowRefinement
00438             (
00439                 refineParams.nBufferLayers(),
00440                 candidateCells,                     // cells to refine
00441                 bFaces,                             // faces for nBufferLayers
00442                 1,                                  // point difference
00443                 meshRefiner_.intersectedPoints()    // points to check
00444             );
00445         }
00446         else
00447         {
00448             cellsToRefine = meshRefiner_.meshCutter().consistentSlowRefinement2
00449             (
00450                 refineParams.nBufferLayers(),
00451                 candidateCells,                 // cells to refine
00452                 bFaces                          // faces for nBufferLayers
00453             );
00454         }
00455 
00456         Info<< "Determined cells to refine in = "
00457             << mesh.time().cpuTimeIncrement() << " s" << endl;
00458 
00459 
00460         label nCellsToRefine = cellsToRefine.size();
00461         reduce(nCellsToRefine, sumOp<label>());
00462 
00463         Info<< "Selected for internal refinement : " << nCellsToRefine
00464             << " cells (out of " << mesh.globalData().nTotalCells()
00465             << ')' << endl;
00466 
00467         // Stop when no cells to refine or have done minimum nessecary
00468         // iterations and not enough cells to refine.
00469         if
00470         (
00471             nCellsToRefine == 0
00472          || (
00473                 iter >= overallMaxShellLevel
00474              && nCellsToRefine <= refineParams.minRefineCells()
00475             )
00476         )
00477         {
00478             Info<< "Stopping refining since too few cells selected."
00479                 << nl << endl;
00480             break;
00481         }
00482 
00483 
00484         if (debug)
00485         {
00486             const_cast<Time&>(mesh.time())++;
00487         }
00488 
00489         meshRefiner_.refineAndBalance
00490         (
00491             "shell refinement iteration " + name(iter),
00492             decomposer_,
00493             distributor_,
00494             cellsToRefine
00495         );
00496     }
00497     meshRefiner_.userFaceData().clear();
00498 
00499     return iter;
00500 }
00501 
00502 
00503 void Foam::autoRefineDriver::baffleAndSplitMesh
00504 (
00505     const refinementParameters& refineParams,
00506     const bool handleSnapProblems,
00507     const dictionary& motionDict
00508 )
00509 {
00510     Info<< nl
00511         << "Splitting mesh at surface intersections" << nl
00512         << "---------------------------------------" << nl
00513         << endl;
00514 
00515     const fvMesh& mesh = meshRefiner_.mesh();
00516 
00517     // Introduce baffles at surface intersections. Note:
00518     // meshRefiment::surfaceIndex() will
00519     // be like boundary face from now on so not coupled anymore.
00520     meshRefiner_.baffleAndSplitMesh
00521     (
00522         handleSnapProblems,             // detect&remove potential snap problem
00523         false,                          // perpendicular edge connected cells
00524         scalarField(0),                 // per region perpendicular angle
00525         !handleSnapProblems,            // merge free standing baffles?
00526         motionDict,
00527         const_cast<Time&>(mesh.time()),
00528         globalToPatch_,
00529         refineParams.keepPoints()[0]
00530     );
00531 }
00532 
00533 
00534 void Foam::autoRefineDriver::zonify
00535 (
00536     const refinementParameters& refineParams
00537 )
00538 {
00539     // Mesh is at its finest. Do zoning
00540     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00541     // This puts all faces with intersection across a zoneable surface
00542     // into that surface's faceZone. All cells inside faceZone get given the
00543     // same cellZone.
00544 
00545     if (meshRefiner_.surfaces().getNamedSurfaces().size())
00546     {
00547         Info<< nl
00548             << "Introducing zones for interfaces" << nl
00549             << "--------------------------------" << nl
00550             << endl;
00551 
00552         const fvMesh& mesh = meshRefiner_.mesh();
00553 
00554         if (debug)
00555         {
00556             const_cast<Time&>(mesh.time())++;
00557         }
00558 
00559         meshRefiner_.zonify(refineParams.keepPoints()[0]);
00560 
00561         if (debug)
00562         {
00563             Pout<< "Writing zoned mesh to time "
00564                 << meshRefiner_.timeName() << '.' << endl;
00565             meshRefiner_.write
00566             (
00567                 debug,
00568                 mesh.time().path()/meshRefiner_.timeName()
00569             );
00570         }
00571 
00572         // Check that all faces are synced
00573         meshRefinement::checkCoupledFaceZones(mesh);
00574     }
00575 }
00576 
00577 
00578 void Foam::autoRefineDriver::splitAndMergeBaffles
00579 (
00580     const refinementParameters& refineParams,
00581     const bool handleSnapProblems,
00582     const dictionary& motionDict
00583 )
00584 {
00585     Info<< nl
00586         << "Handling cells with snap problems" << nl
00587         << "---------------------------------" << nl
00588         << endl;
00589 
00590     const fvMesh& mesh = meshRefiner_.mesh();
00591 
00592     // Introduce baffles and split mesh
00593     if (debug)
00594     {
00595         const_cast<Time&>(mesh.time())++;
00596     }
00597 
00598     const scalarField& perpAngle = meshRefiner_.surfaces().perpendicularAngle();
00599 
00600     meshRefiner_.baffleAndSplitMesh
00601     (
00602         handleSnapProblems,
00603         handleSnapProblems,                 // remove perp edge connected cells
00604         perpAngle,                          // perp angle
00605         false,                              // merge free standing baffles?
00606         motionDict,
00607         const_cast<Time&>(mesh.time()),
00608         globalToPatch_,
00609         refineParams.keepPoints()[0]
00610     );
00611 
00612     if (debug)
00613     {
00614         const_cast<Time&>(mesh.time())++;
00615     }
00616 
00617     // Duplicate points on baffles that are on more than one cell
00618     // region. This will help snapping pull them to separate surfaces.
00619     meshRefiner_.dupNonManifoldPoints();
00620 
00621 
00622     // Merge all baffles that are still remaining after duplicating points.
00623     List<labelPair> couples
00624     (
00625         meshRefiner_.getDuplicateFaces   // get all baffles
00626         (
00627             identity(mesh.nFaces()-mesh.nInternalFaces())
00628           + mesh.nInternalFaces()
00629         )
00630     );
00631 
00632     label nCouples = returnReduce(couples.size(), sumOp<label>());
00633 
00634     Info<< "Detected unsplittable baffles : "
00635         << nCouples << endl;
00636 
00637     if (nCouples > 0)
00638     {
00639         // Actually merge baffles. Note: not exactly parallellized. Should
00640         // convert baffle faces into processor faces if they resulted
00641         // from them.
00642         meshRefiner_.mergeBaffles(couples);
00643 
00644         if (debug)
00645         {
00646             // Debug:test all is still synced across proc patches
00647             meshRefiner_.checkData();
00648         }
00649         Info<< "Merged free-standing baffles in = "
00650             << mesh.time().cpuTimeIncrement() << " s." << endl;
00651     }
00652 
00653     if (debug)
00654     {
00655         Pout<< "Writing handleProblemCells mesh to time "
00656             << meshRefiner_.timeName() << '.' << endl;
00657         meshRefiner_.write(debug, mesh.time().path()/meshRefiner_.timeName());
00658     }
00659 }
00660 
00661 
00662 void Foam::autoRefineDriver::mergePatchFaces
00663 (
00664     const refinementParameters& refineParams
00665 )
00666 {
00667     const fvMesh& mesh = meshRefiner_.mesh();
00668 
00669     Info<< nl
00670         << "Merge refined boundary faces" << nl
00671         << "----------------------------" << nl
00672         << endl;
00673 
00674     if (debug)
00675     {
00676         const_cast<Time&>(mesh.time())++;
00677     }
00678 
00679     meshRefiner_.mergePatchFaces
00680     (
00681         Foam::cos(45*mathematicalConstant::pi/180.0),
00682         Foam::cos(45*mathematicalConstant::pi/180.0),
00683         meshRefiner_.meshedPatches()
00684     );
00685 
00686     if (debug)
00687     {
00688         meshRefiner_.checkData();
00689     }
00690 
00691     meshRefiner_.mergeEdges(Foam::cos(45*mathematicalConstant::pi/180.0));
00692 
00693     if (debug)
00694     {
00695         meshRefiner_.checkData();
00696     }
00697 }
00698 
00699 
00700 void Foam::autoRefineDriver::doRefine
00701 (
00702     const dictionary& refineDict,
00703     const refinementParameters& refineParams,
00704     const bool prepareForSnapping,
00705     const dictionary& motionDict
00706 )
00707 {
00708     Info<< nl
00709         << "Refinement phase" << nl
00710         << "----------------" << nl
00711         << endl;
00712 
00713     const fvMesh& mesh = meshRefiner_.mesh();
00714 
00715     // Check that all the keep points are inside the mesh.
00716     refineParams.findCells(mesh);
00717 
00718     PtrList<dictionary> featDicts(refineDict.lookup("features"));
00719 
00720     // Refine around feature edges
00721     featureEdgeRefine
00722     (
00723         refineParams,
00724         featDicts,
00725         100,    // maxIter
00726         0       // min cells to refine
00727     );
00728 
00729     // Refine based on surface
00730     surfaceOnlyRefine
00731     (
00732         refineParams,
00733         100     // maxIter
00734     );
00735 
00736     // Remove cells (a certain distance) beyond surface intersections
00737     removeInsideCells
00738     (
00739         refineParams,
00740         1       // nBufferLayers
00741     );
00742 
00743     // Internal mesh refinement
00744     shellRefine
00745     (
00746         refineParams,
00747         100    // maxIter
00748     );
00749 
00750     // Introduce baffles at surface intersections
00751     baffleAndSplitMesh(refineParams, prepareForSnapping, motionDict);
00752 
00753     // Mesh is at its finest. Do optional zoning.
00754     zonify(refineParams);
00755 
00756     // Pull baffles apart
00757     splitAndMergeBaffles(refineParams, prepareForSnapping, motionDict);
00758 
00759     // Do something about cells with refined faces on the boundary
00760     if (prepareForSnapping)
00761     {
00762         mergePatchFaces(refineParams);
00763     }
00764 
00765 
00766     if (Pstream::parRun())
00767     {
00768         Info<< nl
00769             << "Doing final balancing" << nl
00770             << "---------------------" << nl
00771             << endl;
00772 
00773         if (debug)
00774         {
00775             const_cast<Time&>(mesh.time())++;
00776         }
00777 
00778         // Do final balancing. Keep zoned faces on one processor.
00779         meshRefiner_.balance
00780         (
00781             true,
00782             false,
00783             decomposer_,
00784             distributor_
00785         );
00786     }
00787 }
00788 
00789 
00790 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd