From 2a76b2e557ac05c8117c942db985c1b799bec68a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 10 Feb 2014 17:06:03 +0000 Subject: [PATCH] Cell layering bug fix --- .../polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C | 5 ++--- src/foam/meshes/meshShapes/cell/oppositeCellFace.C | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C index 134049ffa..92e72ee04 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/layerAdditionRemoval/setLayerPairing.C @@ -129,8 +129,7 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const // Grab the opposite face for face collapse addressing ftc[faceI] = lidFace.oppositeIndex(); - // lidFace is only valid in simple cases - const face& lidFace2 = faces[lidFace.oppositeIndex()]; + // Taken out lidFace2: fails normal layering. HJ, 10/Feb/2014 // Using the local face insert the points into the lid list forAll (curLocalFace, pointI) @@ -157,7 +156,7 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const const labelListList& ppAddr = mesh.pointPoints(); - const labelList& p1List = ppAddr[lidFace2[pointI]]; + const labelList& p1List = ppAddr[lidFace[pointI]]; const labelList& p2List = ppAddr[ptc[clp]]; bool found = false; diff --git a/src/foam/meshes/meshShapes/cell/oppositeCellFace.C b/src/foam/meshes/meshShapes/cell/oppositeCellFace.C index 1d94b2b88..c932fa237 100644 --- a/src/foam/meshes/meshShapes/cell/oppositeCellFace.C +++ b/src/foam/meshes/meshShapes/cell/oppositeCellFace.C @@ -181,8 +181,7 @@ Foam::oppositeFace Foam::cell::opposingFace } } - // None of them matches, return a failure - return oppositeFace(face(0), masterFaceLabel, oppFaceLabel); + // Removed: fails normal layering. HJ, 10/Feb/2014 } } }