feat(phase3f+3g): analytical Hessians + PI consolidation
Phase 3g — constants.hpp:
- Introduce conformallab::PI and TWO_PI in a single constants.hpp
- Remove scattered local PI/pi definitions from hyper_ideal_geometry.hpp,
hyper_ideal_utility.hpp, euclidean_functional.hpp, mesh_builder.hpp,
spherical_geometry.hpp (backward-compatible PI_SPHER alias kept)
Phase 3f — Euclidean Hessian (euclidean_hessian.hpp):
- Cotangent-Laplace operator (Pinkall–Polthier 1993)
- euclidean_cot_weights() helper + euclidean_hessian() + hessian_check_euclidean()
- Correct Pinkall–Polthier 1/2 normalization factor
- 8 tests: cot weights, symmetry, null-space (H·1=0), PSD, FD × 4 meshes
Phase 3f — Spherical Hessian (spherical_hessian.hpp):
- Derives ∂α_i/∂u_j directly from the spherical law of cosines:
∂α1/∂l_opp = sin(l_opp) / [sin(l_a)·sin(l_b)·sin(α1)]
∂α1/∂l_adj = [cot(l_adj)·cos(α1) − cot(l_other)] / sin(α1)
then chains with ∂l/∂λ = tan(l/2)
- spherical_cot_weights() kept as a standalone helper (tested separately)
- 8 tests: cot weights, symmetry, correct null-space & sign-convention
(H·1 ≠ 0; H is NSD at equilibrium), FD × 3 meshes
All 62 cgal tests pass (3 skipped as before).
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
// These builders cover the minimal meshes needed for functional unit tests.
|
||||
|
||||
#include "conformal_mesh.hpp"
|
||||
#include "constants.hpp"
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
@@ -93,7 +94,7 @@ inline ConformalMesh make_fan(int n)
|
||||
|
||||
auto center = mesh.add_vertex(Point3(0, 0, 0));
|
||||
|
||||
const double dtheta = 2.0 * M_PI / n;
|
||||
const double dtheta = TWO_PI / n;
|
||||
std::vector<Vertex_index> rim(n);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
double a = i * dtheta;
|
||||
|
||||
Reference in New Issue
Block a user