refactor(api): consistent naming for spherical + hyper-ideal helpers (A1–A3)
All checks were successful
C++ Tests / test-fast (pull_request) Successful in 2m20s
C++ Tests / quality-gates (pull_request) Has been skipped
C++ Tests / test-cgal (pull_request) Has been skipped

Standardize the low-level free-function API on <verb>_<geom>_<rest>,
matching the already-consistent setup_<geom>_maps. Old names kept as
[[deprecated]] inline aliases for one release; all internal call sites
migrated.

Renames:
  assign_vertex_dof_indices      -> assign_spherical_vertex_dof_indices
  assign_all_spherical_dof_indices -> assign_spherical_all_dof_indices
  assign_all_dof_indices         -> assign_hyper_ideal_all_dof_indices
  compute_lambda0_from_mesh      -> compute_spherical_lambda0_from_mesh
  gradient_check                 -> gradient_check_hyper_ideal

A4/A5 (public CGAL API) intentionally deferred pending the license/
provenance decision (see CGAL submission audit G0/G1).

Verified: 277/277 CGAL tests pass, no deprecation warnings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tarik Moussa
2026-05-31 09:15:22 +02:00
parent e13e7ea8e7
commit 65fc8ac816
16 changed files with 127 additions and 90 deletions

View File

@@ -148,8 +148,8 @@ TEST(Pipeline, Spherical_TetrahedronToEquilibrium)
// ── Steps 13 ─────────────────────────────────────────────────────────
auto mesh = make_spherical_tetrahedron();
auto maps = setup_spherical_maps(mesh);
compute_lambda0_from_mesh(mesh, maps);
int n = assign_vertex_dof_indices(mesh, maps);
compute_spherical_lambda0_from_mesh(mesh, maps);
int n = assign_spherical_vertex_dof_indices(mesh, maps);
// ── Step 4: solve ─────────────────────────────────────────────────────
std::vector<double> x0(static_cast<std::size_t>(n), -0.2);
@@ -178,7 +178,7 @@ TEST(Pipeline, HyperIdeal_TriangleRoundTrip)
// ── Steps 13 ─────────────────────────────────────────────────────────
auto mesh = make_triangle();
auto maps = setup_hyper_ideal_maps(mesh);
int n = assign_all_dof_indices(mesh, maps);
int n = assign_hyper_ideal_all_dof_indices(mesh, maps);
// ── Step 4: natural targets (equilibrium at b=1.0, a=0.5) ────────────
auto xbase = set_natural_hyper_ideal_targets(mesh, maps, n);
@@ -274,7 +274,7 @@ TEST(Pipeline, AllThreeGeometries_QuadStrip)
{
auto mesh = make_quad_strip();
auto maps = setup_hyper_ideal_maps(mesh);
int n = assign_all_dof_indices(mesh, maps);
int n = assign_hyper_ideal_all_dof_indices(mesh, maps);
auto xbase = set_natural_hyper_ideal_targets(mesh, maps, n);
std::vector<double> x0 = xbase;
for (auto& v : x0) v += 0.1;
@@ -286,8 +286,8 @@ TEST(Pipeline, AllThreeGeometries_QuadStrip)
{
auto mesh = make_spherical_tetrahedron();
auto maps = setup_spherical_maps(mesh);
compute_lambda0_from_mesh(mesh, maps);
int n = assign_vertex_dof_indices(mesh, maps);
compute_spherical_lambda0_from_mesh(mesh, maps);
int n = assign_spherical_vertex_dof_indices(mesh, maps);
std::vector<double> x0(static_cast<std::size_t>(n), -0.1);
auto res = newton_spherical(mesh, x0, maps);
EXPECT_TRUE(res.converged) << "Spherical: tetrahedron should converge";