From 9c329086aff70226dcfb13a658cacde8b493c491 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sat, 30 Mar 2013 15:26:37 -0500 Subject: [PATCH] Fixed computation of the maximum number of particles accepted by Qhull --- zobov/vozinit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zobov/vozinit.c b/zobov/vozinit.c index c93f3f6..c1e7865 100644 --- a/zobov/vozinit.c +++ b/zobov/vozinit.c @@ -5,7 +5,7 @@ #define DL for (d=0;d<3;d++) #define BF 1e30 -#define QHULL_MAX_PARTICLES (1L<<24-1) +#define QHULL_MAX_PARTICLES ((1L<<24)-1) int posread(char *posfile, float ***p, float fact); @@ -149,9 +149,10 @@ int main(int argc, char *argv[]) { printf("Nvpbuf range: %d,%d\n",nvpbufmin,nvpbufmax); numGuards = 6*(NGUARD+1)*(NGUARD+1); + printf("Total max particles: %d\n" , nvpbufmax+numGuards); if (nvpbufmax+numGuards >= QHULL_MAX_PARTICLES) { - printf("Too many particles to tesselate per division (Qhull will overflow). Increase divisions or reduce buffer size."); + printf("Too many particles to tesselate per division (Qhull will overflow). Increase divisions or reduce buffer size.\n"); fflush(stdout); exit(1); }