Package gov.nih.mipav.model.structures
Class Voro.container_radius_mono
java.lang.Object
gov.nih.mipav.model.structures.Voro.voro_base_wall_list
gov.nih.mipav.model.structures.Voro.container_base
gov.nih.mipav.model.structures.Voro.container_radius_mono
- Enclosing class:
Voro
\brief Extension of the container_base class for computing regular Voronoi
tessellations.
This class is an extension of the container_base class that has routines
specifically for computing the regular Voronoi tessellation with no
dependence on particle radii.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptioncontainer_radius_mono(double ax_, double bx_, double ay_, double by_, double az_, double bz_, int nx_, int ny_, int nz_, boolean xperiodic_, boolean yperiodic_, boolean zperiodic_, int init_mem) The class constructor sets up the geometry of container. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears a container of particles.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) booleanbooleanbooleanbooleancompute_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.booleanbooleanbooleancompute_ghost_cell(Voro.voronoicell_neighbor c, double x, double y, double z) booleancompute_ghost_cell(Voro.voronoicell c, double x, double y, double z) 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 and positions to a file.voidDumps all of the particle IDs and positions to a file.voiddraw_particles(String filename) Dumps all of the particle IDs and positions to a file.voidDumps particle positions in POV-Ray format.voidDumps all particle positions in POV-Ray format.voiddraw_particles_pov(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, 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.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.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.voidprint_custom(Voro.c_loop_all vl, char[] format, RandomAccessFile fp) Computes the Voronoi cells and saves customized information about them.voidprint_custom(Voro.c_loop_order vl, char[] format, RandomAccessFile fp) voidput(int n, double x, double y, double z) 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.doubleCalculates all of the Voronoi cells and sums their volumes.Methods inherited from class gov.nih.mipav.model.structures.Voro.container_base
add_particle_memory, delete, draw_domain_gnuplot, draw_domain_gnuplot, draw_domain_pov, draw_domain_pov, frac_pos, initialize_search, initialize_voronoicell, initialize_voronoicell, point_inside, put_locate_block, put_remap, region_count, region_index, remap, total_particlesMethods inherited from class gov.nih.mipav.model.structures.Voro.voro_base_wall_list
add_wall, add_wall, apply_walls, apply_walls, compute_minimum, contains_neighbor, contains_neighbor, deallocate, increase_wall_memory, point_inside_walls, step_div, step_int, step_mod
-
Field Details
-
vc
-
-
Constructor Details
-
container_radius_mono
public container_radius_mono(double ax_, double bx_, double ay_, double by_, double az_, double bz_, int nx_, int ny_, int nz_, boolean xperiodic_, boolean yperiodic_, boolean zperiodic_, int init_mem) The class constructor sets up the geometry of container. \param[in] (ax_,bx_) the minimum and maximum x coordinates. \param[in] (ay_,by_) the minimum and maximum y coordinates. \param[in] (az_,bz_) the minimum and maximum z coordinates. \param[in] (nx_,ny_,nz_) the number of grid blocks in each of the three coordinate directions. \param[in] (xperiodic_,yperiodic_,zperiodic_) flags setting whether the container is periodic in each coordinate direction. \param[in] init_mem the initial memory allocation for each block.
-
-
Method Details
-
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
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
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
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
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
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
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
Dumps all of the particle IDs and positions to a file. \param[in] fp a file handle to write to. -
draw_particles
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
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 particle positions in POV-Ray format. \param[in] fp a file handle to write to. -
draw_particles_pov
Dumps all 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. -
print_custom
-
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. This is equivalent to finding the particle which is nearest to the 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. -
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, if it is removed entirely by a wall or boundary condition, then the routine returns false. -
compute_cell
-
compute_cell
-
compute_cell
-
compute_cell
-
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, if it is removed entirely by a wall or boundary condition, 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. \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
-
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.
-