jaxdem.forces.facet_contact#

Facet contact force model.

Functions

get_facet_indices(idx, state)

Find the indices of the spheres belonging to the same facet clump.

point_segment_distance(p, a, b, system)

Distance from point p to segment a-b.

point_triangle_distance(p, a, b, c, system)

Distance from point p to triangle a, b, c.

segment_segment_distance(p1, q1, p2, q2, system)

Distance between two line segments p1q1 and p2q2.

triangle_triangle_distance(t1_a, t1_b, t1_c, ...)

Shortest distance and closest points between two triangles.

jaxdem.forces.facet_contact.point_triangle_distance(p: jax.Array, a: jax.Array, b: jax.Array, c: jax.Array, system: System) tuple[jax.Array, jax.Array, jax.Array][source]#

Distance from point p to triangle a, b, c.

jaxdem.forces.facet_contact.segment_segment_distance(p1: jax.Array, q1: jax.Array, p2: jax.Array, q2: jax.Array, system: System) tuple[jax.Array, jax.Array, jax.Array, jax.Array, jax.Array][source]#

Distance between two line segments p1q1 and p2q2.

jaxdem.forces.facet_contact.triangle_triangle_distance(t1_a: jax.Array, t1_b: jax.Array, t1_c: jax.Array, t2_a: jax.Array, t2_b: jax.Array, t2_c: jax.Array, system: System) tuple[jax.Array, jax.Array, jax.Array, jax.Array, jax.Array][source]#

Shortest distance and closest points between two triangles.

jaxdem.forces.facet_contact.point_segment_distance(p: jax.Array, a: jax.Array, b: jax.Array, system: System) tuple[jax.Array, jax.Array, jax.Array][source]#

Distance from point p to segment a-b.

jaxdem.forces.facet_contact.get_facet_indices(idx: jax.Array, state: State) tuple[jax.Array, jax.Array, jax.Array][source]#

Find the indices of the spheres belonging to the same facet clump. Returns (is_facet, indices, is_primary).