Package gov.nih.mipav.model.structures
Class Voro.voro_base_unitcell
java.lang.Object
gov.nih.mipav.model.structures.Voro.voro_base_unitcell
- Direct Known Subclasses:
Voro.container_periodic_base
- Enclosing class:
Voro
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe size of a computational block in the x direction.doubleThe size of a computational block in the y direction.doubleThe size of a computational block in the z direction.doubleThe x coordinate of the first vector defining the periodic domain.doubleThe x coordinate of the second vector defining the periodic domain.doubleThe x coordinate of the third vector defining the periodic domain.doubleThe y coordinate of the second vector defining the periodic domain.doubleThe y coordinate of the third vector defining the periodic domain.doubleThe z coordinate of the third vector defining the periodic domain.protected doubleThe maximum y-coordinate that could possibly cut the computed unit Voronoi cell.protected doubleThe maximum z-coordinate that could possibly cut the computed unit Voronoi cell.double[]An array to hold the minimum distances associated with the worklists.intThe number of blocks in the x direction.intA finalant, set to the value of nx multiplied by ny, which is used in the routines that step through blocks in sequence.intA finalant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence.intThe number of blocks in the y direction.intThe number of blocks in the z direction.The computed unit Voronoi cell corresponding the given 3D non-rectangular periodic domain geometry.doubleThe inverse box length in the x direction.doubleThe inverse box length in the y direction.doubleThe inverse box length in the z direction. -
Constructor Summary
ConstructorsConstructorDescriptionvoro_base_unitcell(double bx_, double bxy_, double by_, double bxz_, double byz_, double bz_) Initializes the unit cell class for a particular non-orthogonal periodic geometry, corresponding to a parallelepiped with sides given by three vectors.voro_base_unitcell(double bx_, double bxy_, double by_, double bxz_, double byz_, double bz_, int nx_, int ny_, int nz_, double boxx_, double boxy_, double boxz_) voro_base_unitcell(int nx_, int ny_, int nz_, double boxx_, double boxy_, double boxz_) This function is called during container finalruction. -
Method Summary
Modifier and TypeMethodDescription(package private) voidcompute_minimum(double[] minr, double xlo, double xhi, double ylo, double yhi, double zlo, double zhi, int ti, int tj, int tk) Computes the minimum distance from a subregion to a given block.(package private) booleancontains_neighbor(byte[] format) Checks to see whether "%n" appears in a format sequence to determine whether neighbor information is required or not.(package private) booleancontains_neighbor(char[] format) voidDraws the periodic domain in gnuplot format.voiddraw_domain_gnuplot(String filename) Draws an outline of the domain in Gnuplot format.voidDraws the periodic domain in POV-Ray format.voiddraw_domain_pov(String filename) voidComputes a list of periodic domain images that intersect the unit Voronoi cell.booleanintersects_image(double dx, double dy, double dz, double[] vol) Calculates whether the unit Voronoi cell intersects a given periodic image of the domain.protected intstep_div(int a, int b) A custom Double division function that returns consistent stepping for negative numbers.protected intstep_int(double a) A custom int function that returns consistent stepping for negative numbers, so that (-1.5, -0.5, 0.5, 1.5) maps to (-2,-1,0,1).protected intstep_mod(int a, int b) A custom modulo function that returns consistent stepping for negative numbers.private voidunit_voro_apply(int i, int j, int k) Applies a pair of opposing plane cuts from a periodic image point to the unit Voronoi cell.private booleanunit_voro_intersect(int l) Tests to see if a shell of periodic images could possibly cut the periodic unit cell.private booleanunit_voro_test(int i, int j, int k) Tests to see if a plane cut from a particular periodic image will cut th unit Voronoi cell.
-
Field Details
-
nx
public int nxThe number of blocks in the x direction. -
ny
public int nyThe number of blocks in the y direction. -
nz
public int nzThe number of blocks in the z direction. -
nxy
public int nxyA finalant, set to the value of nx multiplied by ny, which is used in the routines that step through blocks in sequence. -
nxyz
public int nxyzA finalant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence. -
boxx
public double boxxThe size of a computational block in the x direction. -
boxy
public double boxyThe size of a computational block in the y direction. -
boxz
public double boxzThe size of a computational block in the z direction. -
xsp
public double xspThe inverse box length in the x direction. -
ysp
public double yspThe inverse box length in the y direction. -
zsp
public double zspThe inverse box length in the z direction. -
mrad
public double[] mradAn array to hold the minimum distances associated with the worklists. This array is initialized during container finalruction, by the initialize_radii() routine. -
bx
public double bxThe x coordinate of the first vector defining the periodic domain. -
bxy
public double bxyThe x coordinate of the second vector defining the periodic domain. -
by
public double byThe y coordinate of the second vector defining the periodic domain. -
bxz
public double bxzThe x coordinate of the third vector defining the periodic domain. -
byz
public double byzThe y coordinate of the third vector defining the periodic domain. -
bz
public double bzThe z coordinate of the third vector defining the periodic domain. -
unit_voro
The computed unit Voronoi cell corresponding the given 3D non-rectangular periodic domain geometry. -
max_uv_y
protected double max_uv_yThe maximum y-coordinate that could possibly cut the computed unit Voronoi cell. -
max_uv_z
protected double max_uv_zThe maximum z-coordinate that could possibly cut the computed unit Voronoi cell.
-
-
Constructor Details
-
voro_base_unitcell
public voro_base_unitcell(int nx_, int ny_, int nz_, double boxx_, double boxy_, double boxz_) This function is called during container finalruction. The routine scans all of the worklists in the wl[] array. For a given worklist of blocks labeled \f$w_1\f$ to \f$w_n\f$, it computes a sequence \f$r_0\f$ to \f$r_n\f$ so that $r_i$ is the minimum distance to all the blocks \f$w_{j}\f$ where \f$j>i\f$ and all blocks outside the worklist. The values of \f$r_n\f$ is calculated first, as the minimum distance to any block in the shell surrounding the worklist. The \f$r_i\f$ are then computed in reverse order by considering the distance to \f$w_{i+1}\f$. -
voro_base_unitcell
public voro_base_unitcell(double bx_, double bxy_, double by_, double bxz_, double byz_, double bz_) Initializes the unit cell class for a particular non-orthogonal periodic geometry, corresponding to a parallelepiped with sides given by three vectors. The class constructs the unit Voronoi cell corresponding to this geometry. \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. -
voro_base_unitcell
public voro_base_unitcell(double bx_, double bxy_, double by_, double bxz_, double byz_, double bz_, int nx_, int ny_, int nz_, double boxx_, double boxy_, double boxz_)
-
-
Method Details
-
step_int
protected int step_int(double a) A custom int function that returns consistent stepping for negative numbers, so that (-1.5, -0.5, 0.5, 1.5) maps to (-2,-1,0,1). \param[in] a the number to consider. \return The value of the custom int operation. -
step_mod
protected int step_mod(int a, int b) A custom modulo function that returns consistent stepping for negative numbers. For example, (-2,-1,0,1,2) step_mod 2 is (0,1,0,1,0). \param[in] (a,b) the input Doubles. \return The value of a modulo b, consistent for negative numbers. -
step_div
protected int step_div(int a, int b) A custom Double division function that returns consistent stepping for negative numbers. For example, (-2,-1,0,1,2) step_div 2 is (-1,-1,0,0,1). \param[in] (a,b) the input Doubles. \return The value of a div b, consistent for negative numbers. -
compute_minimum
void compute_minimum(double[] minr, double xlo, double xhi, double ylo, double yhi, double zlo, double zhi, int ti, int tj, int tk) Computes the minimum distance from a subregion to a given block. If this distance is smaller than the value of minr, then it passes \param[in,out] minr a pointer to the current minimum distance. If the distance computed in this function is smaller, then this distance is set to the new one. \param[out] (xlo,ylo,zlo) the lower coordinates of the subregion being considered. \param[out] (xhi,yhi,zhi) the upper coordinates of the subregion being considered. \param[in] (ti,tj,tk) the coordinates of the block. -
contains_neighbor
boolean contains_neighbor(byte[] format) Checks to see whether "%n" appears in a format sequence to determine whether neighbor information is required or not. \param[in] format the format string to check. \return True if a "%n" is found, false otherwise. -
contains_neighbor
boolean contains_neighbor(char[] format) -
draw_domain_gnuplot
Draws an outline of the domain in Gnuplot format. \param[in] filename the filename to write to. -
draw_domain_gnuplot
Draws the periodic domain in gnuplot format. \param[in] fp the file handle to write to. -
draw_domain_pov
-
draw_domain_pov
Draws the periodic domain in POV-Ray format. \param[in] fp the file handle to write to. -
intersects_image
public boolean intersects_image(double dx, double dy, double dz, double[] vol) Calculates whether the unit Voronoi cell intersects a given periodic image of the domain. \param[in] (dx,dy,dz) the displacement of the periodic image. \param[out] vol the proportion of the unit cell volume within this image, only computed in the case that the two intersect. \return True if they intersect, false otherwise. -
images
Computes a list of periodic domain images that intersect the unit Voronoi cell. \param[out] vi a vector containing triplets (i,j,k) corresponding to domain images that intersect the unit Voronoi cell, when it is centered in the middle of the primary domain. \param[out] vd a vector containing the fraction of the Voronoi cell volume within each corresponding image listed in vi. -
unit_voro_apply
private void unit_voro_apply(int i, int j, int k) Applies a pair of opposing plane cuts from a periodic image point to the unit Voronoi cell. \param[in] (i,j,k) the index of the periodic image to consider. -
unit_voro_intersect
private boolean unit_voro_intersect(int l) Tests to see if a shell of periodic images could possibly cut the periodic unit cell. \param[in] l the index of the shell to consider. \return True if a point in the shell cuts the cell, false otherwise. -
unit_voro_test
private boolean unit_voro_test(int i, int j, int k) Tests to see if a plane cut from a particular periodic image will cut th unit Voronoi cell. \param[in] (i,j,k) the index of the periodic image to consider. \return True if the image cuts the cell, false otherwise.
-