From 7f4d9f485b9a1de7c3718c92ffe5b44543a31e02 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Mon, 3 Dec 2012 07:37:05 +0000 Subject: [PATCH] swapping bug fix --- libsrc/meshing/improve3.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libsrc/meshing/improve3.cpp b/libsrc/meshing/improve3.cpp index 8a236aa2..4215c169 100644 --- a/libsrc/meshing/improve3.cpp +++ b/libsrc/meshing/improve3.cpp @@ -752,7 +752,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal, } pi5 = 0; - for (int k = 1; k < 3; k++) + for (int k = 0; k < 3; k++) // JS, 201212 { const Element & elemk = mesh[hasbothpoints[k]]; bool has1 = 0; @@ -905,7 +905,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal, } pi5 = 0; - for (int k = 1; k < 4; k++) + for (int k = 0; k < 4; k++) { const Element & elem = mesh[hasbothpoints[k]]; bool has1 = 0; @@ -921,7 +921,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal, } pi6 = 0; - for (int k = 1; k < 4; k++) + for (int k = 0; k < 4; k++) { const Element & elem = mesh[hasbothpoints[k]]; bool has1 = 0; @@ -935,7 +935,8 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal, pi6 = elem[l]; } } - + + /* INDEX_2 i22(pi3, pi5); i22.Sort(); @@ -1149,7 +1150,7 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal, mesh[hasbothpoints[1]] = el2; mesh[hasbothpoints[2]] = el3; mesh[hasbothpoints[3]] = el4; - + for (int k = 0; k < 4; k++) for (int l = 0; l < 4; l++) elementsonnode.Add (mesh[hasbothpoints[k]][l], hasbothpoints[k]); @@ -1182,7 +1183,6 @@ void MeshOptimize3d :: SwapImprove (Mesh & mesh, OPTIMIZEGOAL goal, mesh[hasbothpoints[2]] = el3b; mesh[hasbothpoints[3]] = el4b; - for (int k = 0; k < 4; k++) for (int l = 0; l < 4; l++) elementsonnode.Add (mesh[hasbothpoints[k]][l], hasbothpoints[k]);