mpacts.contact.detectors. reuse_existing

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

import mpacts.contact.detectors.reuse_existing
#or assign it to a shorter name
import mpacts.contact.detectors.reuse_existing as reu

ReuseExistingContactDetector

class mpacts.contact.detectors.reuse_existing.ReuseExistingContactDetector

Bases: mpacts.contact.detectors.contactdetectorbase.ContactDetectorBase, mpacts.core.baseobject.BaseObject

Special kind of contactdetector that allows to run over the contacts generated by another contactdetector. This allows to ‘chain’ contactdetectors outside the loop one could for instance first run Hertz and then use ReuseExistingContactDetector to add the tangential forces Requirements are that the reused contactdetector uses the ContactStateStorageBase interface to expose his contacts and (of course) the particle containers given to the contactmodel need to be the same, as well as their contactstate. (enforced)
The contact state will hold the state given by the second model. This implies that for contact models with contact matrices the second model is responsible for setting them correctly.
Default location: ‘loop_cmds/contact_cmds’
  • Required keywords:
    • cmodel — The contactmodel that will be executed.
  • Optional keywords:
    • cd (default value = None) — The contact detector object whose detected contacts will be recycled by this command
    • 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.
    • delete_irrelevant_contacts (default value = 0) — Determines whether or not this contactdetector will delete contacts that are no longer relevant. This is done on the usual criterium -feedback > keep_distance
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • keep_distance (default value = -1) — Criterium to determine whether a contact is relevant or not, only required/used when ‘delete_irrelevant_contacts’ is true
object __init__(tuple args, dict kwds) :
args: name, parent kwds: cmodel, [gate, contact_data_storage_factory, contact_data, cd, delete_irrelevant_contacts, keep_distance]
ReuseExistingContactDetector(name, parent, **kwargs)