Package gov.nih.mipav.model.structures
Class Voro.container_periodic_poly_radius_poly
java.lang.Object
gov.nih.mipav.model.structures.Voro.voro_base_unitcell
gov.nih.mipav.model.structures.Voro.container_periodic_base
gov.nih.mipav.model.structures.Voro.container_periodic_poly_radius_poly
- Enclosing class:
Voro
\brief Extension of the container_periodic_base class for computing radical
Voronoi tessellations.
This class is an extension of container_periodic_base that has routines
specifically for computing the radical Voronoi tessellation that depends
on the particle radii.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe current maximum radius of any particle, used to determine when to cut off the radical Voronoi computation.double[][]A two-dimensional array holding particle positions and radii.private doubleprivate doubleprivate double -
Constructor Summary
ConstructorsConstructorDescriptioncontainer_periodic_poly_radius_poly(double bx_, double bxy_, double by_, double bxz_, double byz_, double bz_, int nx_, int ny_, int nz_, int init_mem_) The class constructor sets up the geometry of container. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears a container of particles, also clearing resetting the maximum radius to zero.voidComputes all of the Voronoi cells in the container, but does nothing with the output.booleancompute_cell(Voro.voronoicell_neighbor c, int ijk, int q) booleanbooleancompute_cell(Voro.voronoicell c, int ijk, int q) Computes the Voronoi cell for given particle.booleanComputes the Voronoi cell for a particle currently being referenced by a loop class.booleancompute_ghost_cell(Voro.voronoicell_neighbor c, double x, double y, double z, double r) booleancompute_ghost_cell(Voro.voronoicell c, double x, double y, double z, double r) Computes the Voronoi cell for a ghost particle at a given location.voidComputes Voronoi cells and saves the output in gnuplot format.voidComputes all Voronoi cells and saves the output in gnuplot format.voiddraw_cells_gnuplot(String filename) Computes all Voronoi cells and saves the output in gnuplot format.voidComputes Voronoi cells and saves the output in POV-Ray format.voidComputes all Voronoi cells and saves the output in POV-Ray format.voiddraw_cells_pov(String filename) Computes all Voronoi cells and saves the output in POV-Ray format.voidDumps particle IDs, positions and radii to a file.voidDumps all of the particle IDs, positions and radii to a file.voiddraw_particles(String filename) Dumps all of the particle IDs, positions and radii to a file.voidDumps particle positions in POV-Ray format.voidDumps all the particle positions in POV-Ray format.voiddraw_particles_pov(String filename) Dumps all the particle positions in POV-Ray format.booleanfind_voronoi_cell(double x, double y, double z, double[] rx, double[] ry, double[] rz, int[] pid) Takes a vector and finds the particle whose Voronoi cell contains that vector.voidimportList(Voro.particle_order vo, File fp) Import a list of particles from an open file stream, also storing the order of that the particles are read.voidimportList(Voro.particle_order vo, String filename) Imports a list of particles from an open file stream into the container_poly class.voidimportList(File fp) Import a list of particles from an open file stream into the container.voidimportList(String filename) Imports a list of particles from an open file stream into the container_poly class.voidprint_custom(char[] format, RandomAccessFile fp) Computes all the Voronoi cells and saves customized information about them.voidprint_custom(char[] format, String filename) Computes all the Voronoi cells and saves customized information about them \param[in] format the custom output string to use.voidprint_custom(Voro.c_loop_all_periodic vl, char[] format, RandomAccessFile fp) Computes the Voronoi cells and saves customized information about them.voidput(int n, double x, double y, double z, double r) Put a particle into the correct region of the container.voidput(int n, double x, double y, double z, double r, int[] ai, int[] aj, int[] ak) Put a particle into the correct region of the container.voidput(Voro.particle_order vo, int n, double x, double y, double z, double r) Put a particle into the correct region of the container, also recording into which region it was stored.protected booleanr_ctest(double crs, double mrs) Carries out a radius bounds check.protected doubler_current_sub(double rs, int ijk, int q) Subtracts the radius squared of a particle from a given value.protected doubler_cutoff(double lrs) Scales a plane displacement during a plane bounds check.protected voidr_init(int ijk, int s) This is called prior to computing a Voronoi cell for a given particle to initialize any required constants.protected doubler_max_add(double rs) Adds the maximum radius squared to a given value.protected voidr_prime(double rv) Sets a required constant to be used when carrying out a plane bounds check.protected doubler_scale(double rs, int ijk, int q) Scales a plane displacement prior to use in the plane cutting algorithm.protected booleanr_scale_check(double[] rs, double mrs, int ijk, int q) Scales a plane displacement prior to use in the plane cutting algorithm, and also checks if it could possibly cut the cell.voidThe class constructor sets the maximum particle radius to be zero.doubleCalculates all of the Voronoi cells and sums their volumes.Methods inherited from class gov.nih.mipav.model.structures.Voro.container_periodic_base
add_particle_memory, check_compartmentalized, create_all_images, create_periodic_image, create_side_image, create_vertical_image, delete, frac_pos, initialize_search, initialize_voronoicell, initialize_voronoicell, print_all_particles, put_image, put_locate_block, put_locate_block, region_count, region_index, remapMethods inherited from class gov.nih.mipav.model.structures.Voro.voro_base_unitcell
compute_minimum, contains_neighbor, contains_neighbor, draw_domain_gnuplot, draw_domain_gnuplot, draw_domain_pov, draw_domain_pov, images, intersects_image, step_div, step_int, step_mod
-
Field Details
-
vc
-
ppr
public double[][] pprA two-dimensional array holding particle positions and radii. -
max_radius
public double max_radiusThe current maximum radius of any particle, used to determine when to cut off the radical Voronoi computation. -
r_rad
private double r_rad -
r_mul
private double r_mul -
r_val
private double r_val
-
-
Constructor Details
-
container_periodic_poly_radius_poly
public container_periodic_poly_radius_poly(double bx_, double bxy_, double by_, double bxz_, double byz_, double bz_, int nx_, int ny_, int nz_, int init_mem_) The class constructor sets up the geometry of container. \param[in] (bx_) The x coordinate of the first unit vector. \param[in] (bxy_,by_) The x and y coordinates of the second unit vector. \param[in] (bxz_,byz_,bz_) The x, y, and z coordinates of the third unit vector. \param[in] (nx_,ny_,nz_) the number of grid blocks in each of the three coordinate directions. \param[in] init_mem_ the initial memory allocation for each block.
-
-
Method Details
-
clear
public void clear()Clears a container of particles, also clearing resetting the maximum radius to zero. -
put
public void put(int n, double x, double y, double z, double r) Put a particle into the correct region of the container. \param[in] n the numerical ID of the inserted particle. \param[in] (x,y,z) the position vector of the inserted particle. \param[in] r the radius of the particle. -
put
public void put(int n, double x, double y, double z, double r, int[] ai, int[] aj, int[] ak) Put a particle into the correct region of the container. \param[in] n the numerical ID of the inserted particle. \param[in] (x,y,z) the position vector of the inserted particle. \param[in] r the radius of the particle. \param[out] (ai,aj,ak) the periodic image displacement that the particle is in, with (0,0,0) corresponding to the primary domain. -
put
Put a particle into the correct region of the container, also recording into which region it was stored. \param[in] vo the ordering class in which to record the region. \param[in] n the numerical ID of the inserted particle. \param[in] (x,y,z) the position vector of the inserted particle. \param[in] r the radius of the particle. -
importList
Import a list of particles from an open file stream into the container. Entries of five numbers (Particle ID, x position, y position, z position, radius) are searched for. If the file cannot be successfully read, then the routine causes a fatal error. \param[in] fp the file handle to read from. -
importList
Import a list of particles from an open file stream, also storing the order of that the particles are read. Entries of four numbers (Particle ID, x position, y position, z position, radius) are searched for. If the file cannot be successfully read, then the routine causes a fatal error. \param[in,out] vo a reference to an ordering class to use. \param[in] fp the file handle to read from. -
importList
Imports a list of particles from an open file stream into the container_poly class. Entries of five numbers (Particle ID, x position, y position, z position, radius) are searched for. If the file cannot be successfully read, then the routine causes a fatal error. \param[in] filename the name of the file to open and read from. -
importList
Imports a list of particles from an open file stream into the container_poly class. Entries of five numbers (Particle ID, x position, y position, z position, radius) are searched for. In addition, the order in which particles are read is saved into an ordering class. If the file cannot be successfully read, then the routine causes a fatal error. \param[in,out] vo the ordering class to use. \param[in] filename the name of the file to open and read from. -
compute_all_cells
public void compute_all_cells()Computes all of the Voronoi cells in the container, but does nothing with the output. It is useful for measuring the pure computation time of the Voronoi algorithm, without any additional calculations such as volume evaluation or cell output. -
sum_cell_volumes
public double sum_cell_volumes()Calculates all of the Voronoi cells and sums their volumes. In most cases without walls, the sum of the Voronoi cell volumes should equal the volume of the container to numerical precision. \return The sum of all of the computed Voronoi volumes. -
draw_particles
Dumps particle IDs, positions and radii to a file. \param[in] vl the loop class to use. \param[in] fp a file handle to write to. -
draw_particles
Dumps all of the particle IDs, positions and radii to a file. \param[in] fp a file handle to write to. -
draw_particles
Dumps all of the particle IDs, positions and radii to a file. \param[in] filename the name of the file to write to. -
draw_particles_pov
Dumps particle positions in POV-Ray format. \param[in] vl the loop class to use. \param[in] fp a file handle to write to. -
draw_particles_pov
Dumps all the particle positions in POV-Ray format. \param[in] fp a file handle to write to. -
draw_particles_pov
Dumps all the particle positions in POV-Ray format. \param[in] filename the name of the file to write to. -
draw_cells_gnuplot
Computes Voronoi cells and saves the output in gnuplot format. \param[in] vl the loop class to use. \param[in] fp a file handle to write to. -
draw_cells_gnuplot
Computes all Voronoi cells and saves the output in gnuplot format. \param[in] fp a file handle to write to. -
draw_cells_gnuplot
Computes all Voronoi cells and saves the output in gnuplot format. \param[in] filename the name of the file to write to. -
draw_cells_pov
Computes Voronoi cells and saves the output in POV-Ray format. \param[in] vl the loop class to use. \param[in] fp a file handle to write to. -
draw_cells_pov
Computes all Voronoi cells and saves the output in POV-Ray format. \param[in] fp a file handle to write to. -
draw_cells_pov
Computes all Voronoi cells and saves the output in POV-Ray format. \param[in] filename the name of the file to write to. -
print_custom
Computes the Voronoi cells and saves customized information about them. \param[in] vl the loop class to use. \param[in] format the custom output string to use. \param[in] fp a file handle to write to. -
compute_cell
Computes the Voronoi cell for a particle currently being referenced by a loop class. \param[out] c a Voronoi cell class in which to store the computed cell. \param[in] vl the loop class to use. \return True if the cell was computed. If the cell cannot be computed because it was removed entirely for some reason, then the routine returns false. -
compute_cell
-
compute_cell
Computes the Voronoi cell for given particle. \param[out] c a Voronoi cell class in which to store the computed cell. \param[in] ijk the block that the particle is within. \param[in] q the index of the particle within the block. \return True if the cell was computed. If the cell cannot be computed because it was removed entirely for some reason, then the routine returns false. -
compute_cell
-
compute_ghost_cell
Computes the Voronoi cell for a ghost particle at a given location. \param[out] c a Voronoi cell class in which to store the computed cell. \param[in] (x,y,z) the location of the ghost particle. \param[in] r the radius of the ghost particle. \return True if the cell was computed. If the cell cannot be computed, if it is removed entirely by a wall or boundary condition, then the routine returns false. -
compute_ghost_cell
public boolean compute_ghost_cell(Voro.voronoicell_neighbor c, double x, double y, double z, double r) -
print_custom
Computes all the Voronoi cells and saves customized information about them. \param[in] format the custom output string to use. \param[in] fp a file handle to write to. -
print_custom
Computes all the Voronoi cells and saves customized information about them \param[in] format the custom output string to use. \param[in] filename the name of the file to write to. -
find_voronoi_cell
public boolean find_voronoi_cell(double x, double y, double z, double[] rx, double[] ry, double[] rz, int[] pid) Takes a vector and finds the particle whose Voronoi cell contains that vector. Additional wall classes are not considered by this routine. \param[in] (x,y,z) the vector to test. \param[out] (rx,ry,rz) the position of the particle whose Voronoi cell contains the vector. If the container is periodic, this may point to a particle in a periodic image of the primary domain. \param[out] pid the ID of the particle. \return True if a particle was found. If the container has no particles, then the search will not find a Voronoi cell and false is returned. -
radius_poly
public void radius_poly()The class constructor sets the maximum particle radius to be zero. -
r_init
protected void r_init(int ijk, int s) This is called prior to computing a Voronoi cell for a given particle to initialize any required constants. \param[in] ijk the block that the particle is within. \param[in] s the index of the particle within the block. -
r_prime
protected void r_prime(double rv) Sets a required constant to be used when carrying out a plane bounds check. -
r_ctest
protected boolean r_ctest(double crs, double mrs) Carries out a radius bounds check. \param[in] crs the radius squared to be tested. \param[in] mrs the current maximum distance to a Voronoi vertex multiplied by two. \return True if particles at this radius could not possibly cut the cell, false otherwise. -
r_cutoff
protected double r_cutoff(double lrs) Scales a plane displacement during a plane bounds check. \param[in] lrs the plane displacement. \return The scaled value. -
r_max_add
protected double r_max_add(double rs) Adds the maximum radius squared to a given value. \param[in] rs the value to consider. \return The value with the radius squared added. -
r_current_sub
protected double r_current_sub(double rs, int ijk, int q) Subtracts the radius squared of a particle from a given value. \param[in] rs the value to consider. \param[in] ijk the block that the particle is within. \param[in] q the index of the particle within the block. \return The value with the radius squared subtracted. -
r_scale
protected double r_scale(double rs, int ijk, int q) Scales a plane displacement prior to use in the plane cutting algorithm. \param[in] rs the initial plane displacement. \param[in] ijk the block that the particle is within. \param[in] q the index of the particle within the block. \return The scaled plane displacement. -
r_scale_check
protected boolean r_scale_check(double[] rs, double mrs, int ijk, int q) Scales a plane displacement prior to use in the plane cutting algorithm, and also checks if it could possibly cut the cell. \param[in,out] rs the plane displacement to be scaled. \param[in] mrs the current maximum distance to a Voronoi vertex multiplied by two. \param[in] ijk the block that the particle is within. \param[in] q the index of the particle within the block. \return True if the cell could possibly cut the cell, false otherwise.
-