test(hyperideal): Tier-3 Lawson golden-vector Java cross-validation (plain + branch-points) #30
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/lawson-hyperideal-golden"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ports the Java
HyperIdealConvergenceTestgolden vectors — the strongest remaining@Ignored oracles (hard-coded converged solutions from a historical x86 PETSc run). Resolves the Tier-3 item from PR #29's analysis.The hard part: building the mesh
The Lawson base is genus 2 with 4 vertices / 12 edges → multi-edges, so CGAL
add_face/OFF/polygon-soup cannot build it.build_lawson_base()uses the low-level Surface_mesh half-edge API (add_edge+set_target/set_next/set_face/set_halfedge), faithfully porting the JavalinkOppositeEdge/linkNextEdge/setTargetVertexwiring.Variants ported (GREEN)
createLawsonSquareTiled) — diagonal triangulation (triangulate_faces). Θ_v=2π, θ_e=π/2 (12 original) / π (6 diagonals). Newton → 1.1462158341786262 / 1.7627471737467797 / 2.633915794495759.…WithBranchPoints) — stellar subdivision (Euler::add_center_vertex), 6 ideal centres (b=0), θ_e=π (12 base) / π/2 (24 spokes). Newton → vertices 1.3169579, base edges 2.2924317, spokes 0.Both converge from x0=1.0 unconstrained (Java needed bounded BLMVM) and match the golden per symmetry class @1e-4…1e-5 (robust to DOF ordering). Tests also assert
is_valid+ genus 2 (χ=−2).Key insight
The golden vectors are symmetric per geometric class, so the external jtem
Triangulator/StellarLinearexact orderings need not be replicated — any consistent triangulation/stellar reproduces the values. Java's index-based θ split turns out to be geometric (original vs diagonal; base vs spoke).Not ported
createLawsonHyperelliptic()— loadslawson_curve_source.xml(Java conformal-data format) +HyperIdealHyperellipticUtility; golden vector is non-symmetric (mixed ±values). Needs an XML-format reader + utility port → deferred, documented.243/243 cgal tests pass.
🤖 Generated with Claude Code
Ports the Java HyperIdealConvergenceTest (Lawson square-tiled) — the strongest remaining @Ignore'd oracle (a hard-coded converged solution from a historical x86 PETSc run). - make_lawson_square_tiled(): builds the genus-2 base (4 vertices, 12 edges, 6 quads) via the low-level CGAL Surface_mesh half-edge API (add_edge + set_target/set_next/set_face/set_halfedge), since the multi-edges (≥2 edges per vertex pair) make add_face / OFF / polygon-soup impossible. Then triangulate_faces → 12 triangles, 18 edges (12 original + 6 diagonals). BuildsValidGenus2Mesh: is_valid + V=4/F=12/E=18 + χ=−2. - ConvergenceGoldenVector_JavaXVal: Θ_v=2π, θ_e=π/2 (12 original edges), θ_e=π (6 diagonals); newton_hyper_ideal converges (from x0=1.0, unconstrained) to the Java golden vector: vertices → 1.1462158341786262 original → 1.7627471737467797 aux → 2.633915794495759 asserted per symmetry class @1e-5 (robust to DOF ordering). The perfect symmetry of the golden vector means any consistent one-diagonal triangulation reproduces the three values, so the external jtem Triangulator choice need not be replicated. Resolves the Tier-3 item from PR #29's analysis. 242/242 cgal tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Second Lawson variant from HyperIdealConvergenceTest...WithBranchPoints. - make_lawson_branch_points(): base + STELLAR subdivision (Java StellarLinear) via CGAL Euler::add_center_vertex — a centre vertex per quad fan-connected to its 4 corners (6 centres, 24 triangles, 36 edges). The 6 centres are IDEAL vertices (b=0, v_idx=-1); θ_e=π on the 12 base edges, θ_e=π/2 on the 24 spokes. - BranchPointsGoldenVector_JavaXVal: newton_hyper_ideal converges to the Java golden (per symmetry class @1e-4): original vertices → 1.3169579 base edges → 2.2924317 spoke edges → 0 (the π/2 spokes collapse to ideal) Key insight: Java's index-based θ split (first 12 edges π, rest π/2) is geometric — base edges vs stellar spokes — so the symmetry shortcut applies. createLawsonHyperelliptic() NOT ported: needs a reader for the Java conformal-data XML (lawson_curve_source.xml) + a port of HyperIdealHyperellipticUtility, and its golden vector is not class-symmetric. Documented as a deferred task. 243/243 cgal tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>test(hyperideal): Tier-3 Lawson square-tiled golden-vector Java cross-validationto test(hyperideal): Tier-3 Lawson golden-vector Java cross-validation (plain + branch-points)test(hyperideal): Tier-3 Lawson golden-vector Java cross-validation (plain + branch-points)to feat(geometry): pn_geometry.hpp — Pn projective-metric substrate (jReality port)feat(geometry): pn_geometry.hpp — Pn projective-metric substrate (jReality port)to test(hyperideal): Tier-3 Lawson golden-vector Java cross-validation (plain + branch-points)