fem.recompute_tet_points
fem.recompute_tet_points(sdf, mesh, *, smooth_passes=0)
Recompute tet-mesh vertex positions differentiably with frozen topology.
The leading num_surface boundary vertices are Newton re-projected from their frozen nominal positions onto the (possibly traced) SDF’s zero set — the same clamped projection the hex mesher uses, so the output is a differentiable function of the SDF’s parameters. Interior Steiner vertices stay frozen by default; smooth_passes > 0 runs that many differentiable Jacobi–Laplacian passes propagating the boundary displacement inward (boundary values pinned), which keeps interior elements better shaped under larger design motions. On a TET10 mesh the midside nodes are recomputed as midpoints of the traced corner positions, so gradients flow through them too.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| sdf | Callable[[Any], Any] | Signed distance field, possibly closing over traced parameters. | required |
| mesh | TetMesh | Mesh extracted at the nominal design. | required |
| smooth_passes | int | Number of interior displacement-smoothing passes. | 0 |
Returns
| Name | Type | Description |
|---|---|---|
| Any | Vertex positions as a JAX array shaped like mesh.points. |