Class Voro.particle_order

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

class Voro.particle_order extends 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[]
    A pointer to the array holding the ordering.
    int
    A pointer to the next position in the ordering array in which to store an entry.
    int
     
    int
    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

    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
    Extends the memory available for storing the ordering.
    void
    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 Details

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

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

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