DEMutilities. particle_initialisation

In order to be able to use this module import it like this:

import DEMutilities.particle_initialisation
#or assign it to a shorter name
import DEMutilities.particle_initialisation as par
DEMutilities.particle_initialisation.sort_parentparticles_to_axis(positions, ppidx, axis)

Sorts the particles along an axis using the positions. For each parent particle the highest value is used to determine its position

DEMutilities.particle_initialisation.store_pc_per_parent_particle(pc, arraylist, cdlist, sortdata, filename)

This function reorders the information in the given “pc” so that per parent particle all required information can be easily obtained. This is useful when the particles in the pc have to be recycled into a new simulation but cannot be added all at the same time. In this case an “order” can be determined for the particles to be added one by one.

  • Arraylist is a list of arrays that need to be stored (can contain relative paths)
  • cdlist is a list of (fixedlist) contactdetectors that contain contacts that need to be stored.
  • sortdata is a list of arrays that are stored untouched and are required for sorting the parent particles when reconstructing.
  • filename is the file to which all data will be written.