Class Voro.unitcell

  • Enclosing class:
    Voro

    class Voro.unitcell
    extends java.lang.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 bx
      The x coordinate of the first vector defining the periodic domain.
      double bxy
      The x coordinate of the second vector defining the periodic domain.
      double bxz
      The x coordinate of the third vector defining the periodic domain.
      double by
      The y coordinate of the second vector defining the periodic domain.
      double byz
      The y coordinate of the third vector defining the periodic domain.
      double bz
      The z coordinate of the third vector defining the periodic domain.
      protected double max_uv_y
      The maximum y-coordinate that could possibly cut the computed unit Voronoi cell.
      protected double max_uv_z
      The maximum z-coordinate that could possibly cut the computed unit Voronoi cell.
      Voro.voronoicell unit_voro
      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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw_domain_gnuplot​(java.io.RandomAccessFile fp)
      Draws the periodic domain in gnuplot format.
      void draw_domain_gnuplot​(java.lang.String filename)
      Draws an outline of the domain in Gnuplot format.
      void draw_domain_pov​(java.io.RandomAccessFile fp)
      Draws the periodic domain in POV-Ray format.
      void draw_domain_pov​(java.lang.String filename)  
      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.
      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 unit_voro_intersect​(int l)
      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 Detail

      • 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

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

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