Explicit mechanics

Continuum primitives for a single cell. No mesh, no solver.

Symmetric tensor

vm_sym3 is a 3×3 symmetric tensor in Voigt order (xx, yy, zz, xy, yz, zx). Shear components are tensor shear, not engineering shear, so a double contraction is a dot.

Strain

From a deformation gradient F:

A pure rotation has zero Green–Lagrange strain. ln(λ I) = ln(λ) I.

Geometry

Closest point and gap predicates. Degenerate input returns ok = false.

Batch

batch3.h is a strided scalar reference. A batch of one matches the scalar call.

Strides are in elements, so packed and padded layouts both work. SIMD backends register through the existing mechanism and must match this result.

Structural scale

Folded into the physics feature. No new module.

  • vm_lumped_accel is a = f / m over interleaved force, per-node mass. Non-positive mass is rejected.
  • vm_rayleigh is f -= α m v + β f_int, component-wise.