test(hyperideal): Tier-3 Lawson golden-vector Java cross-validation (plain + branch-points) #30

Merged
user2595 merged 2 commits from feat/lawson-hyperideal-golden into main 2026-05-30 15:21:41 +00:00
Owner

Ports the Java HyperIdealConvergenceTest golden 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 Java linkOppositeEdge/linkNextEdge/setTargetVertex wiring.

Variants ported (GREEN)

  1. Plain Lawson (createLawsonSquareTiled) — diagonal triangulation (triangulate_faces). Θ_v=2π, θ_e=π/2 (12 original) / π (6 diagonals). Newton → 1.1462158341786262 / 1.7627471737467797 / 2.633915794495759.
  2. Branch points (…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 / StellarLinear exact 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() — loads lawson_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` golden vectors — the strongest remaining `@Ignore`d 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 Java `linkOppositeEdge`/`linkNextEdge`/`setTargetVertex` wiring. ## Variants ported (GREEN) 1. **Plain Lawson** (`createLawsonSquareTiled`) — diagonal triangulation (`triangulate_faces`). Θ_v=2π, θ_e=π/2 (12 original) / π (6 diagonals). Newton → 1.1462158341786262 / 1.7627471737467797 / 2.633915794495759. 2. **Branch points** (`…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` / `StellarLinear` exact 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()` — loads `lawson_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](https://claude.com/claude-code)
user2595 added 1 commit 2026-05-29 23:06:53 +00:00
test(hyperideal): Tier-3 Lawson square-tiled golden-vector Java cross-validation
All checks were successful
C++ Tests / test-fast (pull_request) Successful in 1m55s
API Docs / doc-build (pull_request) Successful in 57s
C++ Tests / test-cgal (pull_request) Has been skipped
C++ Tests / quality-gates (pull_request) Successful in 2m20s
0c502536b9
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>
user2595 added 1 commit 2026-05-29 23:14:50 +00:00
test(hyperideal): add Lawson branch-points golden-vector cross-validation
All checks were successful
C++ Tests / test-fast (pull_request) Successful in 1m56s
API Docs / doc-build (pull_request) Successful in 59s
C++ Tests / test-cgal (pull_request) Has been skipped
C++ Tests / quality-gates (pull_request) Successful in 2m32s
5de95a7a93
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>
user2595 changed title from test(hyperideal): Tier-3 Lawson square-tiled golden-vector Java cross-validation to test(hyperideal): Tier-3 Lawson golden-vector Java cross-validation (plain + branch-points) 2026-05-29 23:15:06 +00:00
user2595 changed title from 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) 2026-05-30 15:00:40 +00:00
user2595 merged commit 76942418fb into main 2026-05-30 15:21:41 +00:00
user2595 changed title from 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) 2026-05-30 15:27:31 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: conformallab/ConformalLabpp#30
No description provided.