diff --git a/code/include/hyper_ideal_functional.hpp b/code/include/hyper_ideal_functional.hpp index 6bf640e..6a69438 100644 --- a/code/include/hyper_ideal_functional.hpp +++ b/code/include/hyper_ideal_functional.hpp @@ -105,7 +105,7 @@ inline int hyper_ideal_dimension(const ConformalMesh& mesh, const HyperIdealMaps /// rotational mode for an all-hyper-ideal configuration). /// /// \returns total DOF count = `num_vertices(mesh) + num_edges(mesh)`. -inline int assign_all_dof_indices(ConformalMesh& mesh, HyperIdealMaps& m) +inline int assign_hyper_ideal_all_dof_indices(ConformalMesh& mesh, HyperIdealMaps& m) { int idx = 0; for (auto v : mesh.vertices()) m.v_idx[v] = idx++; @@ -468,7 +468,7 @@ inline HyperIdealResult evaluate_hyper_ideal( /// /// Returns `true` iff `|G[i] − fd[i]| / max(1, |G[i]|) < tol` for every /// DOF. Defaults `eps = 1e-5`, `tol = 1e-4` match the Java `FunctionalTest`. -inline bool gradient_check( +inline bool gradient_check_hyper_ideal( ConformalMesh& mesh, const std::vector& x0, const HyperIdealMaps& m, @@ -501,4 +501,25 @@ inline bool gradient_check( return ok; } +// ── Deprecated aliases (A1, A3 standardization) ──────────────────────────── +// Use the standardized names assign___dof_indices and +// gradient_check_ across all five functionals. + +[[deprecated("use assign_hyper_ideal_all_dof_indices instead")]] +inline int assign_all_dof_indices(ConformalMesh& mesh, HyperIdealMaps& m) +{ + return assign_hyper_ideal_all_dof_indices(mesh, m); +} + +[[deprecated("use gradient_check_hyper_ideal instead")]] +inline bool gradient_check( + ConformalMesh& mesh, + const std::vector& x0, + const HyperIdealMaps& m, + double eps = 1e-5, + double tol = 1e-4) +{ + return gradient_check_hyper_ideal(mesh, x0, m, eps, tol); +} + } // namespace conformallab diff --git a/code/include/spherical_functional.hpp b/code/include/spherical_functional.hpp index f71267e..d4d1444 100644 --- a/code/include/spherical_functional.hpp +++ b/code/include/spherical_functional.hpp @@ -97,7 +97,7 @@ inline SphericalMaps setup_spherical_maps(ConformalMesh& mesh) /// /// On closed spherical surfaces exactly one gauge vertex must be pinned /// to remove the global-scale null mode. -inline int assign_vertex_dof_indices(ConformalMesh& mesh, SphericalMaps& m) +inline int assign_spherical_vertex_dof_indices(ConformalMesh& mesh, SphericalMaps& m) { int idx = 0; for (auto v : mesh.vertices()) m.v_idx[v] = idx++; @@ -109,8 +109,8 @@ inline int assign_vertex_dof_indices(ConformalMesh& mesh, SphericalMaps& m) /// surfaces to fix the global-scale gauge mode in a single call. /// /// \returns The number of free DOFs assigned (`num_vertices − 1`). -inline int assign_vertex_dof_indices(ConformalMesh& mesh, SphericalMaps& m, - Vertex_index gauge) +inline int assign_spherical_vertex_dof_indices(ConformalMesh& mesh, SphericalMaps& m, + Vertex_index gauge) { int idx = 0; for (auto v : mesh.vertices()) @@ -121,7 +121,7 @@ inline int assign_vertex_dof_indices(ConformalMesh& mesh, SphericalMaps& m, /// Assign DOF indices for all vertices AND all edges (vertex-DOFs first, /// then edge-DOFs). Mirrors `assign_euclidean_all_dof_indices` for the /// cyclic spherical formulation. -inline int assign_all_spherical_dof_indices(ConformalMesh& mesh, SphericalMaps& m) +inline int assign_spherical_all_dof_indices(ConformalMesh& mesh, SphericalMaps& m) { int idx = 0; for (auto v : mesh.vertices()) m.v_idx[v] = idx++; @@ -146,7 +146,7 @@ inline int spherical_dimension(const ConformalMesh& mesh, const SphericalMaps& m /// /// \pre Every vertex `v` of `mesh` lies on the unit sphere (norm = 1). /// \pre No edge is degenerate (`p_i ≠ p_j` and `p_i ≠ -p_j`). -inline void compute_lambda0_from_mesh(ConformalMesh& mesh, SphericalMaps& m) +inline void compute_spherical_lambda0_from_mesh(ConformalMesh& mesh, SphericalMaps& m) { for (auto e : mesh.edges()) { auto h = mesh.halfedge(e); @@ -519,4 +519,33 @@ inline void apply_spherical_gauge( } } +// ── Deprecated aliases (A1–A2 standardization) ──────────────────────────── +// Use the standardized names assign___dof_indices and +// compute__*_from_mesh across all five functionals. + +[[deprecated("use assign_spherical_vertex_dof_indices instead")]] +inline int assign_vertex_dof_indices(ConformalMesh& mesh, SphericalMaps& m) +{ + return assign_spherical_vertex_dof_indices(mesh, m); +} + +[[deprecated("use assign_spherical_vertex_dof_indices instead")]] +inline int assign_vertex_dof_indices(ConformalMesh& mesh, SphericalMaps& m, + Vertex_index gauge) +{ + return assign_spherical_vertex_dof_indices(mesh, m, gauge); +} + +[[deprecated("use assign_spherical_all_dof_indices instead")]] +inline int assign_all_spherical_dof_indices(ConformalMesh& mesh, SphericalMaps& m) +{ + return assign_spherical_all_dof_indices(mesh, m); +} + +[[deprecated("use compute_spherical_lambda0_from_mesh instead")]] +inline void compute_lambda0_from_mesh(ConformalMesh& mesh, SphericalMaps& m) +{ + compute_spherical_lambda0_from_mesh(mesh, m); +} + } // namespace conformallab