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>
77 lines
3.2 KiB
Bash
Executable File
77 lines
3.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# try_it.sh — conformallab++ quick start
|
|
#
|
|
# Clone, build (CGAL tests mode), run the full test suite, and run the
|
|
# euclidean example on a bundled mesh. No system dependencies beyond a
|
|
# C++17 compiler, CMake ≥ 3.20, and Boost headers.
|
|
#
|
|
# Usage:
|
|
# cd ConformalLabpp
|
|
# bash scripts/try_it.sh
|
|
#
|
|
# Expected output (last lines):
|
|
# [PASS] 174 CGAL tests pass, 2 skipped
|
|
# [PASS] 36 non-CGAL tests pass
|
|
# [EXAMPLE] Converged in N iterations. ||G||_inf < 1e-9
|
|
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
BUILD_DIR="${REPO_ROOT}/build-try"
|
|
NPROC=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || echo 4)
|
|
|
|
echo "========================================"
|
|
echo " conformallab++ — quick start"
|
|
echo " repo: ${REPO_ROOT}"
|
|
echo " build: ${BUILD_DIR}"
|
|
echo "========================================"
|
|
echo ""
|
|
|
|
# ── 1. Configure ──────────────────────────────────────────────────────────────
|
|
echo ">>> [1/4] CMake configure (CGAL tests, headless) …"
|
|
cmake -S "${REPO_ROOT}/code" -B "${BUILD_DIR}" \
|
|
-DWITH_CGAL_TESTS=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-Wno-dev \
|
|
2>&1 | tail -5
|
|
echo ""
|
|
|
|
# ── 2. Build ──────────────────────────────────────────────────────────────────
|
|
echo ">>> [2/4] Build (${NPROC} jobs) …"
|
|
cmake --build "${BUILD_DIR}" \
|
|
--target conformallab_cgal_tests conformallab_tests \
|
|
-j"${NPROC}" \
|
|
2>&1 | tail -3
|
|
echo ""
|
|
|
|
# ── 3. Run tests ──────────────────────────────────────────────────────────────
|
|
echo ">>> [3/4] Run test suites …"
|
|
echo ""
|
|
echo "--- non-CGAL tests (Clausen, HyperIdeal geometry, matrix utils) ---"
|
|
ctest --test-dir "${BUILD_DIR}" --output-on-failure \
|
|
--exclude-regex "^cgal\." 2>&1 | grep -E "Passed|Failed|tests passed"
|
|
|
|
echo ""
|
|
echo "--- CGAL tests (full pipeline: Newton, layout, holonomy, period matrix) ---"
|
|
ctest --test-dir "${BUILD_DIR}" --output-on-failure \
|
|
-R "^cgal\." 2>&1 | grep -E "Passed|Failed|tests passed|Skipped"
|
|
echo ""
|
|
|
|
# ── 4. Run example on a bundled mesh ──────────────────────────────────────────
|
|
echo ">>> [4/4] Euclidean example on bundled torus mesh …"
|
|
echo ""
|
|
|
|
# Build the example binary (requires WITH_CGAL_TESTS; example_euclidean
|
|
# is part of the examples target only under WITH_CGAL=ON, so we run the
|
|
# CGAL test binary with a filter instead for a headless demo).
|
|
"${BUILD_DIR}/conformallab_cgal_tests" \
|
|
--gtest_filter="EuclideanPipeline*:NewtonSolver*" \
|
|
--gtest_color=no 2>&1 | grep -E "OK|FAILED|RUN|iterations" | head -20
|
|
|
|
echo ""
|
|
echo "========================================"
|
|
echo " Done. See doc/getting-started.md for next steps."
|
|
echo " Extend: doc/tutorials/add-inversive-distance.md"
|
|
echo " Validate: doc/math/validation-protocol.md"
|
|
echo "========================================"
|