1 // Cylindrical wall example code
3 // Author : Chris H. Rycroft (LBL / UC Berkeley)
4 // Email : chr@alum.mit.edu
5 // Date : August 30th 2011
10 // Set up constants for the container geometry
11 const double x_min
=-6.5,x_max
=6.5;
12 const double y_min
=-6.5,y_max
=6.5;
13 const double z_min
=0,z_max
=18.5;
15 // Set the computational grid size
16 const int n_x
=7,n_y
=7,n_z
=14;
19 // Create a container with the geometry given above, and make it
20 // non-periodic in each of the three coordinates. Allocate space for
21 // eight particles within each computational block.
22 container
con(x_min
,x_max
,y_min
,y_max
,z_min
,z_max
,n_x
,n_y
,n_z
,
25 // Add a cylindrical wall to the container
26 wall_cylinder
cyl(0,0,0,0,0,1,6);
29 // Import the particles from a file
30 con
.import("pack_cylinder");
32 // Output the particle positions in POV-Ray format
33 con
.draw_particles_pov("cylinder_p.pov");
35 // Output the Voronoi cells in POV-Ray format
36 con
.draw_cells_pov("cylinder_v.pov");