Class Voro.particle_order

  • Enclosing class:
    Voro

    class Voro.particle_order
    extends java.lang.Object
    \brief A class for storing ordering information when particles are added to a container. When particles are added to a container class, they are sorted into an internal computational grid of blocks. The particle_order class provides a mechanism for remembering which block particles were sorted into. The import and put routines in the container class have variants that also take a particle_order class. Each time they are called, they will store the block that the particle was sorted into, plus the position of the particle within the block. The particle_order class can used by the c_loop_order class to specifically loop over the particles that have their information stored within it.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int[] o
      A pointer to the array holding the ordering.
      int o_index
      A pointer to the next position in the ordering array in which to store an entry.
      int op  
      int size
      The current memory allocation for the class, set to the number of entries which can be stored.
    • Constructor Summary

      Constructors 
      Constructor Description
      particle_order​(int init_size)
      The particle_order constructor allocates memory to store the ordering information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int ijk, int q)
      Adds a record to the order, corresponding to the memory address of where a particle was placed into the container.
      private void add_ordering_memory()
      Extends the memory available for storing the ordering.
      void delete()
      The particle_order destructor frees the dynamically allocated memory used to store the ordering information.
      • Methods inherited from class java.lang.Object

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

      • o

        public int[] o
        A pointer to the array holding the ordering.
      • o_index

        public int o_index
        A pointer to the next position in the ordering array in which to store an entry.
      • op

        public int op
      • size

        public int size
        The current memory allocation for the class, set to the number of entries which can be stored.
    • Constructor Detail

      • particle_order

        public particle_order​(int init_size)
        The particle_order constructor allocates memory to store the ordering information. \param[in] init_size the initial amount of memory to allocate.
    • Method Detail

      • delete

        public void delete()
        The particle_order destructor frees the dynamically allocated memory used to store the ordering information.
      • add

        public void add​(int ijk,
                        int q)
        Adds a record to the order, corresponding to the memory address of where a particle was placed into the container. \param[in] ijk the block into which the particle was placed. \param[in] q the position within the block where the particle was placed.
      • add_ordering_memory

        private void add_ordering_memory()
        Extends the memory available for storing the ordering.