Class Voro.unitcell

java.lang.Object
gov.nih.mipav.model.structures.Voro.unitcell
Enclosing class:
Voro

class Voro.unitcell extends Object
\brief Class for computation of the unit Voronoi cell associated with a 3D non-rectangular periodic domain.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    The x coordinate of the first vector defining the periodic domain.
    double
    The x coordinate of the second vector defining the periodic domain.
    double
    The x coordinate of the third vector defining the periodic domain.
    double
    The y coordinate of the second vector defining the periodic domain.
    double
    The y coordinate of the third vector defining the periodic domain.
    double
    The z coordinate of the third vector defining the periodic domain.
    protected double
    The maximum y-coordinate that could possibly cut the computed unit Voronoi cell.
    protected double
    The maximum z-coordinate that could possibly cut the computed unit Voronoi cell.
    The computed unit Voronoi cell corresponding the given 3D non-rectangular periodic domain geometry.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Draws the periodic domain in gnuplot format.
    void
    Draws an outline of the domain in Gnuplot format.
    void
    Draws the periodic domain in POV-Ray format.
    void
     
    void
    Computes a list of periodic domain images that intersect the unit Voronoi cell.
    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.
    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.
    private boolean
    Tests to see if a shell of periodic images could possibly cut the periodic unit cell.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 Details

    • unitcell

      public 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.
  • Method Details

    • draw_domain_gnuplot

      public void draw_domain_gnuplot(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(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(String filename)
    • draw_domain_pov

      public void draw_domain_pov(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(Vector<Integer> vi, Vector<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.