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

#or assign it to a shorter name
import as mul


class, parent, **kwargs)


MultiGrid contact detector module (python wrapper). Constructs (multi-level) spatial grids to efficiently detect contacts. Can be used between any particles for which axis-aligned bounding boxes can be constructed (basically, always).

This is the go-to, efficient contact detector that mostly just works. The main things to tune are the ‘update_every’ and the ‘keep_distance’, the other parameters can be safely assumed to be relatively optimal.

Default location: ‘loop_cmds/contact_cmds’
  • Required keywords:
    • cmodel — The contactmodel that will be executed.
    • keep_distance — A user defined criterium that determines when a contact can be ‘thrown away’, if not given and the contactmodel provides feedback,the smallest gridsize is taken as default value.Note: In order of this to work, also the bounding box generators need to get the same margin parameter set.TODO we could autogenerate the AABB generators, and set this correctly from python.
    • update_every — The frequency used to repeat the binning. If set to one, the binning will be done every timestep, which is safe but slow.
  • Optional keywords:
    • contact_data_storage_factory (default value = ContactDataStorageFactory) — The memory manager factory for contact data.
    • contact_data (default value = None) — Contact data itself note: may not always be present and writing to it is usually a bad idea.
    • counter (default value = 0) — Internal counter kept for the update_every. Normally this should NOT be set unless you want to manually force a detection step!
    • f (default value = 1.1000000000000001) — The maximum allowable ratio of particle sizes within one bin size.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • h0 (default value = -1) — The size of the largest bin, if not given it is calculated (which is usually best)
MultiGridContactDetector(name, parent, **kwargs)