plugins.contracts.NodeMap

plugins.contracts.NodeMap()

node_map: design parameters to the node positions of a Gmsh mesh.

The seam’s centrepiece. Its input is the public :class:OwnedNodes record; its output is positions, traced in the parameters, with the implicit-function adjoint of the component’s own projection kernel.

Contract

Preconditions: owned.seeds were produced at owned.design; every patches row names patches of scene‘s table in :func:~cadjoint.meshing.patch_fields.scene_patch_fields order; midsides’ parents precede them (the TetMesh layout). Forward: a boundary node of arity k >= 1 is one k-field Gauss–Newton from its seed onto its owning patches — the seed chooses the branch, never the position on it; a blend node is solved against the scene itself; an order-2 midside is solved on its own patch set, not put at the chord midpoint; interior nodes follow the boundary displacement by smooth_passes Laplacian passes over the node adjacency. Frozen: topology, ownership, arity, adjacency, the pass count. Differentiable: params only, by the IFT; a node whose Gram fails the transversality guard carries zero derivative. Postconditions: at owned.design, |positions - seeds| <= bar for every patch-owned node; every boundary node satisfies |f| <= tol on its patches. Refuses: a patch index outside the table.

Methods

Name Description
positions (P, 3) node positions at params, traced in params.

positions

plugins.contracts.NodeMap.positions(scene, params, owned, *, smooth_passes=0)

(P, 3) node positions at params, traced in params.

Parameters

Name Type Description Default
scene Any The root SDF node the mesh was built from. The object, not a functionalized closure: the patch table is rebuilt under the traced parameter values by walking it. required
params Mapping[str, Any] Free-parameter mapping; a partial mapping merges over the scene’s current values. required
owned OwnedNodes The public ownership record. required
smooth_passes int Interior Laplacian passes (0 leaves volume nodes at their seeds). 0