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
class Voro.voro_base_unitcell extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description doubleboxxThe size of a computational block in the x direction.doubleboxyThe size of a computational block in the y direction.doubleboxzThe size of a computational block in the z direction.doublebxThe x coordinate of the first vector defining the periodic domain.doublebxyThe x coordinate of the second vector defining the periodic domain.doublebxzThe x coordinate of the third vector defining the periodic domain.doublebyThe y coordinate of the second vector defining the periodic domain.doublebyzThe y coordinate of the third vector defining the periodic domain.doublebzThe z coordinate of the third vector defining the periodic domain.protected doublemax_uv_yThe maximum y-coordinate that could possibly cut the computed unit Voronoi cell.protected doublemax_uv_zThe maximum z-coordinate that could possibly cut the computed unit Voronoi cell.double[]mradAn array to hold the minimum distances associated with the worklists.intnxThe number of blocks in the x direction.intnxyA finalant, set to the value of nx multiplied by ny, which is used in the routines that step through blocks in sequence.intnxyzA finalant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence.intnyThe number of blocks in the y direction.intnzThe number of blocks in the z direction.Voro.voronoicellunit_voroThe computed unit Voronoi cell corresponding the given 3D non-rectangular periodic domain geometry.doublexspThe inverse box length in the x direction.doubleyspThe inverse box length in the y direction.doublezspThe inverse box length in the z direction.
-
Constructor Summary
Constructors Constructor Description 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.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (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)voiddraw_domain_gnuplot(java.io.RandomAccessFile fp)Draws the periodic domain in gnuplot format.voiddraw_domain_gnuplot(java.lang.String filename)Draws an outline of the domain in Gnuplot format.voiddraw_domain_pov(java.io.RandomAccessFile fp)Draws the periodic domain in POV-Ray format.voiddraw_domain_pov(java.lang.String filename)voidimages(java.util.Vector<java.lang.Integer> vi, java.util.Vector<java.lang.Double> vd)Computes 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 Detail
-
nx
public int nx
The number of blocks in the x direction.
-
ny
public int ny
The number of blocks in the y direction.
-
nz
public int nz
The number of blocks in the z direction.
-
nxy
public int nxy
A 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 nxyz
A finalant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence.
-
boxx
public double boxx
The size of a computational block in the x direction.
-
boxy
public double boxy
The size of a computational block in the y direction.
-
boxz
public double boxz
The size of a computational block in the z direction.
-
xsp
public double xsp
The inverse box length in the x direction.
-
ysp
public double ysp
The inverse box length in the y direction.
-
zsp
public double zsp
The inverse box length in the z direction.
-
mrad
public double[] mrad
An 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 bx
The x coordinate of the first vector defining the periodic domain.
-
bxy
public double bxy
The x coordinate of the second vector defining the periodic domain.
-
by
public double by
The y coordinate of the second vector defining the periodic domain.
-
bxz
public double bxz
The x coordinate of the third vector defining the periodic domain.
-
byz
public double byz
The y coordinate of the third vector defining the periodic domain.
-
bz
public double bz
The z coordinate of the third vector defining the periodic domain.
-
unit_voro
public Voro.voronoicell unit_voro
The computed unit Voronoi cell corresponding the given 3D non-rectangular periodic domain geometry.
-
max_uv_y
protected double max_uv_y
The maximum y-coordinate that could possibly cut the computed unit Voronoi cell.
-
max_uv_z
protected double max_uv_z
The maximum z-coordinate that could possibly cut the computed unit Voronoi cell.
-
-
Constructor Detail
-
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 Detail
-
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
public void draw_domain_gnuplot(java.lang.String filename)
Draws an outline of the domain in Gnuplot format. \param[in] filename the filename to write to.
-
draw_domain_gnuplot
public void draw_domain_gnuplot(java.io.RandomAccessFile fp)
Draws the periodic domain in gnuplot format. \param[in] fp the file handle to write to.
-
draw_domain_pov
public void draw_domain_pov(java.lang.String filename)
-
draw_domain_pov
public void draw_domain_pov(java.io.RandomAccessFile fp)
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
public void images(java.util.Vector<java.lang.Integer> vi, java.util.Vector<java.lang.Double> vd)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.
-
-