From 0ebd122b0a816c2ba1397bd63978043a38acd172 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Sat, 8 Aug 2015 14:30:06 +0100 Subject: [PATCH] polyMeshFromShapeMesh: Set patch-face to corresponding cell-face Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1818 --- src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C index 9a3e69faf57..62c1877fc16 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C @@ -328,9 +328,7 @@ void Foam::polyMesh::setTopology const label cellInside = curPatchFaceCells[faceI]; - faces_[nFaces] = curFace; - - // get faces of the cell inside + // Get faces of the cell inside const faceList& facesOfCellInside = cellsFaceShapes[cellInside]; bool found = false; @@ -366,6 +364,9 @@ void Foam::polyMesh::setTopology found = true; + // Set the patch face to corresponding cell-face + faces_[nFaces] = facesOfCellInside[cellFaceI]; + cells[cellInside][cellFaceI] = nFaces; break; -- GitLab