From 51b8a7367c03d79b276a55e4b02f616b413c9db2 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 19 Oct 2010 17:40:36 +0100 Subject: [PATCH] ENH: MeshWave: allow 1 cells cases. --- .../utilities/mesh/advanced/selectCells/selectCells.C | 2 +- src/dynamicMesh/meshCut/directions/directions.C | 3 ++- src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C | 4 ++-- .../inverseFaceDistance/inverseFaceDistanceDiffusivity.C | 2 +- src/meshTools/cellClassification/cellClassification.C | 2 +- src/meshTools/cellDist/patchWave/patchDataWave.C | 2 +- src/meshTools/cellDist/patchWave/patchWave.C | 2 +- .../decompositionMethods/structuredDecomp/structuredDecomp.C | 2 +- src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) diff --git a/applications/utilities/mesh/advanced/selectCells/selectCells.C b/applications/utilities/mesh/advanced/selectCells/selectCells.C index a298c4207d..feab5ff4c7 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCells.C +++ b/applications/utilities/mesh/advanced/selectCells/selectCells.C @@ -298,7 +298,7 @@ label selectOutsideCells mesh, outsideFaces.shrink(), outsideFacesInfo.shrink(), - mesh.nCells() // max iterations + mesh.globalData().nTotalCells()+1 // max iterations ); // Now regionCalc should hold info on cells that are reachable from diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index 5f5fb220af..7024c2ffbc 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -32,6 +32,7 @@ License #include "meshTools.H" #include "hexMatcher.H" #include "Switch.H" +#include "globalMeshData.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -206,7 +207,7 @@ Foam::vectorField Foam::directions::propagateDirection mesh, changedFaces, changedFacesInfo, - mesh.nCells() + mesh.globalData().nTotalCells()+1 ); const List& cellInfo = directionCalc.allCellInfo(); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C index 9482861bde..c9919351fc 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C @@ -2332,7 +2332,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement seedFacesInfo.clear(); // Iterate until no change. Now 2:1 face difference should be satisfied - levelCalc.iterate(mesh_.globalData().nTotalFaces()); + levelCalc.iterate(mesh_.globalData().nTotalFaces()+1); // Now check point-connected cells (face-connected cells already ok): @@ -2836,7 +2836,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 seedFacesInfo, allFaceInfo, allCellInfo, - mesh_.globalData().nTotalCells() + mesh_.globalData().nTotalCells()+1 ); diff --git a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C index 72531d5cfd..02db9ad941 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C @@ -115,7 +115,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct() mesh, changedFaces, faceDist, - mesh.globalData().nTotalCells() // max iterations + mesh.globalData().nTotalCells()+1 // max iterations ); const List& faceInfo = waveInfo.allFaceInfo(); diff --git a/src/meshTools/cellClassification/cellClassification.C b/src/meshTools/cellClassification/cellClassification.C index a723665477..daf1de6ac0 100644 --- a/src/meshTools/cellClassification/cellClassification.C +++ b/src/meshTools/cellClassification/cellClassification.C @@ -322,7 +322,7 @@ void Foam::cellClassification::markCells changedFaces, // Labels of changed faces changedFacesInfo, // Information on changed faces cellInfoList, // Information on all cells - mesh_.globalData().nTotalCells() // max iterations + mesh_.globalData().nTotalCells()+1 // max iterations ); // Get information out of cellInfoList diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.C b/src/meshTools/cellDist/patchWave/patchDataWave.C index bb6da1750d..988b8a0be5 100644 --- a/src/meshTools/cellDist/patchWave/patchDataWave.C +++ b/src/meshTools/cellDist/patchWave/patchDataWave.C @@ -225,7 +225,7 @@ void Foam::patchDataWave::correct() mesh(), changedFaces, faceDist, - mesh().globalData().nTotalCells() // max iterations + mesh().globalData().nTotalCells()+1 // max iterations ); diff --git a/src/meshTools/cellDist/patchWave/patchWave.C b/src/meshTools/cellDist/patchWave/patchWave.C index 85118da58d..826430b003 100644 --- a/src/meshTools/cellDist/patchWave/patchWave.C +++ b/src/meshTools/cellDist/patchWave/patchWave.C @@ -186,7 +186,7 @@ void Foam::patchWave::correct() mesh(), changedFaces, faceDist, - mesh().globalData().nTotalCells() // max iterations + mesh().globalData().nTotalCells()+1 // max iterations ); diff --git a/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C b/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C index 32f86c82c8..04338dc46b 100644 --- a/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C +++ b/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C @@ -148,7 +148,7 @@ Foam::labelList Foam::structuredDecomp::decompose patchData, faceData, cellData, - mesh.globalData().nTotalCells() + mesh.globalData().nTotalCells()+1 ); // And extract diff --git a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C index af250a25f7..d97395d864 100644 --- a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C +++ b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C @@ -137,7 +137,7 @@ void smoothDelta::calcDelta() changedFacesInfo, faceDeltaData, cellDeltaData, - mesh_.globalData().nTotalCells() // max iterations + mesh_.globalData().nTotalCells()+1 // max iterations ); forAll(delta_, cellI)