fix: correct 16 inconsistencies found by consistency audit
Math / code: - layout.hpp: add explanatory comment for Möbius deck transformation (from_three with z1=w1, z2=w2 encodes T fixing cut-edge endpoints) - layout.hpp: document spherical holonomy limitation — Vector2d stores only (x,y) of 3-D position diff; full SO(3) representation deferred Gradient sign convention (CLAUDE.md was wrong): - Euclidean and Spherical both use G_v = Θ_v − actual (target minus actual) - HyperIdeal uses G_v = actual − Θ_v - Hessian sign differs: Euclidean PSD, Spherical NSD → −H, HyperIdeal PSD Test counts (were inconsistent across all files): - Actual: 176 CGAL tests, 2 GTEST_SKIP (not 173/170/174, not 1 skip) - The 2 skips are EuclideanFunctional + SphericalFunctional Hessian gradient checks (Java @Ignore ports) — not HyperIdeal Hessian as previously stated - doc/api/tests.md: add missing SmokeEuclidean suite (3 tests), EuclideanLayout (2), SphericalLayout (1), fix GaussBonnet 8→12, MeshIO 9→6, Layout 8→6, EuclideanFunctional 11→12, HomologyGenerators no longer a GTEST_SKIP stub (live test on brezel2.obj) - doc/roadmap/phases.md: Phase 7 cumulative 158→176 tests - doc/roadmap/phases.md: Phase 3 clarified — HyperIdeal Hessian is FD - CLAUDE.md: suite count 28→34, test ref 173+36→174+36 - scripts/try_it.sh: expected output 173/1 skipped → 174/2 skipped CI table (CLAUDE.md): - test-cgal now triggers on pull requests only (not main/dev pushes) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
21
CLAUDE.md
21
CLAUDE.md
@@ -126,8 +126,13 @@ After `compute_*_lambda0_from_mesh()` the original vertex positions are no longe
|
||||
### Newton solver (`newton_solver.hpp`)
|
||||
|
||||
The gradient sign convention differs between modes:
|
||||
- **Euclidean/HyperIdeal:** `G_v = actual_angle_sum − Θ_v`, H is PSD → `SimplicialLDLT(H)`
|
||||
- **Spherical:** `G_v = Θ_v − actual_angle_sum`, H is NSD → `SimplicialLDLT(−H)`
|
||||
- **Euclidean/Spherical:** `G_v = Θ_v − actual_angle_sum` (target minus actual)
|
||||
- **HyperIdeal:** `G_v = actual_angle_sum − Θ_v` (actual minus target)
|
||||
|
||||
Hessian sign and solver:
|
||||
- **Euclidean:** H is PSD (cotangent Laplacian) → `SimplicialLDLT(H)`
|
||||
- **Spherical:** H is NSD (concave energy) → `SimplicialLDLT(−H)` (sign flip inside `newton_spherical`)
|
||||
- **HyperIdeal:** H is PSD (strictly convex) → `SimplicialLDLT(H)`
|
||||
|
||||
When `SimplicialLDLT` fails (rank-deficient H — gauge mode on closed mesh without pinned vertex), the solver automatically retries with `Eigen::SparseQR` to find the minimum-norm step orthogonal to the null space. Public API: `solve_linear_system(H, rhs, &used_fallback)`.
|
||||
|
||||
@@ -235,11 +240,17 @@ Two jobs in `.gitea/workflows/cpp-tests.yml`:
|
||||
| Job | CMake flags | Deps | Triggers on |
|
||||
|---|---|---|---|
|
||||
| `test-fast` | *(none)* | Eigen + GTest only | all branches |
|
||||
| `test-cgal` | `-DWITH_CGAL_TESTS=ON` | + Boost | `main`, `dev`, PRs only |
|
||||
| `test-cgal` | `-DWITH_CGAL_TESTS=ON` | + Boost | pull requests only |
|
||||
|
||||
Runner: `eulernest` — self-hosted Raspberry Pi, ARM64, Ubuntu 22.04. Docker image: `git.eulernest.eu/conformallab/ci-cpp:latest`. `test-cgal` needs `test-fast` to pass first (`needs: test-fast`).
|
||||
|
||||
Expected results: **36 non-CGAL tests pass**, **176 CGAL tests pass, 1 skipped** (intentional `GTEST_SKIP` stub for analytic HyperIdeal Hessian — deferred to Phase 9b).
|
||||
Expected results: **36 non-CGAL tests pass**, **174 CGAL tests pass, 2 skipped**.
|
||||
|
||||
The 2 intentional skips are Java `@Ignore` ports:
|
||||
- `EuclideanFunctional.GradientCheck_Hessian` — analytic Euclidean Hessian gradient check
|
||||
- `SphericalFunctional.GradientCheck_Hessian` — analytic Spherical Hessian gradient check
|
||||
|
||||
Both are deferred to Phase 9b. Do not remove them.
|
||||
|
||||
## Release state
|
||||
|
||||
@@ -287,7 +298,7 @@ Root-level files added at v0.7.0:
|
||||
| Full pipeline API for all three geometries | `doc/api/pipeline.md` |
|
||||
| What does each processing unit require/provide (contracts)? | `doc/api/contracts.md` |
|
||||
| How to add a new functional / geometry mode / port from Java | `doc/api/extending.md` |
|
||||
| All 28 test suites, 173+36 tests, individual counts | `doc/api/tests.md` |
|
||||
| All 34 test suites, 174+36 tests, individual counts | `doc/api/tests.md` |
|
||||
| Phase 8 CGAL package design + Declarative YAML pipeline spec | `doc/api/cgal-package.md` |
|
||||
|
||||
### Concepts & specs
|
||||
|
||||
Reference in New Issue
Block a user