Class Voro.voro_base_unitcell

    • Field Summary

      Fields 
      Modifier and Type Field Description
      double boxx
      The size of a computational block in the x direction.
      double boxy
      The size of a computational block in the y direction.
      double boxz
      The size of a computational block in the z direction.
      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.
      double[] mrad
      An array to hold the minimum distances associated with the worklists.
      int nx
      The number of blocks in the x direction.
      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.
      int nxyz
      A finalant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence.
      int ny
      The number of blocks in the y direction.
      int nz
      The number of blocks in the z direction.
      Voro.voronoicell unit_voro
      The computed unit Voronoi cell corresponding the given 3D non-rectangular periodic domain geometry.
      double xsp
      The inverse box length in the x direction.
      double ysp
      The inverse box length in the y direction.
      double zsp
      The 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) 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.
      (package private) boolean contains_neighbor​(byte[] format)
      Checks to see whether "%n" appears in a format sequence to determine whether neighbor information is required or not.
      (package private) boolean contains_neighbor​(char[] format)  
      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.
      protected int step_div​(int a, int b)
      A custom Double division function that returns consistent stepping for negative numbers.
      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).
      protected int step_mod​(int a, int b)
      A custom modulo function that returns consistent stepping for negative numbers.
      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

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