From 8da985572fd57e3e19a80798bd78b56310ae9967 Mon Sep 17 00:00:00 2001 From: chr Date: Mon, 20 Apr 2015 14:09:06 +0000 Subject: [PATCH] Debugging messages for Zeo test. git-svn-id: https://codeforge.lbl.gov/anonscm/voro@576 6221c96e-593b-4ce1-a500-64c4038a1943 --- trunk/src/cell.cc | 50 ++++++++++++++++++++++------------------------ trunk/src/config.hh | 2 +- trunk/src/container_prd.cc | 2 ++ trunk/zeo/v_network.cc | 12 +++++------ 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/trunk/src/cell.cc b/trunk/src/cell.cc index 59ab4c5..ba9f783 100644 --- a/trunk/src/cell.cc +++ b/trunk/src/cell.cc @@ -277,7 +277,7 @@ void voronoicell_base::add_memory_xse() { current_xsearch_size<<=1; if(current_xsearch_size>max_xsearch_size) voro_fatal_error("Extra search stack memory allocation exceeded absolute maximum",VOROPP_MEMORY_ERROR); #if VOROPP_VERBOSE >=2 - fprintf(stderr,"Extra search stack memory scaled up to %d\n",current_delete2_size); + fprintf(stderr,"Extra search stack memory scaled up to %d\n",current_xsearch_size); #endif int *dsn=new int[current_xsearch_size],*dsnp=dsn,*dsp=xse; while(dsp=op) continue; - - // Test position of this point relative to the plane uw=m_test(up,u); - if(uw<1) { + printf("%d->%d %d (%d,%g)\n",lp,up,op,uw,u); + if(up>=op) continue; - // If this marginally outside, mark it - // to search unless it's already marked - if(uw==0) { - if(ed[up][nu[up]<<1]!=-1) { - ed[up][nu[up]<<1]=-1; - if(stackp3==stacke3) add_memory_xse(); - *(stackp3++)=up; - } + if(uw==0) { + if(u>-big_tol&&ed[up][nu[up]<<1]!=-1) { + ed[up][nu[up]<<1]=-1; + if(stackp3==stacke3) add_memory_xse(); + *(stackp3++)=up; } - } else { - if(uw==1) { + } else if(uw==1) { + puts("Create marg"); - // This is a possible facet starting - // from a vertex on the cutting plane - if(create_facet(vc,-1,0,0,0,u,p_id)) return false; - } else { + // This is a possible facet starting + // from a vertex on the cutting plane + if(create_facet(vc,-1,0,0,0,u,p_id)) return false; + } else { + puts("Create reg"); - // This is a new facet - us=ed[lp][nu[lp]+ls]; - m_test(lp,l); - if(create_facet(vc,lp,ls,l,us,u,p_id)) return false; - } + // This is a new facet + us=ed[lp][nu[lp]+ls]; + m_test(lp,l); + if(create_facet(vc,lp,ls,l,us,u,p_id)) return false; } } xtra++; @@ -1908,7 +1905,8 @@ inline unsigned int voronoicell_base::m_testx(int n,double &ans) { ans=pts[4*n+3]; maskr=mask[n]&3; } else maskr=m_calc(n,ans); - if(maskr==0&&ans>-big_tol) { + if(maskr==0&&ans>-big_tol&&ed[n][nu[n]<<1]!=-1) { + ed[n][nu[n]<<1]=-1; if(stackp3==stacke3) add_memory_xse(); *(stackp3++)=n; } diff --git a/trunk/src/config.hh b/trunk/src/config.hh index 909ab27..f07477a 100644 --- a/trunk/src/config.hh +++ b/trunk/src/config.hh @@ -72,7 +72,7 @@ const int pre_container_chunk_size=1024; * plane routine bails out due to floating point problems. At level 2, general * messages about memory expansion are printed. At level 3, technical details * about memory management are printed. */ -#define VOROPP_VERBOSE 0 +#define VOROPP_VERBOSE 2 #endif /** If a point is within this distance of a cutting plane, then the code diff --git a/trunk/src/container_prd.cc b/trunk/src/container_prd.cc index 78e0698..fb3e32c 100644 --- a/trunk/src/container_prd.cc +++ b/trunk/src/container_prd.cc @@ -35,6 +35,8 @@ container_periodic_base::container_periodic_base(double bx_,double bxy_,double b co(new int[oxyz]), mem(new int[oxyz]), img(new char[oxyz]), init_mem(init_mem_), ps(ps_) { int i,j,k,l; + printf("Yo %g %g\n",max_len_sq,tolerance); + // Clear the global arrays int *pp=co;while(pp