Class Voro.c_loop_base

  • Direct Known Subclasses:
    Voro.c_loop_all, Voro.c_loop_all_periodic, Voro.c_loop_order, Voro.c_loop_order_periodic, Voro.c_loop_subset
    Enclosing class:
    Voro

    class Voro.c_loop_base
    extends java.lang.Object
    \brief Base class for looping over particles in a container. This class forms the base of all classes that can loop over a subset of particles in a contaner in some order. When initialized, it stores constants about the corresponding container geometry. It also contains a number of routines for interrogating which particle currently being considered by the loop, which are common between all of the derived classes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int[] co
      A pointer to the particle counts in the associated container data structure.
      int i
      The current x-index of the block under consideration by the loop.
      int[][] id
      A pointer to the particle ID information in the associated container data structure.
      int ijk
      The current index of the block under consideration by the loop.
      int j
      The current y-index of the block under consideration by the loop.
      int k
      The current z-index of the block under consideration by the loop.
      int nx
      The number of blocks in the x direction.
      int nxy
      A constant, set to the value of nx multiplied by ny, which is used in the routines that step through blocks in sequence.
      int nxyz
      A constant, 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.
      double[][] p
      A pointer to the particle position information in the associated container data structure.
      int ps
      The number of floating point numbers per particle in the associated container data structure.
      int q
      The index of the particle under consideration within the current block.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int pid()
      Returns the ID of the particle currently being considered by the loop.
      void pos​(double[] x, double[] y, double[] z)
      Returns the position vector of the particle currently being considered by the loop.
      void pos​(int[] pid, double[] x, double[] y, double[] z, double[] r)
      Returns the ID, position vector, and radius of the particle currently being considered by the loop.
      double x()
      Returns the x position of the particle currently being considered by the loop.
      double y()
      Returns the y position of the particle currently being considered by the loop.
      double z()
      Returns the z position of the particle currently being considered by the loop.
      • 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 constant, 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 constant, set to the value of nx*ny*nz, which is used in the routines that step through blocks in sequence.
      • ps

        public int ps
        The number of floating point numbers per particle in the associated container data structure.
      • p

        public double[][] p
        A pointer to the particle position information in the associated container data structure.
      • id

        public int[][] id
        A pointer to the particle ID information in the associated container data structure.
      • co

        public int[] co
        A pointer to the particle counts in the associated container data structure.
      • i

        public int i
        The current x-index of the block under consideration by the loop.
      • j

        public int j
        The current y-index of the block under consideration by the loop.
      • k

        public int k
        The current z-index of the block under consideration by the loop.
      • ijk

        public int ijk
        The current index of the block under consideration by the loop.
      • q

        public int q
        The index of the particle under consideration within the current block.
    • Method Detail

      • pos

        public void pos​(double[] x,
                        double[] y,
                        double[] z)
        Returns the position vector of the particle currently being considered by the loop. \param[out] (x,y,z) the position vector of the particle.
      • pos

        public void pos​(int[] pid,
                        double[] x,
                        double[] y,
                        double[] z,
                        double[] r)
        Returns the ID, position vector, and radius of the particle currently being considered by the loop. \param[out] pid the particle ID. \param[out] (x,y,z) the position vector of the particle. \param[out] r the radius of the particle. If no radius information is available the default radius value is returned.
      • x

        public double x()
        Returns the x position of the particle currently being considered by the loop.
      • y

        public double y()
        Returns the y position of the particle currently being considered by the loop.
      • z

        public double z()
        Returns the z position of the particle currently being considered by the loop.
      • pid

        public int pid()
        Returns the ID of the particle currently being considered by the loop.