code wiki / _hdl_build / nx_gm_xpbd_gate.nx

nx_gm_xpbd_gate.nx

buildroot/runtime/_hdl_build/nx_gm_xpbd_gate.nx

12837 B255 linesdepth 7pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic gm
docsdependenciesstructsconstsfunctions

about

nx_gm_xpbd_gate.nx -- GATE for PG29's cloth solver (gm_xpbd_step in nx_nxa_garment.nx). THE DONE-RULE WAS PRE-DECLARED ON THE PLAN before this gate existed (procgen.plan PG29): "Done when a dropped sheet folds under gravity with area conserved within a derived bound and a planted stiffness change measurably changes the fold." Every tooth below is one clause of that sentence, plus the anti-vacuity controls the estate's gate law demands. Fixture: a ring-grid sheet built by the SAME gm_edges_build the solver uses, pinned at its top ring -- the garment's own GPIN contract shape. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_softtissue.nx nx_gm_cloth_lib.nx nx_gate_verdict.nx nx_gm_xpbd_gate.nx

imports: nx_syscalls.nxnx_softtissue.nxnx_gm_cloth_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mmap ↻ xg_build sys_mmap ↻ gm_edges_build gm_dist gm_isqrt gv_puts sys_write ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check gv_puts ↻ gm_area2 gm_isqrt ↻ xg_hem_z_avg xg_run gm_xpbd_step_banked gm_xpbd_step st_alpha_tilde st_div_r gm_isqrt ↻

structs

none

consts

17const XG_NU: i64 = 12
18const XG_NV: i64 = 8
19const XG_R: i64 = 1000
20const XG_DZ: i64 = 400
24const XG_G: i64 = 0 - 40
25const XG_DT_US: i64 = 16666
26const XG_TICKS: i64 = 120
27const XG_ITERS: i64 = 8
32const XG_ALPHA_BEND_SOFT_Q12: i64 = 40960
33const XG_ALPHA_BEND_STIFF_Q12: i64 = 409

functions

35func xg_build(verts: *i64, vel: *i64) -> i64
called by 1: main calls 1: sys_mmap
68func xg_run(verts: *i64, vel: *i64, nvv: i64, edges: *i64, ne: i64,
called by 1: main calls 1: gm_xpbd_step_banked
79func xg_hem_z_avg(verts: *i64) -> i64
called by 1: main
86func xg_shape_diff(va: *i64, vb: *i64, nvv: i64) -> i64
called by 1: main
99func main() -> i64