mpacts.contact.models.misc. distances

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

import mpacts.contact.models.misc.distances
#or assign it to a shorter name
import mpacts.contact.models.misc.distances as dis

StoreMinimalDistance

Description: A model that finds and stores the distance of a node to a sphere or triangle. Geometry combinations available:

PC2 | PC1 - Sphere Rigid_Triangle Rigid_RoundedTriangle Deformable_RoundedTriangle Deformable_Capsule
Sphere YES YES YES YES YES

StoreMinimalDistance (Deformable_Capsule Sphere)

A model that finds and stores the distance of a node to a sphere or triangle.

Parallel Compatible: No

Properties:

  • Required keywords:
    • 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.
  • Optional keywords:
    • distance1 (default value = None) — Array in which minimal distance will be stored in pc1.
    • distance2 (default value = None) — Array in which minimal distance will be stored in pc2.
    • idx1 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P2 index!
    • idx2 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P1 index!
    • orthogonal_to (default value = 0 0 1) — Direction ‘out of plane’ for the 2D system. Default = (0,0,1).

This contact model is composed out of following pieces (click on the chain elements to get more information):

DefaultBoilerPlatePoint_2_DataDeformable_Line_1_DataLine_PointDistanceStoreMinimalDistanceNoFeedback

StoreMinimalDistance (Deformable_RoundedTriangle Sphere)

A model that finds and stores the distance of a node to a sphere or triangle.

Parallel Compatible: No

Properties:

  • Required keywords:
    • 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.
  • Optional keywords:
    • distance1 (default value = None) — Array in which minimal distance will be stored in pc1.
    • distance2 (default value = None) — Array in which minimal distance will be stored in pc2.
    • flip_normals (default value = 0) — If ‘True’, the normals of the N-Gon will be flipped.In most cases, we recommend that you leave this option to its default ‘false’. Contrary to the option ‘flip_normals’ in e.g. Ngon-Sphere contact, this option will always flip the normals, if enables, since points do not have any radius.
    • idx1 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P2 index!
    • idx2 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P1 index!

This contact model is composed out of following pieces (click on the chain elements to get more information):

RoundedTriangleBoilerPlateDeformable_NGon_1_Data  <3 >
  ↓
Point_2_DataNGon_PointStoreMinimalDistanceNoFeedback

StoreMinimalDistance (Rigid_RoundedTriangle Sphere)

A model that finds and stores the distance of a node to a sphere or triangle.

Parallel Compatible: No

Properties:

  • Required keywords:
    • 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.
  • Optional keywords:
    • distance1 (default value = None) — Array in which minimal distance will be stored in pc1.
    • distance2 (default value = None) — Array in which minimal distance will be stored in pc2.
    • flip_normals (default value = 0) — If ‘True’, the normals of the N-Gon will be flipped.In most cases, we recommend that you leave this option to its default ‘false’. Contrary to the option ‘flip_normals’ in e.g. Ngon-Sphere contact, this option will always flip the normals, if enables, since points do not have any radius.
    • idx1 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P2 index!
    • idx2 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P1 index!

This contact model is composed out of following pieces (click on the chain elements to get more information):

RoundedTriangleBoilerPlateRigid_NGon_1_Data  <3 >
  ↓
Point_2_DataNGon_PointStoreMinimalDistanceNoFeedback

StoreMinimalDistance (Rigid_Triangle Sphere)

A model that finds and stores the distance of a node to a sphere or triangle.

Parallel Compatible: No

Properties:

  • Required keywords:
    • 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.
  • Optional keywords:
    • distance1 (default value = None) — Array in which minimal distance will be stored in pc1.
    • distance2 (default value = None) — Array in which minimal distance will be stored in pc2.
    • flip_normals (default value = 0) — If ‘True’, the normals of the N-Gon will be flipped.In most cases, we recommend that you leave this option to its default ‘false’. Contrary to the option ‘flip_normals’ in e.g. Ngon-Sphere contact, this option will always flip the normals, if enables, since points do not have any radius.
    • idx1 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P2 index!
    • idx2 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P1 index!

This contact model is composed out of following pieces (click on the chain elements to get more information):

RoundedTriangleBoilerPlateRigid_NGon_1_Data  <3 >
  ↓
Point_2_DataNGon_PointStoreMinimalDistanceNoFeedback

StoreMinimalDistance (Sphere Sphere)

A model that finds and stores the distance of a node to a sphere or triangle.

Parallel Compatible: No

Properties:

  • Required keywords:
    • 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.
  • Optional keywords:
    • distance1 (default value = None) — Array in which minimal distance will be stored in pc1.
    • distance2 (default value = None) — Array in which minimal distance will be stored in pc2.
    • idx1 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P2 index!
    • idx2 (default value = None) — Array in which the index of the minimal distance partner is saved. NOTE: this is a P1 index!

This contact model is composed out of following pieces (click on the chain elements to get more information):

DefaultBoilerPlatePoint_1_DataPoint_2_DataPoint_PointStoreMinimalDistanceNoFeedback