autopdex.geometry.elem_on_line

autopdex.geometry.elem_on_line(x_nodes, x_p1, x_p2)[source]

Check if an element lies on a line segment defined by two points.

Parameters:
  • x_nodes (jnp.ndarray) – Array of nodes of the element.

  • x_p1 (jnp.ndarray) – The starting point of the line segment.

  • x_p2 (jnp.ndarray) – The ending point of the line segment.

Returns:

True if the element lies on the line segment, False otherwise.

Return type:

bool