From 5fcf1876a36969ce920231f59637cadf662119d5 Mon Sep 17 00:00:00 2001 From: chr Date: Sun, 26 Apr 2015 17:25:23 +0000 Subject: [PATCH] Minor tweaks to L-shape example. git-svn-id: https://codeforge.lbl.gov/anonscm/voro@582 6221c96e-593b-4ce1-a500-64c4038a1943 --- trunk/examples/extra/l_shape.cc | 4 +++- trunk/src/cell.cc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/examples/extra/l_shape.cc b/trunk/examples/extra/l_shape.cc index 69485a0..25c8ee9 100644 --- a/trunk/examples/extra/l_shape.cc +++ b/trunk/examples/extra/l_shape.cc @@ -8,7 +8,7 @@ using namespace voro; // Set the number of particles that are going to be randomly introduced -const int particles=30; +const int particles=20; // This function returns a random double between 0 and 1 double rnd() {return double(rand())/RAND_MAX;} @@ -63,6 +63,8 @@ int main() { i++; } + printf("Voronoi cell volume: %.8g\n",con.sum_cell_volumes()); + // Save the particles and Voronoi cells in POV-Ray format con.draw_particles("l_shape_p.gnu"); con.draw_cells_gnuplot("l_shape_v.gnu"); diff --git a/trunk/src/cell.cc b/trunk/src/cell.cc index 2223626..836be7d 100644 --- a/trunk/src/cell.cc +++ b/trunk/src/cell.cc @@ -320,7 +320,7 @@ void voronoicell_base::init_base(double xmin,double xmax,double ymin,double ymax void voronoicell::init_l_shape() { for(int i=0;i