• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..23-Dec-2021-

MakefileH A D08-Sep-2020707 3214

READMEH A D08-Sep-20202.4 KiB4838

cylinder.ccH A D08-Sep-20201 KiB3815

cylinder.povH A D08-Sep-2020749 3629

frustum.ccH A D08-Sep-20201.5 KiB5025

frustum.povH A D08-Sep-2020773 3629

pack_cylinderH A D08-Sep-2020102 KiB2,3012,300

pack_torusH A D08-Sep-202070.8 KiB2,3942,393

tetrahedron.ccH A D08-Sep-20201.7 KiB6030

tetrahedron.povH A D08-Sep-2020615 3930

torus.ccH A D08-Sep-20203.6 KiB11249

torus.povH A D08-Sep-20201,005 4739

README

1Wall support
2============
3The structure of Voro++ makes it easy to handle complicated boundary conditions
4by adding in additional plane cuts due to walls. The code has built-in support
5for plane, cylindrical, and spherical walls, and extra ones can be easily coded
6as derived C++ classes.
7
81. cylinder.cc - this example creates a cylinder wall object, and imports a
9test packing from "pack_cylinder". It outputs POV-Ray files for particles at
10cylinder_p.pov, and Voronoi cells at cylinder_v.pov. These can be rendered
11using the scene file cylinder.pov with the command:
12
13povray +W600 +H800 +A0.3 +Ocylinder.png cylinder.pov
14
152. frustum.cc - this example creates a frustum by making use of a cone wall
16object. It fills the frustum with 500 random points, and outputs the
17Voronoi cells in gnuplot format. Due to the conical wall being approximated
18with plane cuts, some inaccuracies can be seen.
19
203. tetrahedron.cc - this example creates a tetrahedron with four planes, and
21randomly inserts particles into it, using the point_inside() function to
22determine whether the points are within the walls. It outputs the particles to
23tetrahedron_p.gnu, and the Voronoi cells to tetrahedron_v.gnu. These can be
24visualized in gnuplot using:
25
26splot 'tetrahedron_p.gnu' with points, 'tetrahedron_v.gnu' with lines
27
28Currently, the curved walls are made by a single approximating plane cut. This
29provides good results when particles are pressed against the walls, but is
30inaccurate it the particles are sparse. It would be possible to improve this by
31approximating the curved surface with a sequence of planes rather than just
32one.
33
34The code currently only supports walls which lead to convex computational
35domains, since a non-convex domain would lead to non-convex cells. To correctly
36handle these cases, the easiest way would be to divide the domain into several
37convex sub-domains, carry out a calculation in each, and then glue the cells
38that cross the divisions. Native support for non-convex domains may be added in
39a later version.
40
414. torus.cc - this example shows how to create a custom wall object, derived
42from the pure virtual "wall" class. A routine is written that can cut a Voronoi
43cell in response to a torus centered on the origin that is aligned with the xy
44plane. The program writes POV-Ray files of the particles and Voronoi cells, and
45these can be rendered using the following command:
46
47povray +W800 +H600 +A0.3 +Otorus.png torus.pov
48