From d0e612b28539cfe24d4a849b882ccb0189707982 Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Thu, 5 May 2016 15:17:08 +0100
Subject: [PATCH] processorPolyPatch: Avoid nesting loops with the same index

---
 .../polyPatches/constraint/processor/processorPolyPatch.C   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
index 2ca4c85b74..2b43b31ce3 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
@@ -273,10 +273,10 @@ void Foam::processorPolyPatch::calcGeometry(PstreamBuffers& pBufs)
 
                 label vertI = 0;
 
-                forAll(faceCentres(), facei)
+                forAll(faceCentres(), facej)
                 {
-                    const point& c0 = neighbFaceCentres_[facei];
-                    const point& c1 = faceCentres()[facei];
+                    const point& c0 = neighbFaceCentres_[facej];
+                    const point& c1 = faceCentres()[facej];
 
                     writeOBJ(ccStr, c0, c1, vertI);
                 }
-- 
GitLab