Package gov.nih.mipav.model.structures
Class Voro.container_periodic_radius_mono
- 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_radius_mono
-
- Enclosing class:
- Voro
class Voro.container_periodic_radius_mono extends Voro.container_periodic_base
\brief Extension of the container_periodic_base class for computing regular Voronoi tessellations. This class is an extension of the container_periodic_base that has routines specifically for computing the regular Voronoi tessellation with no dependence on particle radii.
-
-
Constructor Summary
Constructors Constructor Description container_periodic_radius_mono(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears a container of particles.voidcompute_all_cells()Computes all of the Voronoi cells in the container, but does nothing with the output.booleancompute_cell(Voro.voronoicell_neighbor c, Voro.c_loop_all_periodic vl)booleancompute_cell(Voro.voronoicell c, int ijk, int q)Computes the Voronoi cell for given particle.booleancompute_cell(Voro.voronoicell c, Voro.c_loop_all_periodic vl)Computes the Voronoi cell for a particle currently being referenced by a loop class.booleancompute_ghost_cell(Voro.voronoicell c, double x, double y, double z)Computes the Voronoi cell for a ghost particle at a given location.voiddraw_cells_gnuplot(Voro.c_loop_all_periodic vl, java.io.RandomAccessFile fp)Computes Voronoi cells and saves the output in gnuplot format.voiddraw_cells_gnuplot(java.io.RandomAccessFile fp)Computes all Voronoi cells and saves the output in gnuplot format.voiddraw_cells_gnuplot(java.lang.String filename)Compute all Voronoi cells and saves the output in gnuplot format.voiddraw_cells_pov(Voro.c_loop_all_periodic vl, java.io.RandomAccessFile fp)Computes Voronoi cells and saves the output in POV-Ray format.voiddraw_cells_pov(java.io.RandomAccessFile fp)Computes all Voronoi cells and saves the output in POV-Ray format.voiddraw_cells_pov(java.lang.String filename)Computes all Voronoi cells and saves the output in POV-Ray format.(package private) voiddraw_particles(Voro.c_loop_all_periodic vl, java.io.RandomAccessFile fp)Dumps particle IDs and positions to a file.voiddraw_particles(java.io.RandomAccessFile fp)Dumps all of the particle IDs and positions to a file.voiddraw_particles(java.lang.String filename)Dumps all of the particle IDs and positions to a file.voiddraw_particles_pov(Voro.c_loop_all_periodic vl, java.io.RandomAccessFile fp)Dumps particle positions in POV-Ray format.voiddraw_particles_pov(java.io.RandomAccessFile fp)Dumps all particle positions in POV-Ray format.voiddraw_particles_pov(java.lang.String filename)Dumps all 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, java.io.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, java.lang.String filename)Imports a list of particles from an open file stream into the container.voidimportList(java.io.File fp)Import a list of particles from an open file stream into the container.voidimportList(java.lang.String filename)Imports a list of particles from an open file stream into the container.voidprint_custom(char[] format, java.io.RandomAccessFile fp)Computes all the Voronoi cells and saves customized information about them.voidprint_custom(char[] format, java.lang.String filename)Computes all the Voronoi cells and saves customized information about them.voidprint_custom(Voro.c_loop_all_periodic vl, char[] format, java.io.RandomAccessFile fp)Computes the Voronoi cells and saves customized information about them.voidput(int n, double x, double y, double z)Put a particle into the correct region of the container.voidput(int n, double x, double y, double z, 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)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.doublesum_cell_volumes()Calculates 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, remap
-
Methods 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 Detail
-
vc
private Voro.voro_compute_container_periodic_radius_mono vc
-
-
Constructor Detail
-
container_periodic_radius_mono
public container_periodic_radius_mono(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 Detail
-
clear
public void clear()
Clears a container of particles.
-
put
public void put(int n, double x, double y, double z)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.
-
put
public void put(int n, double x, double y, double z, 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[out] (ai,aj,ak) the periodic image displacement that the particle is in, with (0,0,0) corresponding to the primary domain.
-
put
public void put(Voro.particle_order vo, int n, double x, double y, double z)
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.
-
importList
public void importList(java.io.File fp)
Import a list of particles from an open file stream into the container. Entries of four numbers (Particle ID, x position, y position, z position) 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
public void importList(Voro.particle_order vo, java.io.File fp)
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) 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
public void importList(java.lang.String filename)
Imports a list of particles from an open file stream into the container. Entries of four numbers (Particle ID, x position, y position, z position) 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
public void importList(Voro.particle_order vo, java.lang.String filename)
Imports a list of particles from an open file stream into the container. Entries of four numbers (Particle ID, x position, y position, z position) 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
void draw_particles(Voro.c_loop_all_periodic vl, java.io.RandomAccessFile fp)
Dumps particle IDs and positions to a file. \param[in] vl the loop class to use. \param[in] fp a file handle to write to.
-
draw_particles
public void draw_particles(java.io.RandomAccessFile fp)
Dumps all of the particle IDs and positions to a file. \param[in] fp a file handle to write to.
-
draw_particles
public void draw_particles(java.lang.String filename)
Dumps all of the particle IDs and positions to a file. \param[in] filename the name of the file to write to.
-
draw_particles_pov
public void draw_particles_pov(Voro.c_loop_all_periodic vl, java.io.RandomAccessFile fp)
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
public void draw_particles_pov(java.io.RandomAccessFile fp)
Dumps all particle positions in POV-Ray format. \param[in] fp a file handle to write to.
-
draw_particles_pov
public void draw_particles_pov(java.lang.String filename)
Dumps all particle positions in POV-Ray format. \param[in] filename the name of the file to write to.
-
draw_cells_gnuplot
public void draw_cells_gnuplot(Voro.c_loop_all_periodic vl, java.io.RandomAccessFile fp)
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
public void draw_cells_gnuplot(java.io.RandomAccessFile fp)
Computes all Voronoi cells and saves the output in gnuplot format. \param[in] fp a file handle to write to.
-
draw_cells_gnuplot
public void draw_cells_gnuplot(java.lang.String filename)
Compute all Voronoi cells and saves the output in gnuplot format. \param[in] filename the name of the file to write to.
-
draw_cells_pov
public void draw_cells_pov(Voro.c_loop_all_periodic vl, java.io.RandomAccessFile fp)
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
public void draw_cells_pov(java.io.RandomAccessFile fp)
Computes all Voronoi cells and saves the output in POV-Ray format. \param[in] fp a file handle to write to.
-
draw_cells_pov
public void draw_cells_pov(java.lang.String filename)
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
public void print_custom(Voro.c_loop_all_periodic vl, char[] format, java.io.RandomAccessFile fp)
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.
-
print_custom
public void print_custom(char[] format, java.io.RandomAccessFile fp)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
public void print_custom(char[] format, java.lang.String filename)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. This is equivalent to finding the particle which is nearest to the vector. \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. 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.
-
compute_cell
public boolean compute_cell(Voro.voronoicell c, Voro.c_loop_all_periodic vl)
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
public boolean compute_cell(Voro.voronoicell_neighbor c, Voro.c_loop_all_periodic vl)
-
compute_cell
public boolean compute_cell(Voro.voronoicell c, int ijk, int q)
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_ghost_cell
public boolean compute_ghost_cell(Voro.voronoicell c, double x, double y, double z)
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. \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.
-
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.
-
-