Package gov.nih.mipav.model.structures
Class Voro
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.structures.Voro
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.WindowListener,java.lang.Runnable,java.util.EventListener
public class Voro extends AlgorithmBase
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. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form. Voro++, a 3D cell-based Voronoi library (http://math.lbl.gov/voro++/) By Chris H. Rycroft (Harvard University / 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 (e.g. volume, centroid, number of faces) can be used to analyze a system of particles. 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 chr@alum.mit.edu. 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://seas.harvard.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classVoro.blocks_mode(package private) classVoro.c_loop_all\brief Class for looping over all of the particles in a container.(package private) classVoro.c_loop_all_periodic\brief A class for looping over all particles in a container_periodic or container_periodic_poly class.(package private) classVoro.c_loop_base\brief Base class for looping over particles in a container.(package private) classVoro.c_loop_order\brief Class for looping over all of the particles specified in a pre-assembled particle_order class.(package private) classVoro.c_loop_order_periodic\brief Class for looping over all of the particles specified in a pre-assembled particle_order class, for use with container_periodic classes.(package private) classVoro.c_loop_subset\brief Class for looping over a subset of particles in a container.(package private) static classVoro.c_loop_subset_modeA type associated with a c_loop_subset class, determining what type of geometrical region to loop over.(package private) classVoro.container_base\brief Class for representing a particle system in a three-dimensional rectangular box.(package private) classVoro.container_periodic_base\brief Class for representing a particle system in a 3D periodic non-orthogonal periodic domain.(package private) classVoro.container_periodic_poly_radius_poly\brief Extension of the container_periodic_base class for computing radical Voronoi tessellations.(package private) classVoro.container_periodic_radius_mono\brief Extension of the container_periodic_base class for computing regular Voronoi tessellations.(package private) classVoro.container_poly_radius_poly\brief Class containing all of the routines that are specific to computing the radical Voronoi tessellation.(package private) classVoro.container_radius_mono\brief Extension of the container_base class for computing regular Voronoi tessellations.(package private) classVoro.dodecahedron_initial_shape(package private) classVoro.particle_order\brief A class for storing ordering information when particles are added to a container.(package private) classVoro.particle_record\brief Structure for holding information about a particle.(package private) classVoro.pre_container\brief A class for storing an arbitrary number of particles without radius information, prior to setting up a container geometry.(package private) classVoro.pre_container_base\brief A class for storing an arbitrary number of particles, prior to setting up a container geometry.(package private) classVoro.pre_container_poly\brief A class for storing an arbitrary number of particles with radius information, prior to setting up a container geometry.(package private) classVoro.unitcell\brief Class for computation of the unit Voronoi cell associated with a 3D non-rectangular periodic domain.(package private) classVoro.voro_base_unitcell(package private) classVoro.voro_base_wall_list\brief A class for storing a list of pointers to walls.(package private) classVoro.voro_compute_container_periodic_poly_radius_poly\brief Template for carrying out Voronoi cell computations.(package private) classVoro.voro_compute_container_periodic_radius_mono(package private) classVoro.voro_compute_container_poly_radius_poly\brief Template for carrying out Voronoi cell computations.(package private) classVoro.voro_compute_container_radius_mono\brief Template for carrying out Voronoi cell computations.(package private) classVoro.voronoicell\brief Extension of the voronoicell_base class to represent a Voronoi cell without neighbor information.(package private) classVoro.voronoicell_base\brief A class representing a single Voronoi cell.(package private) classVoro.voronoicell_neighbor\brief Extension of the voronoicell_base class to represent a Voronoi cell with neighbor information.(package private) classVoro.wall\brief Pure virtual class from which wall objects are derived.(package private) classVoro.wall_cone\brief A class representing a conical wall object.(package private) classVoro.wall_cylinder\brief A class representing a cylindrical wall object.(package private) classVoro.wall_cylinder_inv(package private) classVoro.wall_ellipsoid(package private) classVoro.wall_initial_shape(package private) classVoro.wall_l_shape(package private) classVoro.wall_plane\brief A class representing a plane wall object.(package private) classVoro.wall_shell(package private) classVoro.wall_sphere\brief A class representing a spherical wall object.(package private) classVoro.wall_torus
-
Field Summary
Fields Modifier and Type Field Description (package private) doubleax(package private) doubleay(package private) doubleaz(package private) doublebig_tolerance_fac(package private) Voro.blocks_modebm(package private) doublebx(package private) doubleby(package private) doublebz(package private) double[]cow0(package private) double[]cow1(package private) double[]cow2(package private) double[]cow3(package private) double[]cow4(package private) double[]cow5(package private) double[]cow6(package private) char[]custom_output(package private) double[]cyw0(package private) double[]cyw1(package private) double[]cyw2(package private) double[]cyw3(package private) double[]cyw4(package private) double[]cyw5(package private) double[]cyw6(package private) doubledefault_length(package private) doubledefault_radiusA radius to use as a placeholder when no other information is available.(package private) doubleepsilon(package private) java.lang.StringfileNameBase(package private) booleangnuplot_output(package private) booleanhc(package private) booleanhelp(package private) intinit_3_verticesThe initial memory allocation for the number of regular vertices of order 3.(package private) intinit_chunk_sizeThe initial size of the pre_container chunk index.(package private) intinit_delete_sizeThe initial size for the delete stack.(package private) intinit_delete2_sizeThe initial size for the auxiliary delete stack.(package private) intinit_mem(package private) intinit_n_verticesThe initial memory allocation for the number of vertices of higher order.(package private) intinit_ordering_sizeThe default initial size for the ordering class.(package private) intinit_vertex_orderThe initial memory allocation for the maximum vertex order.(package private) intinit_verticesThe initial memory allocation for the number of vertices.(package private) intinit_wall_sizeThe initial size for the wall pointer array.(package private) intinit_xsearch_sizeThe initial size for the extra search stack.(package private) doublelarge_numberA large number that is used in the computation.(package private) doublels(package private) intmax_chunk_sizeThe maximum size for the pre_container chunk index.(package private) intmax_delete_sizeThe maximum size for the delete stack.(package private) intmax_delete2_sizeThe maximum size for the auxiliary delete stack.(package private) intmax_n_verticesThe maximum memory allocation for the any particular order of vertex.(package private) intmax_ordering_sizeThe maximum size for the ordering class.(package private) intmax_particle_memoryThe maximum amount of particle memory allocated for a single region.(package private) intmax_regions(package private) intmax_unit_voro_shellsThe maximum number of shells of periodic images to test over.(package private) intmax_vertex_orderThe maximum memory allocation for the maximum vertex order.(package private) intmax_verticesThe maximum memory allocation for the number of vertices.(package private) intmax_wall_sizeThe maximum size for the wall pointer array.(package private) intmax_xsearch_sizeThe maximum size for the extra search stack.(package private) intnumberConeWall(package private) intnumberCylinderWall(package private) intnumberPlaneWall(package private) intnumberRectangularBox(package private) intnumberSphereWall(package private) int[]nx(package private) int[]ny(package private) int[]nz(package private) doubleoptimal_particlesA guess for the optimal number of particles per block, used to set up the container grid.(package private) booleanordered(package private) booleanpolydisperse(package private) booleanpovp_output(package private) booleanpovv_output(package private) intpre_container_chunk_sizeThe chunk size in the pre_container classes.(package private) double[]pw0(package private) double[]pw1(package private) double[]pw2(package private) double[]pw3(package private) double[]rbw0(package private) double[]rbw1(package private) double[]rbw2(package private) double[]rbw3(package private) double[]rbw4(package private) double[]rbw5(package private) double[]sw0(package private) double[]sw1(package private) double[]sw2(package private) double[]sw3(package private) doubletoleranceIf a point is within this distance of a cutting plane, then the code assumes that point exactly lies on the plane.(package private) booleanverbose(package private) booleanversion(package private) intVOROPP_CMD_LINE_ERRORVoro++ returns this status code if it could not interpret the command line arguments passed to the command line utility.(package private) intVOROPP_FILE_ERRORVoro++ returns this status code if there is a file-related error, such as not being able to open file.(package private) intVOROPP_INTERNAL_ERRORVoro++ returns this status code if there is any type of internal error, if it detects that representation of the Voronoi cell is inconsistent.(package private) intVOROPP_MEMORY_ERRORVoro++ returns this status code if there is a memory allocation error, if one of the safe memory limits is exceeded.(package private) intVOROPP_REPORT_OUT_OF_BOUNDSIf this is set to 1, then the code reports any instances of particles being put outside of the container geometry.(package private) intVOROPP_VERBOSEVoro++ can print a number of different status and debugging messages to notify the user of special behavior, and this macro sets the amount which are displayed.(package private) int[]wl\file v_base_wl.cc \brief The table of block worklists that are used during the cell computation, which is part of the voro_base class.(package private) intwl_fgridThe number of subregions that a block is subdivided into, which is twice the value of hgrid.(package private) intwl_hgridEach region is divided into a grid of subregions, and a worklist is # finalructed for each.(package private) intwl_hgridcuThe total number of worklists, set to the cube of hgrid.(package private) intwl_seq_lengthThe number of elements in each worklist.(package private) booleanxperiodic(package private) booleanyperiodic(package private) booleanzperiodic-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description Voro()Voro(boolean help, boolean hc, boolean version, char[] custom_output, boolean gnuplot_output, Voro.blocks_mode bm, double ls, int init_mem, int[] nx, int[] ny, int[] nz, boolean ordered, boolean xperiodic, boolean yperiodic, boolean zperiodic, boolean polydisperse, boolean verbose, int numberRectangularBox, double[] rbw0, double[] rbw1, double[] rbw2, double[] rbw3, double[] rbw4, double[] rbw5, int numberSphereWall, double[] sw0, double[] sw1, double[] sw2, double[] sw3, int numberPlaneWall, double[] pw0, double[] pw1, double[] pw2, double[] pw3, int numberCylinderWall, double[] cyw0, double[] cyw1, double[] cyw2, double[] cyw3, double[] cyw4, double[] cyw5, double[] cyw6, int numberConeWall, double[] cow0, double[] cow1, double[] cow2, double[] cow3, double[] cow4, double[] cow5, double[] cow6, boolean povp_output, boolean povv_output, double ax, double bx, double ay, double by, double az, double bz, java.lang.String fileNameBase)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbox_cut()(package private) static doublecalculate_solid_angle(double[] R1, int R1offset, double[] R2, int R2offset, double[] R3, int R3offset)(package private) static doublecalculate_solid_angle(java.util.Vector<java.lang.Double> R1, int R1offset, java.util.Vector<java.lang.Double> R2, int R2offset, java.util.Vector<java.lang.Double> R3, int R3offset)voidcell_statistics()(package private) voidcheck_duplicate(int n, double x, double y, double z, int id, double[] qp)(package private) voidcmd_line_output(Voro.c_loop_all vl, Voro.container_poly_radius_poly con, char[] format, java.io.RandomAccessFile outfile, java.io.RandomAccessFile gnu_file, java.io.RandomAccessFile povp_file, java.io.RandomAccessFile povv_file, boolean verbose, double[] vol, int[] vcc, int[] tp)(package private) voidcmd_line_output(Voro.c_loop_all vl, Voro.container_radius_mono con, char[] format, java.io.RandomAccessFile outfile, java.io.RandomAccessFile gnu_file, java.io.RandomAccessFile povp_file, java.io.RandomAccessFile povv_file, boolean verbose, double[] vol, int[] vcc, int[] tp)(package private) voidcmd_line_output(Voro.c_loop_order vl, Voro.container_poly_radius_poly con, char[] format, java.io.RandomAccessFile outfile, java.io.RandomAccessFile gnu_file, java.io.RandomAccessFile povp_file, java.io.RandomAccessFile povv_file, boolean verbose, double[] vol, int[] vcc, int[] tp)(package private) voidcmd_line_output(Voro.c_loop_order vl, Voro.container_radius_mono con, char[] format, java.io.RandomAccessFile outfile, java.io.RandomAccessFile gnu_file, java.io.RandomAccessFile povp_file, java.io.RandomAccessFile povv_file, boolean verbose, double[] vol, int[] vcc, int[] tp)voidconvex_test()(package private) static voidcross_product(double[] a, int aoffset, double[] b, int boffset, double[] c)(package private) static voidcross_product(java.util.Vector<java.lang.Double> a, int aoffset, java.util.Vector<java.lang.Double> b, int boffset, java.util.Vector<java.lang.Double> c)voidcustom_output()(package private) voidcustom_output_message()voidcut_region()voidcylinder()voidcylinder_inv()voiddegenerate()voiddegenerate2()(package private) static doubledot_product(double[] a, int aoffset, double[] b, int boffset)(package private) static doubledot_product(java.util.Vector<java.lang.Double> a, int aoffset, java.util.Vector<java.lang.Double> b, int boffset)(package private) voiddraw_polygon(java.io.RandomAccessFile fp, java.util.Vector<java.lang.Integer> f_vert, java.util.Vector<java.lang.Double> v, int j)voidellipsoid()(package private) voiderror_message()voidfind_voro_cell()voidfinite_sys()voidfrustrum()voidghost_test()booleanhas_dodec_sides(java.util.Vector<java.lang.Integer> vi)(package private) voidhelp_message()voidI_shape()voidimport_nguyen()voidimport_rahman()voidimportList()voidirregular()voidlloyd_box()voidloops()voidminkowski()voidneigh_test()(package private) static voidnormalize_vector(double[] x, int xoffset, double[] normalized, int normoffset)(package private) static voidnormalize_vector(double[] x, int xoffset, java.util.Vector normalized, int normoffset)voidodd_even()voidperiod()voidplatonic()voidpolycrystal_rahman()voidpolygons()voidr_pts_interface()voidrad_test()voidradical()voidrandom_points_10()voidrandom_points_200()voidrunAlgorithm()Actually runs the algorithm.(package private) java.io.RandomAccessFilesafe_fopen(java.lang.String filename, java.lang.String mode)\brief Opens a file and checks the operation was successful.(package private) java.io.Filesafe_fopen_file(java.lang.String filename)voidsingle_cell()voidsingle_cell_2d()voidsphere()voidsphere_mesh()voidsplit_cell()voidsuperellipsoid()voidtetrahedron()voidtiming_test()voidtorus()voidtri_mesh()(package private) static doubletriple_product(double[] a, int aoffset, double[] b, int boffset, double[] c, int coffset)(package private) static doubletriple_product(java.util.Vector<java.lang.Double> a, int aoffset, java.util.Vector<java.lang.Double> b, int boffset, java.util.Vector<java.lang.Double> c, int coffset)(package private) voidversion_message()(package private) voidvoro_fatal_error(java.lang.String p, int status)\brief Function for printing fatal error messages and exiting.voidvoro_lf()(package private) voidvoro_print_face_vertices(java.util.Vector<java.lang.Integer> v, java.io.RandomAccessFile raFile)\brief Prints a vector a face vertex information.(package private) voidvoro_print_face_vertices_stdout(java.util.Vector<java.lang.Integer> v)(package private) voidvoro_print_positions(java.util.Vector<java.lang.Double> v, java.io.RandomAccessFile raFile)\brief Prints a vector of positions.(package private) voidvoro_print_positions_stdout(java.util.Vector<java.lang.Double> v)(package private) voidvoro_print_vectorDouble(java.util.Vector<java.lang.Double> v, java.io.RandomAccessFile raFile)\brief Prints a vector of doubles.(package private) voidvoro_print_vectorDouble_stdout(java.util.Vector<java.lang.Double> v)(package private) voidvoro_print_vectorInteger(java.util.Vector<java.lang.Integer> v, java.io.RandomAccessFile raFile)\brief Prints a vector of Integers.(package private) voidvoro_print_vectorInteger_stdout(java.util.Vector<java.lang.Integer> v)-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
help
boolean help
-
hc
boolean hc
-
version
boolean version
-
custom_output
char[] custom_output
-
gnuplot_output
boolean gnuplot_output
-
bm
Voro.blocks_mode bm
-
ls
double ls
-
init_mem
int init_mem
-
nx
int[] nx
-
ny
int[] ny
-
nz
int[] nz
-
ordered
boolean ordered
-
xperiodic
boolean xperiodic
-
yperiodic
boolean yperiodic
-
zperiodic
boolean zperiodic
-
polydisperse
boolean polydisperse
-
verbose
boolean verbose
-
numberRectangularBox
int numberRectangularBox
-
rbw0
double[] rbw0
-
rbw1
double[] rbw1
-
rbw2
double[] rbw2
-
rbw3
double[] rbw3
-
rbw4
double[] rbw4
-
rbw5
double[] rbw5
-
numberSphereWall
int numberSphereWall
-
sw0
double[] sw0
-
sw1
double[] sw1
-
sw2
double[] sw2
-
sw3
double[] sw3
-
numberPlaneWall
int numberPlaneWall
-
pw0
double[] pw0
-
pw1
double[] pw1
-
pw2
double[] pw2
-
pw3
double[] pw3
-
numberCylinderWall
int numberCylinderWall
-
cyw0
double[] cyw0
-
cyw1
double[] cyw1
-
cyw2
double[] cyw2
-
cyw3
double[] cyw3
-
cyw4
double[] cyw4
-
cyw5
double[] cyw5
-
cyw6
double[] cyw6
-
numberConeWall
int numberConeWall
-
cow0
double[] cow0
-
cow1
double[] cow1
-
cow2
double[] cow2
-
cow3
double[] cow3
-
cow4
double[] cow4
-
cow5
double[] cow5
-
cow6
double[] cow6
-
povp_output
boolean povp_output
-
povv_output
boolean povv_output
-
ax
double ax
-
bx
double bx
-
ay
double ay
-
by
double by
-
az
double az
-
bz
double bz
-
fileNameBase
java.lang.String fileNameBase
-
max_regions
final int max_regions
- See Also:
- Constant Field Values
-
wl
final int[] wl
\file v_base_wl.cc \brief The table of block worklists that are used during the cell computation, which is part of the voro_base class. This file is automatically generated by worklist_gen.pl and it is not intended to be edited by hand.
-
wl_hgrid
final int wl_hgrid
Each region is divided into a grid of subregions, and a worklist is # finalructed for each. This parameter sets is set to half the number of # subregions that the block is divided into.- See Also:
- Constant Field Values
-
wl_fgrid
final int wl_fgrid
The number of subregions that a block is subdivided into, which is twice the value of hgrid.- See Also:
- Constant Field Values
-
wl_hgridcu
final int wl_hgridcu
The total number of worklists, set to the cube of hgrid.- See Also:
- Constant Field Values
-
wl_seq_length
final int wl_seq_length
The number of elements in each worklist.- See Also:
- Constant Field Values
-
init_vertices
final int init_vertices
The initial memory allocation for the number of vertices.- See Also:
- Constant Field Values
-
init_vertex_order
final int init_vertex_order
The initial memory allocation for the maximum vertex order.- See Also:
- Constant Field Values
-
init_3_vertices
final int init_3_vertices
The initial memory allocation for the number of regular vertices of order 3.- See Also:
- Constant Field Values
-
init_n_vertices
final int init_n_vertices
The initial memory allocation for the number of vertices of higher order.- See Also:
- Constant Field Values
-
init_delete_size
final int init_delete_size
The initial size for the delete stack.- See Also:
- Constant Field Values
-
init_delete2_size
final int init_delete2_size
The initial size for the auxiliary delete stack.- See Also:
- Constant Field Values
-
init_xsearch_size
final int init_xsearch_size
The initial size for the extra search stack.- See Also:
- Constant Field Values
-
init_wall_size
final int init_wall_size
The initial size for the wall pointer array.- See Also:
- Constant Field Values
-
init_ordering_size
final int init_ordering_size
The default initial size for the ordering class.- See Also:
- Constant Field Values
-
init_chunk_size
final int init_chunk_size
The initial size of the pre_container chunk index.- See Also:
- Constant Field Values
-
max_vertices
final int max_vertices
The maximum memory allocation for the number of vertices.- See Also:
- Constant Field Values
-
max_vertex_order
final int max_vertex_order
The maximum memory allocation for the maximum vertex order.- See Also:
- Constant Field Values
-
max_n_vertices
final int max_n_vertices
The maximum memory allocation for the any particular order of vertex.- See Also:
- Constant Field Values
-
max_delete_size
final int max_delete_size
The maximum size for the delete stack.- See Also:
- Constant Field Values
-
max_delete2_size
final int max_delete2_size
The maximum size for the auxiliary delete stack.- See Also:
- Constant Field Values
-
max_xsearch_size
final int max_xsearch_size
The maximum size for the extra search stack.- See Also:
- Constant Field Values
-
max_particle_memory
final int max_particle_memory
The maximum amount of particle memory allocated for a single region.- See Also:
- Constant Field Values
-
max_wall_size
final int max_wall_size
The maximum size for the wall pointer array.- See Also:
- Constant Field Values
-
max_ordering_size
final int max_ordering_size
The maximum size for the ordering class.- See Also:
- Constant Field Values
-
max_chunk_size
final int max_chunk_size
The maximum size for the pre_container chunk index.- See Also:
- Constant Field Values
-
pre_container_chunk_size
final int pre_container_chunk_size
The chunk size in the pre_container classes.- See Also:
- Constant Field Values
-
VOROPP_VERBOSE
final int VOROPP_VERBOSE
Voro++ can print a number of different status and debugging messages to notify the user of special behavior, and this macro sets the amount which are displayed. At level 0, no messages are printed. At level 1, messages about unusual cases during cell finalruction are printed, such as when the plane routine bails out due to floating point problems. At level 2, general messages about memory expansion are printed. At level 3, technical details about memory management are printed.- See Also:
- Constant Field Values
-
epsilon
final double epsilon
- See Also:
- Constant Field Values
-
tolerance
final double tolerance
If a point is within this distance of a cutting plane, then the code assumes that point exactly lies on the plane.- See Also:
- Constant Field Values
-
big_tolerance_fac
final double big_tolerance_fac
- See Also:
- Constant Field Values
-
default_length
final double default_length
- See Also:
- Constant Field Values
-
large_number
final double large_number
A large number that is used in the computation.- See Also:
- Constant Field Values
-
default_radius
final double default_radius
A radius to use as a placeholder when no other information is available.- See Also:
- Constant Field Values
-
max_unit_voro_shells
final int max_unit_voro_shells
The maximum number of shells of periodic images to test over.- See Also:
- Constant Field Values
-
optimal_particles
final double optimal_particles
A guess for the optimal number of particles per block, used to set up the container grid.- See Also:
- Constant Field Values
-
VOROPP_REPORT_OUT_OF_BOUNDS
final int VOROPP_REPORT_OUT_OF_BOUNDS
If this is set to 1, then the code reports any instances of particles being put outside of the container geometry.- See Also:
- Constant Field Values
-
VOROPP_FILE_ERROR
final int VOROPP_FILE_ERROR
Voro++ returns this status code if there is a file-related error, such as not being able to open file.- See Also:
- Constant Field Values
-
VOROPP_MEMORY_ERROR
final int VOROPP_MEMORY_ERROR
Voro++ returns this status code if there is a memory allocation error, if one of the safe memory limits is exceeded.- See Also:
- Constant Field Values
-
VOROPP_INTERNAL_ERROR
final int VOROPP_INTERNAL_ERROR
Voro++ returns this status code if there is any type of internal error, if it detects that representation of the Voronoi cell is inconsistent. This status code will generally indicate a bug, and the developer should be contacted.- See Also:
- Constant Field Values
-
VOROPP_CMD_LINE_ERROR
final int VOROPP_CMD_LINE_ERROR
Voro++ returns this status code if it could not interpret the command line arguments passed to the command line utility.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Voro
public Voro()
-
Voro
public Voro(boolean help, boolean hc, boolean version, char[] custom_output, boolean gnuplot_output, Voro.blocks_mode bm, double ls, int init_mem, int[] nx, int[] ny, int[] nz, boolean ordered, boolean xperiodic, boolean yperiodic, boolean zperiodic, boolean polydisperse, boolean verbose, int numberRectangularBox, double[] rbw0, double[] rbw1, double[] rbw2, double[] rbw3, double[] rbw4, double[] rbw5, int numberSphereWall, double[] sw0, double[] sw1, double[] sw2, double[] sw3, int numberPlaneWall, double[] pw0, double[] pw1, double[] pw2, double[] pw3, int numberCylinderWall, double[] cyw0, double[] cyw1, double[] cyw2, double[] cyw3, double[] cyw4, double[] cyw5, double[] cyw6, int numberConeWall, double[] cow0, double[] cow1, double[] cow2, double[] cow3, double[] cow4, double[] cow5, double[] cow6, boolean povp_output, boolean povv_output, double ax, double bx, double ay, double by, double az, double bz, java.lang.String fileNameBase)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-
cmd_line_output
void cmd_line_output(Voro.c_loop_order vl, Voro.container_poly_radius_poly con, char[] format, java.io.RandomAccessFile outfile, java.io.RandomAccessFile gnu_file, java.io.RandomAccessFile povp_file, java.io.RandomAccessFile povv_file, boolean verbose, double[] vol, int[] vcc, int[] tp)
-
cmd_line_output
void cmd_line_output(Voro.c_loop_order vl, Voro.container_radius_mono con, char[] format, java.io.RandomAccessFile outfile, java.io.RandomAccessFile gnu_file, java.io.RandomAccessFile povp_file, java.io.RandomAccessFile povv_file, boolean verbose, double[] vol, int[] vcc, int[] tp)
-
cmd_line_output
void cmd_line_output(Voro.c_loop_all vl, Voro.container_poly_radius_poly con, char[] format, java.io.RandomAccessFile outfile, java.io.RandomAccessFile gnu_file, java.io.RandomAccessFile povp_file, java.io.RandomAccessFile povv_file, boolean verbose, double[] vol, int[] vcc, int[] tp)
-
cmd_line_output
void cmd_line_output(Voro.c_loop_all vl, Voro.container_radius_mono con, char[] format, java.io.RandomAccessFile outfile, java.io.RandomAccessFile gnu_file, java.io.RandomAccessFile povp_file, java.io.RandomAccessFile povv_file, boolean verbose, double[] vol, int[] vcc, int[] tp)
-
help_message
void help_message()
-
custom_output_message
void custom_output_message()
-
version_message
void version_message()
-
error_message
void error_message()
-
single_cell
public void single_cell()
-
convex_test
public void convex_test()
-
platonic
public void platonic()
-
importList
public void importList()
-
cylinder
public void cylinder()
-
frustrum
public void frustrum()
-
tetrahedron
public void tetrahedron()
-
torus
public void torus()
-
cell_statistics
public void cell_statistics()
-
custom_output
public void custom_output()
-
radical
public void radical()
-
box_cut
public void box_cut()
-
cut_region
public void cut_region()
-
irregular
public void irregular()
-
I_shape
public void I_shape()
-
superellipsoid
public void superellipsoid()
-
odd_even
public void odd_even()
-
loops
public void loops()
-
draw_polygon
void draw_polygon(java.io.RandomAccessFile fp, java.util.Vector<java.lang.Integer> f_vert, java.util.Vector<java.lang.Double> v, int j)
-
polygons
public void polygons()
-
find_voro_cell
public void find_voro_cell()
-
cylinder_inv
public void cylinder_inv()
-
ellipsoid
public void ellipsoid()
-
has_dodec_sides
public boolean has_dodec_sides(java.util.Vector<java.lang.Integer> vi)
-
finite_sys
public void finite_sys()
-
ghost_test
public void ghost_test()
-
import_nguyen
public void import_nguyen()
-
import_rahman
public void import_rahman()
-
lloyd_box
public void lloyd_box()
-
minkowski
public void minkowski()
-
neigh_test
public void neigh_test()
-
period
public void period()
-
polycrystal_rahman
public void polycrystal_rahman()
-
r_pts_interface
public void r_pts_interface()
-
rad_test
public void rad_test()
-
random_points_10
public void random_points_10()
-
random_points_200
public void random_points_200()
-
single_cell_2d
public void single_cell_2d()
-
sphere
public void sphere()
-
sphere_mesh
public void sphere_mesh()
-
split_cell
public void split_cell()
-
tri_mesh
public void tri_mesh()
-
voro_lf
public void voro_lf()
-
timing_test
public void timing_test()
-
degenerate
public void degenerate()
-
degenerate2
public void degenerate2()
-
check_duplicate
void check_duplicate(int n, double x, double y, double z, int id, double[] qp)
-
voro_fatal_error
void voro_fatal_error(java.lang.String p, int status)\brief Function for printing fatal error messages and exiting. Function for printing fatal error messages and exiting. \param[in] p a pointer to the message to print. \param[in] status the status code to return with.
-
voro_print_positions
void voro_print_positions(java.util.Vector<java.lang.Double> v, java.io.RandomAccessFile raFile)\brief Prints a vector of positions. Prints a vector of positions as bracketed triplets. \param[in] v the vector to print. \param[in] fp the file stream to print to.
-
voro_print_positions_stdout
void voro_print_positions_stdout(java.util.Vector<java.lang.Double> v)
-
safe_fopen
java.io.RandomAccessFile safe_fopen(java.lang.String filename, java.lang.String mode)\brief Opens a file and checks the operation was successful. Opens a file, and checks the return value to ensure that the operation was successful. \param[in] filename the file to open. \param[in] mode the cstdio fopen mode to use. \return The file handle.
-
safe_fopen_file
java.io.File safe_fopen_file(java.lang.String filename)
-
voro_print_vectorInteger
void voro_print_vectorInteger(java.util.Vector<java.lang.Integer> v, java.io.RandomAccessFile raFile)\brief Prints a vector of Integers. Prints a vector of Integers. \param[in] v the vector to print. \param[in] fp the file stream to print to.
-
voro_print_vectorInteger_stdout
void voro_print_vectorInteger_stdout(java.util.Vector<java.lang.Integer> v)
-
voro_print_vectorDouble
void voro_print_vectorDouble(java.util.Vector<java.lang.Double> v, java.io.RandomAccessFile raFile)\brief Prints a vector of doubles. Prints a vector of doubles. \param[in] v the vector to print. \param[in] fp the file stream to print to.
-
voro_print_vectorDouble_stdout
void voro_print_vectorDouble_stdout(java.util.Vector<java.lang.Double> v)
-
voro_print_face_vertices
void voro_print_face_vertices(java.util.Vector<java.lang.Integer> v, java.io.RandomAccessFile raFile)\brief Prints a vector a face vertex information. Prints a vector of face vertex information. A value is read, which corresponds to the number of vertices in the next face. The routine reads this number of values and prints them as a bracked list. This is repeated until the end of the vector is reached. \param[in] v the vector to interpret and print. \param[in] fp the file stream to print to.
-
voro_print_face_vertices_stdout
void voro_print_face_vertices_stdout(java.util.Vector<java.lang.Integer> v)
-
dot_product
static double dot_product(double[] a, int aoffset, double[] b, int boffset)
-
dot_product
static double dot_product(java.util.Vector<java.lang.Double> a, int aoffset, java.util.Vector<java.lang.Double> b, int boffset)
-
cross_product
static void cross_product(double[] a, int aoffset, double[] b, int boffset, double[] c)
-
cross_product
static void cross_product(java.util.Vector<java.lang.Double> a, int aoffset, java.util.Vector<java.lang.Double> b, int boffset, java.util.Vector<java.lang.Double> c)
-
triple_product
static double triple_product(double[] a, int aoffset, double[] b, int boffset, double[] c, int coffset)
-
triple_product
static double triple_product(java.util.Vector<java.lang.Double> a, int aoffset, java.util.Vector<java.lang.Double> b, int boffset, java.util.Vector<java.lang.Double> c, int coffset)
-
normalize_vector
static void normalize_vector(double[] x, int xoffset, double[] normalized, int normoffset)
-
normalize_vector
static void normalize_vector(double[] x, int xoffset, java.util.Vector normalized, int normoffset)
-
calculate_solid_angle
static double calculate_solid_angle(double[] R1, int R1offset, double[] R2, int R2offset, double[] R3, int R3offset)
-
calculate_solid_angle
static double calculate_solid_angle(java.util.Vector<java.lang.Double> R1, int R1offset, java.util.Vector<java.lang.Double> R2, int R2offset, java.util.Vector<java.lang.Double> R3, int R3offset)
-
-