mpacts.contact.storage. factory_dummy

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

import mpacts.contact.storage.factory_dummy
#or assign it to a shorter name
import mpacts.contact.storage.factory_dummy as fac

CombinedContactDataStorage

class mpacts.contact.storage.factory_dummy.CombinedContactDataStorage

Bases: mpacts.core.contactdata.ContactDataBase, mpacts.core.baseobject.BaseObject

This class combines two existing contactdatastorages and presents a new uniform acces and iterator to both as if both represent only a single contactdatastorage. Used in ContactMatrix.
Has no default location.
  • Optional keywords:
    • ContactData1 (default value = None) — The first set of contact data to be combined
    • ContactData2 (default value = None) — The second set of contact data to be combined
    • cmodel (default value = None) — the contact model we are providing contactdata storage for. Is exposed for the save/load functionality
  • Read only properties:
    • number_of_contacts — Allows to check the number of likely contacts currently held in the contact list.
    • pc1 — The first particle container in the binary contact detection.
    • pc2 — The second particle container in the binary contact detection.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: [cmodel, ContactData1, ContactData2]
CombinedContactDataStorage(name, parent, **kwargs)

ContactDataStorageFactoryDebug

class mpacts.contact.storage.factory_dummy.ContactDataStorageFactoryDebug

Bases: mpacts.contact.storage.contactdatastorage_factorybase.ContactDataStorageFactoryBase, mpacts.core.baseobject.BaseObject

This class serves as the factory for a debug tool for contactdetectors or contactdata with the possiblity to do stuff from python when a new contact is added or deleted.
Has no default location.
  • Optional keywords:
    • contact_data_storage_factory (default value = ContactDataStorageFactory) — The memory manager factory for contact data.
    • onDelete (default value = boost::python::api::object cannot be printed.) — Python function with signature f(p1, p2) that is called BEFORE marking the contact as deleted.
    • onNew (default value = boost::python::api::object cannot be printed.) — Python function with signature f(p1, p2) that is called when creating the contact.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: [contact_data_storage_factory, onDelete, onNew]
ContactDataStorageFactoryDebug(name, parent, **kwargs)

ContactDataStorageFactoryDummy

class mpacts.contact.storage.factory_dummy.ContactDataStorageFactoryDummy

Bases: mpacts.contact.storage.contactdatastorage_factorybase.ContactDataStorageFactoryBase, mpacts.core.baseobject.BaseObject

Creates contactdata that does not actually store anything. This can be used to avoid that a contact detector keeps a list of previous contacts.
Has no default location.
object __init__(tuple args, dict kwds) :
args: name, parent kwds:
ContactDataStorageFactoryDummy(name, parent, **kwargs)

DebugContactDataStorage

class mpacts.contact.storage.factory_dummy.DebugContactDataStorage

Bases: mpacts.core.contactdata.ContactDataBase, mpacts.core.baseobject.BaseObject

This class serves as a debug tool for contactdetectors or contactdata with the possiblity to do stuff from python when a new contact is added or deleted. Note: contactdetectors re-request their contactdatastorage from the factory after any set from python and will thus overwrite this one when set directly. Therefore one should set the factory of the contactdetector instead of directly the contactdata
Has no default location.
  • Optional keywords:
    • cmodel (default value = None) — the contact model we are providing contactdata storage for. Is exposed for the save/load functionality
    • onDelete (default value = boost::python::api::object cannot be printed.) — Python function with signature f(p1, p2) that is called BEFORE marking the contact as deleted.
    • onNew (default value = boost::python::api::object cannot be printed.) — Python function with signature f(p1, p2) that is called when creating the contact.
  • Read only properties:
    • number_of_contacts — Allows to check the number of likely contacts currently held in the contact list.
    • pc1 — The first particle container in the binary contact detection.
    • pc2 — The second particle container in the binary contact detection.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: [cmodel, onDelete, onNew]
DebugContactDataStorage(name, parent, **kwargs)