Changes in version 0.4
Voro++ version 0.4 (released August 30th 2011) is major overhaul of the library, in which the class structure has been significantly revised and extended. It incorporates many changes that users have requested over the previous two years. The distribution contains a list of all of the specific changes, but several of the most important points are summarized here:
- C++ class structure – It is now possible to build the code as a static library, rather than having to directly include the source code. The class structure has been revised to provide more flexibility and cut down on the number of repeated routines. Loop classes make it possible to iterate over a specific subset of particles in a container. There is now a separation between container classes that hold particles, and computation classes that construct Voronoi cells.
- Programming interface – previously, many routines in Voro++ would only print their results to screen. In the new version all routines are accessible to the calling program. The library is now contained within a “voro” namespace to make it easier to incorporate into large programming projects without naming conflicts.
- Performance – a number of the key routines, such as
the
plane
andcompute_cell
functions, have been cleaned up and optimized, resulting in around a 30% improvement in speed. - Command-line utility – the utility now has more options. It is no longer necessary to specify a length scale to configure the code, since the library has a mechanism for guessing a correct value. Output files can be in the same order as the input files. POV-Ray files can be outputted. If several types of output are requested, all output files are written simultaneously and the Voronoi computation is only run once.
- Input/output – the library now makes use of the cstdio library for input and output instead of using C++ iostreams. This has been done for increased performance: on many systems, the cstdio library can read and write files several times faster than iostreams. Since many people use Voro++ to batch process large numbers of input files, this increase in input/output speed seemed desirable. The Gnuplot output routine has been optimized to draw cells with as few contiguous lines as possible, resulting in smaller file sizes and noticeably faster rendering. The POV-Ray output routines automatically strip degenerate cylinders to avoid problems with rendering.
- New features – a new routine called
find_voronoi_cell
has been added that can take a given vector and locate which Voronoi cell it is in. Support has also been added for computations in non-orthogonal parallelepiped domains, although at present this functionality can only be accessed within the C++ library and is not available through the command-line utility; this will be expanded upon in later versions.