Package gov.nih.mipav.model.structures
Class Voro.particle_order
java.lang.Object
gov.nih.mipav.model.structures.Voro.particle_order
- Enclosing class:
Voro
\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 -
Constructor Summary
ConstructorsConstructorDescriptionparticle_order(int init_size) The particle_order constructor allocates memory to store the ordering information. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(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 voidExtends the memory available for storing the ordering.voiddelete()The particle_order destructor frees the dynamically allocated memory used to store the ordering information.
-
Field Details
-
o
public int[] oA pointer to the array holding the ordering. -
o_index
public int o_indexA pointer to the next position in the ordering array in which to store an entry. -
op
public int op -
size
public int sizeThe 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.
-