mpacts.contact.models.misc. s2detector

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

import mpacts.contact.models.misc.s2detector
#or assign it to a shorter name
import mpacts.contact.models.misc.s2detector as s2d

S2_ContactDetectorBase

class mpacts.contact.models.misc.s2detector.S2_ContactDetectorBase

Bases: mpacts.core.baseobject.BaseObject

Base class of all S2 contact detectors models.

Raises an exception This class cannot be instantiated from Python

S2_ContactDetectorBase(name, parent, **kwargs)

S2_ContactDetectorModel

class mpacts.contact.models.misc.s2detector.S2_ContactDetectorModel

Bases: mpacts.contact.models.contactmodelbase.ContactModelBase, mpacts.core.baseobject.BaseObject

Stage 2 ContactModel that is in turn a contact detector
Has no default location.
  • Required keywords:
    • cd — The second level contactdetector
    • pc1 — The first particle container in the binary contact detection.
    • pc2 — The second particle container in the binary contact detection. If contact detection within the same particle container is desired, and it is applicable for the contactmodel, pass the same pc to both pc1 and pc2.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc1, pc2, cd
S2_ContactDetectorModel(name, parent, **kwargs)

S2_MGrid

class mpacts.contact.models.misc.s2detector.S2_MGrid

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Support for MultiGrid, not intended for manual use.
Has no default location.
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate]
S2_MGrid(name, parent, **kwargs)

S2_MultiGrid

class mpacts.contact.models.misc.s2detector.S2_MultiGrid

Bases: mpacts.contact.models.misc.s2detector.S2_ContactDetectorBase, mpacts.core.baseobject.BaseObject

Stage 2 MultiGrid ContactDetector
Default location: ‘loop_cmds/contact_cmds’
  • Required keywords:
    • cmodel — The contactmodel that will be executed.
    • repeat_frequency — 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 repeat_frequency. 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)
    • keep_distance (default value = -1) — 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: cmodel, repeat_frequency, [gate, contact_data_storage_factory, contact_data, h0, f, keep_distance, counter]
S2_MultiGrid(name, parent, **kwargs)