-
Notifications
You must be signed in to change notification settings - Fork 26
/
original-README
153 lines (123 loc) · 7.42 KB
/
original-README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Voro++, a 3D cell-based Voronoi library (http://math.lbl.gov/voro++/)
By Chris H. Rycroft (UC Berkeley / Lawrence Berkeley Laboratory)
================================================================
Voro++ is a software library for carrying out three-dimensional computations
of the Voronoi tessellation. A distinguishing feature of the Voro++ library
is that it carries out cell-based calculations, computing the Voronoi cell
for each particle individually, rather than computing the Voronoi
tessellation as a global network of vertices and edges. It is particularly
well-suited for applications that rely on cell-based statistics, where
features of Voronoi cells (eg. volume, centroid, number of faces) can be
used to analyze a system of particles
Voro++ comprises of several C++ classes that can be built as a static library
and linked to. A command-line utility is also provided that can analyze text
files of particle configurations and use most of the features of the code.
Numerous examples are provided to demonstrate the library's features and all of
these are discussed in detail on the library website.
Compilation - Linux / Mac OS / Windows with Cygwin
==================================================
The code is written in ANSI C++, and compiles on many system architectures. The
package contains the C++ source code, example files, miscellaneous utilities
and documentation. On Linux, Mac OS, and Windows (using Cygwin), the
compilation and installed can be carried out using GNU Make.
To begin, the user should review the file "config.mk" in the top level
directory, to make sure that the compilation and installation settings are
appropriate for their system. Typing "make" will then compile the static
library, command-line utility, and examples. The command-line utility and
library will appear within the "src" directory.
Following successful compilation, the library, command-line utility, and
documentation can be installed by typing "sudo make install". By default, the
program files are installed into /usr/local, and it may be necessary to modify
your environment variables in order to access the installed files:
- to use the command-line utility, the variable PATH should contain
/usr/local/bin.
- to access the Voro++ man page, the variable MANPATH should contain
/usr/local/man.
- to access the Voro++ header files, code compilation should include
the flag '-I/usr/local/include/voro++'.
- to link to the static library, code compilation should include the
flags '-L/usr/local/lib' to tell the linker where to look, and then
'-lvoro++' to link to the library.
The library website contains additional notes on setting environment variables,
and many guides are available on the Internet.
The code can later be uninstalled with "sudo make uninstall". It is also
possible to use the library and command-line utility without installation by
calling the files directly once they have been compiled. On systems where the
user does not have root privileges to install into /usr/local, the "config.mk"
file can be modified to install into the user's home directory by setting
PREFIX=$(HOME). Voro++ supports parallel compilation by using the "make -j <n>"
command where n is the number of threads.
Compilation - Windows without Cygwin
====================================
On a Windows machine without a terminal environment like Cygwin, it is possible
to import and compile the library in many standard C++ development
environments. Users have reported success in building the library with
Microsoft Visual C++ Express and Code::Blocks.
Related programs
================
No external dependencies are required to compile and run the code, but several
programs may be useful for analyzing the output:
- The freeware plotting program Gnuplot (available at www.gnuplot.info) can be
used for rapid 2D and 3D visualization of the program output.
- The freeware raytracer POV-Ray (available at www.povray.org) can be used for
high-quality renderings of the program output.
- The reference manual is generated from comments in the source code using
Doxygen (available at www.doxygen.org). This package is only required if the
library files are being developed and the reference manuals need to be
regenerated. The complete reference manual to the current code is available
online at http://math.lbl.gov/voro++/doc/refman/
Contents
========
examples - many documented examples making use of the library
html - an HTML-based reference manual (generated by Doxygen)
man - contains the man page that is installed with the program
scripts - miscellaneous helper scripts
src - source code files
Usage
=====
Voro++ is released as free software through the Lawrence Berkeley National
Laboratory - a detailed copyright notice is provided below, and the complete
terms of the license can be found in the LICENSE file.
I am very interested to hear from users of the software, so if you find this
useful, please email me at [email protected]. Also, if you plan to publish an
academic paper using this software, please consider citing one of the following
publications:
- Chris H. Rycroft, "Voro++: A three-dimensional Voronoi cell library in C++",
Chaos 19, 041111 (2009).
- Chris H. Rycroft, Gary S. Grest, James W. Landry, and Martin Z. Bazant,
"Analysis of Granular Flow in a Pebble-Bed Nuclear Reactor",
Phys. Rev. E 74, 021306 (2006).
- Chris H. Rycroft, "Multiscale Modeling in Granular Flow", PhD thesis
submitted to the Massachusetts Institute of Technology, September 2007.
(http://math.berkeley.edu/~chr/publish/phd.html)
The first reference contains a one-page overview of the library. The second
reference contains some of the initial images that were made using a very early
version of this code, to track small changes in packing fraction in a large
particle simulation. The third reference discusses the use of 3D Voronoi cells,
and describes the algorithms that were employed in the early version of this
code. Since the publication of the above references, the algorithms in Voro++
have been significantly improved, and a paper specifically devoted to the
current code architecture will be published during 2012.
Copyright Notice
================
Voro++ Copyright (c) 2008, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software,
please contact Berkeley Lab's Technology Transfer Department at [email protected].
NOTICE. This software was developed under partial funding from the U.S.
Department of Energy. As such, the U.S. Government has been granted for itself
and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide
license in the Software to reproduce, prepare derivative works, and perform
publicly and display publicly. Beginning five (5) years after the date
permission to assert copyright is obtained from the U.S. Department of Energy,
and subject to any subsequent five (5) year renewals, the U.S. Government is
granted for itself and others acting on its behalf a paid-up, nonexclusive,
irrevocable, worldwide license in the Software to reproduce, prepare derivative
works, distribute copies to the public, perform publicly and display publicly,
and to permit others to do so.
Acknowledgments
===============
This work was supported by the Director, Office of Science, Computational and
Technology Research, U.S. Department of Energy under Contract No.
DE-AC02-05CH11231.