mpacts.contact.models. contactmodelbase

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

import mpacts.contact.models.contactmodelbase
#or assign it to a shorter name
import mpacts.contact.models.contactmodelbase as con

ContactModelBase

class mpacts.contact.models.contactmodelbase.ContactModelBase

Bases: mpacts.core.baseobject.BaseObject

Base class of all contact models.

Raises an exception This class cannot be instantiated from Python

ContactModelBase(name, parent, **kwargs)
is_parallel_compatible((ContactModelBase)arg1) → bool :

returns true when the contactmodel is parallel compatible

ContactModelLinker

class mpacts.contact.models.contactmodelbase.ContactModelLinker

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

Small class that chains two contactmodels together and calls them in succession.

From the perspective of the contactdetector these act as if they are a single contactmodel. The larger feedback of both models is returned, since it is expected to be the more relevant one. | Has no default location.

  • Required keywords:
    • cmodel1 — The first contactmodel that will be executed.
    • cmodel2 — The second contactmodel that will be executed.
    • 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, cmodel1, cmodel2
ContactModelLinker(name, parent, **kwargs)

ContactModelLinker_3

class mpacts.contact.models.contactmodelbase.ContactModelLinker_3

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

Contactmodel that has 3 contactmodels, first runs cmodel1 and if the feedback is positive it will run cmodel2 otherwise it will run cmodel3.
Has no default location.
  • Required keywords:
    • cmodel1 — The first contactmodel that will be executed. Positive feedback will execute cmodel2, negative cmodel3
    • cmodel2 — The second contactmodel that will be executed.
    • cmodel3 — The third contactmodel that will be executed.
    • 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, cmodel1, cmodel2, cmodel3
ContactModelLinker_3(name, parent, **kwargs)