From b13a55b37ca4a86e6822e2528f35bb65c2004dfb Mon Sep 17 00:00:00 2001 From: James E McClure Date: Sun, 22 Nov 2015 19:33:22 -0500 Subject: [PATCH] Trying to fix Euler characteristic (fail unit tests/TestTorus) --- common/pmmc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/pmmc.h b/common/pmmc.h index 555bc04e..c23ff517 100644 --- a/common/pmmc.h +++ b/common/pmmc.h @@ -4437,9 +4437,10 @@ inline double geomavg_EulerCharacteristic(DTMutableList &Points, IntArray } // Each vertex is shared by four cubes - nvert = 0.25*npts; + nvert = 0.25*double(npts); // Subtract shared sides to avoid double counting - nside = 3.0*ntris - ShareSideInternal - 0.5*CountSideExternal; + //nside = 3.0*ntris - ShareSideInternal - 0.5*CountSideExternal; + nside = 2.0*double(npts)- 3.0 - 0.5*double(npts-1); // Number of faces is number of triangles nface = 1.0*ntris;