test(euclidean): Tier-1 circular-edge φ cross-validation + cyclic-solve blocker
Build-verified attempt to port the Java EuclideanCyclicConvergenceTest (cathead, "circular hole edge" φ = π−0.1). - ✅ GREEN `CyclicCircularEdge_PhiEntersGradient_CatHead`: solver-free cross-validation that the circular-edge φ target enters the cyclic edge gradient exactly (ΔG_e = −Δφ_e at 1e-12; no other component moves). - ⏸️ DISABLED `CyclicCircularEdge_CatHead_JavaXVal`: the full Java convergence assertion (α_opp+α_opp = π−0.1), kept with golden semantics. Auto-activates once the edge-DOF Hessian lands. Build-verification finding: `newton_euclidean` -> `euclidean_hessian` throws "edge DOFs are not supported" — the cyclic full solve is blocked by a missing edge-DOF Euclidean Hessian (gradient supports edge DOFs, analytic Hessian does not). Spherical convergence (Tier-1 #2) is already covered by test_newton_solver. Documented in doc/reviewer/java-ignore-crossvalidation.md. All 13 EuclideanFunctional tests pass (1 disabled). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
committed by
Tarik Moussa
parent
41ad4a84d2
commit
5d74a94b78
@@ -93,6 +93,69 @@ Assertion strategy: because the values are symmetric per DOF-class, assert
|
||||
|
||||
---
|
||||
|
||||
## 3b — Effort-adjusted tiering (2026-05-29 inventory)
|
||||
|
||||
> A broader scan (not just `@Ignore`d tests) revealed that the §3 ranking was
|
||||
> **effort-blind**: cheaper, equally-valuable oracles exist than the Lawson
|
||||
> generator. Re-tiered by **value / cost**:
|
||||
|
||||
| Tier | Oracle | Mesh / asset | Solver | Golden | C++ status | Cost |
|
||||
|---|---|---|---|---|---|---|
|
||||
| **1** | `EuclideanCyclicConvergenceTest` | `cathead.obj` *(already in C++)* | MTJ BiCGstab (no PETSc) | `α_opp+α_opp = π−0.1` @1e-12 (per-edge φ target) | `euclidean_functional` ✅, `phi_e` ✅, cathead ✅ | **near-zero** |
|
||||
| **1** | `SphericalConvergenceTest` | octahedron | MTJ Newton (no PETSc) | self-consistency (const. curvature) | spherical ✅, `make_octahedron_face` ✅ | low |
|
||||
| **2** | Wente genus-1 uniformization | `wente_torus02.obj` + `wente_uniformization.xml` | — (stored result) | exact `IsometryPSL2R` uniformizing-group generators | holonomy/`MobiusMap` ✅; **needs XML reader** | medium |
|
||||
| **2** | `regular_uniformization.xml` | (stored) | — | uniformization data | needs XML reader | medium |
|
||||
| **3** | HyperIdeal Lawson convergence (3 golden vectors) | combinatorial `createLawsonSquareTiled` | — (hard-coded u\*) | symmetric u\* | needs **low-level half-edge generator** (§5) | high |
|
||||
| **4** | genus-2 (`genus2.xml`/`lawson2498.obj`), holomorphic forms (`HolomorphicEuclideanUniformization_*.xml`), Schottky (`genus2.xml`), hyperelliptic | assets present in Java | — | various | Phases 10a/10c/11/13 | future |
|
||||
|
||||
**Key correction:** the Lawson generator (originally flagged HIGH) is actually
|
||||
**Tier 3** — higher effort than Tier 1/2. Cheapest first wins:
|
||||
|
||||
1. **Tier 1 — `EuclideanCyclicConvergenceTest` on cathead** (asset already
|
||||
present; the C++ edge gradient `G_e = α_opp(f⁺)+α_opp(f⁻) − φ_e` makes the
|
||||
Java assertion `α_opp+α_opp = π−0.1` exactly the converged `G_e = 0`
|
||||
condition with `phi_e = π−0.1`). Fails if the solver ignores a non-default
|
||||
`φ`, so it is a genuine check, not a tautology.
|
||||
2. **Tier 1 — `SphericalConvergenceTest`** on the octahedron.
|
||||
3. **Tier 2 — Wente genus-1 uniformization** (needs a small `UniformizationData`
|
||||
XML reader; strongest deterministic pipeline oracle that maps to landed C++).
|
||||
4. **Tier 3 — Lawson generator** (only after Tiers 1–2).
|
||||
|
||||
### Build-verification finding (2026-05-29) — Tier 1 cyclic is blocked
|
||||
|
||||
Attempting the Tier-1 `EuclideanCyclicConvergenceTest` port **build-verified** a
|
||||
blocker: `newton_euclidean` calls `euclidean_hessian`, which throws
|
||||
*"edge DOFs are not supported (only the vertex-block cotangent Laplacian is
|
||||
implemented)"*. The cyclic functional needs **vertex + edge** DOFs, so the full
|
||||
Newton solve is **not yet possible** in C++ — the *gradient* supports edge DOFs,
|
||||
the *analytic Hessian* does not. (This is also why PR #27 cross-validated only
|
||||
the cyclic *evaluation*, never a solve.)
|
||||
|
||||
**Landed in this PR instead** (`test_euclidean_functional.cpp`):
|
||||
- ✅ `CyclicCircularEdge_PhiEntersGradient_CatHead` (**GREEN**) — solver-free
|
||||
cross-validation that the circular-edge φ target enters the cyclic gradient
|
||||
exactly (`ΔG_e = −Δφ_e` at 1e-12, no other component moves). This is the
|
||||
evaluation-level prerequisite of the convergence oracle.
|
||||
- ⏸️ `DISABLED_CyclicCircularEdge_CatHead_JavaXVal` — the full Java convergence
|
||||
assertion (`α_opp+α_opp = π−0.1`), kept in-code with the golden semantics; it
|
||||
auto-activates (drop `DISABLED_`) once the edge-DOF Hessian lands.
|
||||
|
||||
**New prerequisite for Tier-1 cyclic:** an **edge-DOF Euclidean Hessian** (the
|
||||
cyclic Hessian over vertex + edge variables, cf. Java `getNonZeroPattern`). Spherical
|
||||
convergence (Tier-1 #2) turned out to be **already covered** by
|
||||
`test_newton_solver` (`Spherical_ConvergesFromPerturbation` et al. on the
|
||||
spherical tetrahedron), and `make_octahedron_face()` is a single face, not a
|
||||
closed octahedron — so Tier-1 #2 adds little. → the next genuinely-new
|
||||
cross-validation target is **Tier 2 (Wente uniformization XML)** or implementing
|
||||
the edge-DOF Hessian to unblock the cyclic convergence oracle.
|
||||
|
||||
### Other generators in the Java tree
|
||||
`HyperellipticCurveGenerator` (→ Phase 13), `SchottkyGenerator` (→ Phase 11a),
|
||||
`FunctionalTest.createOctahedron/createTetrahedron` (trivial — C++ has
|
||||
`make_octahedron_face` / `make_tetrahedron`).
|
||||
|
||||
---
|
||||
|
||||
## 4 — Recommended order of work
|
||||
|
||||
1. **Port `make_lawson_square_tiled()`** (low-level half-edge; see §5) →
|
||||
|
||||
Reference in New Issue
Block a user