Commit Graph

244 Commits

Author SHA1 Message Date
Tarik Moussa
a4c2a89e7e feat(phase3c): port SphericalFunctional onto ConformalMesh; update README
New headers:
- spherical_geometry.hpp: spherical arc length l(λ) and half-angle formula
  for interior angles of a spherical triangle (SphericalFaceAngles struct)
- spherical_functional.hpp: SphericalMaps bundle, setup/assign DOF helpers,
  compute_lambda0_from_mesh(), gradient (Θ_v − Σα_v; Schläfli edge formula),
  energy via 10-point Gauss-Legendre path integral, gradient_check_spherical()

Updated:
- mesh_builder.hpp: add make_spherical_tetrahedron() (vertices on unit sphere)
  and make_octahedron_face() (single right-angled spherical triangle)
- tests/cgal/CMakeLists.txt: enable test_spherical_functional.cpp
- README.md: rewrite for CGAL-package goal, two test targets, all headers,
  updated project tree, Phase progress table, key design decisions

Tests (cgal.SphericalFunctional.*): 8 active + 1 skip
- OctaFaceAnglesAreRightAngles, SpherTetAngleSumExceedsPi
- GradientCheck_{OctaFaceVertex, SpherTetVertex, SpherTetAllDofs,
  SpherFan4Vertex, MixedPinnedVertices}
- AnglesFiniteAtKnownPoint
All 30 cgal.* tests pass (2 @Ignore skips).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 00:01:24 +02:00
Tarik Moussa
516ac89bd8 feat(phase3b): port HyperIdealFunctional energy + gradient onto ConformalMesh
Implements the hyper-ideal discrete conformal map functional on
CGAL::Surface_mesh. The energy and analytic gradient are ported directly
from HyperIdealFunctional.java; correctness is verified via a
finite-difference gradient check (same eps=1E-5 / tol=1E-4 as Java).

New files:
  include/hyper_ideal_geometry.hpp    — ζ, ζ₁₃, ζ₁₄, ζ₁₅, lij, αij, σi, σij
  include/hyper_ideal_functional.hpp  — HyperIdealMaps, evaluate_hyper_ideal,
                                        gradient_check
  tests/cgal/test_hyper_ideal_functional.cpp  — 6 tests (1 skipped @Ignore)

Test results (local, -DWITH_CGAL=ON):
  conformallab_cgal_tests: 21 registered | 20 passed | 1 skipped | 0 failed
    - GradientCheck_AllHyperIdealTriangle   ✓
    - GradientCheck_ExtendedDomain          ✓
    - GradientCheck_TetrahedronAllVariable  ✓
    - EnergyFiniteAtTestPoint               ✓
    - GradientCheck_MixedIdealHyperIdeal    ✓
    - GradientCheck_Fan6AllVariable         ✓

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 23:10:23 +02:00
Tarik Moussa
bf9c323d60 feat(phase3a): introduce CGAL Surface_mesh as ConformalMesh foundation
Replaces the Java CoHDS with CGAL::Surface_mesh<Point3> (Simple_cartesian
kernel). Adds domain-specific property maps for lambda/theta/idx/alpha and
face geometry type — the direct C++ equivalent of CoVertex/CoEdge adapters.

New files:
  include/conformal_mesh.hpp   — ConformalMesh type + property-map helpers
  include/mesh_builder.hpp     — mesh factories (triangle, tetrahedron,
                                 quad-strip, fan) for tests and examples
  tests/cgal/                  — second test executable (conformallab_cgal_tests)
                                 built only with -DWITH_CGAL=ON

Test results (local, -DWITH_CGAL=ON):
  conformallab_tests:      36 registered | 23 passed | 13 skipped | 0 failed
  conformallab_cgal_tests: 14 registered | 14 passed |  0 skipped | 0 failed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 18:36:21 +02:00
Tarik Moussa
ae5db7216e tests: port HyperIdealVisualizationPlugin circle-projection tests
All checks were successful
C++ Tests / test (push) Successful in 2m29s
Mirror to Codeberg / mirror (push) Successful in 26s
Implements getEuclideanCircleFromHyperbolic() in C++ (hyperboloid model
→ Poincaré disk via Lorentz boost + circumcircle). Ports the 2 Java tests
that were the only remaining candidates not requiring HDS or a solver.

All other unported tests (DataTypesTest, SchottkyIOTest,
UniformizationDataTest, BranchedCoverTorusTest) are blocked by XML
serialization or HDS – stubs remain for Phase 4.

Test totals: 36 registered | 23 passed | 13 skipped | 0 failed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 17:23:15 +02:00
Tarik Moussa
c5a86cb30a tests: port DiscreteEllipticUtility + P2 tests; stub HDS-blocked tests
All checks were successful
C++ Tests / test (push) Successful in 2m39s
Mirror to Codeberg / mirror (push) Successful in 24s
Fully ported (pure math, no HDS required):
  test_discrete_elliptic_utility.cpp  – 2 tests
    normalizeModulus: move tau into SL(2,Z) fundamental domain
  test_p2_utility.cpp                 – 3 tests
    P2 projective geometry (perpendicularBisector, pointFromLines,
    makeDirectIsometryFromFrames double vs long double precision)

New headers:
  include/discrete_elliptic_utility.hpp  – normalizeModulus
  include/p2_utility.hpp                 – P2 Euclidean geometry (templated
    on scalar type so double and long double share one implementation)

Stubs (GTEST_SKIP, blocked until HDS port – Phase 4):
  test_hyper_ideal_functional.cpp          – 5 tests (1 @Ignore in Java)
  test_hyper_ideal_hyperelliptic_utility.cpp – 3 tests
  test_spherical_functional.cpp            – 5 tests
  All use CoHDS + HalfEdgeUtils which are not yet ported to C++.

Result: 34 tests total | 21 passed | 13 skipped | 0 failed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 17:15:18 +02:00
Tarik Moussa
9ab4fba9ed release: merge dev into main – v0.1.0
All checks were successful
C++ Tests / test (push) Successful in 1m55s
Mirror to Codeberg / mirror (push) Successful in 28s
Highlights:
- Three CMake build modes: tests-only (default), WITH_VIEWER, WITH_CGAL
- Boost removed as bundled dep; CGAL mode uses system Boost via find_package
- 16 GTest unit tests ported from Java (Clausen, HyperIdeal, Matrix, SurfaceCurve)
- Gitea Actions CI pipeline with custom ARM64 Docker image (ci-cpp:latest)
- Automatic Codeberg mirror on push to main/dev
- Dockerfile for CI image: .gitea/docker/Dockerfile.ci-cpp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.1.0
2026-05-10 00:46:42 +02:00
Tarik Moussa
b66525039d fix: gitignore – update CMakeLists.txt exception + ignore macOS duplicates
All checks were successful
C++ Tests / test (push) Successful in 2m13s
Mirror to Codeberg / mirror (push) Successful in 25s
- Exception updated to match renamed CMakeLists.txt (capital M)
- Add "* 2.*" / "* 3.*" patterns to suppress iCloud Drive duplicate
  files (e.g. "clausen 2.hpp") from appearing in git status

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 00:22:53 +02:00
Tarik Moussa
6a70309a30 fix: rename deps/Cmakelists.txt → CMakeLists.txt (case-sensitive Linux fix)
Some checks failed
C++ Tests / test (push) Has started running
Mirror to Codeberg / mirror (push) Has been cancelled
macOS filesystem is case-insensitive so both spellings worked locally,
but the Linux container (CI) could not find the file and failed with
"does not contain a CMakeLists.txt file".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 00:22:16 +02:00
Tarik Moussa
42dd815591 cmake: add find_package(Boost) for WITH_CGAL mode
Some checks failed
C++ Tests / test (push) Failing after 41s
Mirror to Codeberg / mirror (push) Successful in 35s
CGAL 6.x still unconditionally includes boost/config.hpp in its
config.h, so Boost headers are required even with CGAL_DISABLE_GMP/MPFR.

Use system Boost via find_package instead of the removed 211 MB tarball.
Tests-only mode remains completely dependency-free.

Install: brew install boost  (macOS)
         apt install libboost-dev  (Debian/Ubuntu)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 00:20:38 +02:00
Tarik Moussa
b9f739319f ci: fix mirror workflow – remove actions/checkout (needs Node.js)
Some checks failed
C++ Tests / test (push) Failing after 1m12s
Replace JS action with plain git clone --bare + push --mirror.
No Node.js required → runs directly on the Pi host without a container.
Also upgrades from single-branch push to a full mirror of all refs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 00:15:43 +02:00
Tarik Moussa
488223f75d docker: replace g++ + make with build-essential
Some checks failed
Mirror to Codeberg / mirror (push) Failing after 2s
C++ Tests / test (push) Has started running
build-essential pulls gcc, g++, make and libc-dev together.
CMake declares LANGUAGES C CXX so it needs a C compiler (cc) too –
individual g++ install can leave gaps that build-essential covers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 23:03:25 +02:00
Tarik Moussa
c9c9320907 docker: add make to ci-cpp image (CMake build program was missing)
Some checks failed
C++ Tests / test (push) Has been cancelled
Mirror to Codeberg / mirror (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 23:02:17 +02:00
Tarik Moussa
f65d000227 ci: re-enable ci-cpp container (arm64 image now in registry)
Some checks failed
C++ Tests / test (push) Failing after 36s
Mirror to Codeberg / mirror (push) Failing after 3s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:59:44 +02:00
Tarik Moussa
076d1b30d0 ci: fix pipeline – remove container until arm64 image is rebuilt
Some checks failed
C++ Tests / test (push) Failing after 2s
Mirror to Codeberg / mirror (push) Failing after 2s
The ci-cpp image was likely built for linux/amd64; the eulernest runner
is linux/arm64 (Raspberry Pi), so the container exited immediately
without running any steps (task 102 log: 10 lines, no step output).

Fix: run directly on the host runner and install cmake/g++ via apt-get
(same approach as the previously working workflow).

Also pin --platform=linux/arm64 in Dockerfile.ci-cpp so the next
image build produces the correct architecture. Once the image is pushed,
re-add the container: block to the workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:41:47 +02:00
Tarik Moussa
9889c4d811 ci: add mirror-to-codeberg workflow
Some checks failed
C++ Tests / test (push) Failing after 53s
Automatically pushes main and dev to the Codeberg mirror
(codeberg.org/TMoussa/ConformalLabpp) after every push to eulernest.
Requires CODEBERG_TOKEN secret in the eulernest repo settings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:04:32 +02:00
Tarik Moussa
54c455449b merge feature/cgal-eigen-visualizer into dev
Some checks failed
C++ Tests / test (push) Failing after 1s
- cmake: three build modes (tests-only / WITH_VIEWER / WITH_CGAL)
- deps: Boost removed (unused, 211 MB), conditional dep extraction
- ci: Dockerfile.ci-cpp + container-based workflow
- docs: README rewritten to reflect current state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 22:01:06 +02:00
Tarik Moussa
e59f79a8e2 docs + ci: update README, add ci-cpp Docker image, use container in workflow
README:
- Remove stale Boost mention (unused dep, removed yesterday)
- Document three build modes (tests-only / WITH_VIEWER / WITH_CGAL)
  with a comparison table and per-mode cmake commands
- Add project structure overview
- Fix C++20 → C++17 (actual standard used)
- Fix clone URL and getting-started commands
- Add CI section with Dockerfile build instructions

CI:
- Add .gitea/docker/Dockerfile.ci-cpp — ubuntu:22.04 with cmake,
  g++, git, and Node.js 20 pre-installed (Node.js needed for
  actions/checkout@v4 inside containers)
- Update cpp-tests.yml to use ci-cpp container instead of installing
  build tools on every run; add JUnit XML output and summary step

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 21:49:44 +02:00
Tarik Moussa
cd7b7a8fd8 cmake: add WITH_CGAL / WITH_VIEWER modes, remove unused Boost
Restructures the CMake build into three clearly separated modes:

  (default)        tests only – Eigen + GTest, no heavy deps
  -DWITH_VIEWER=ON builds viewer lib (libigl / GLFW / GLAD)
  -DWITH_CGAL=ON   builds conformallab_core CLI app;
                   implies WITH_VIEWER automatically

Changes:
- code/CMakeLists.txt: viewer and core targets are now guarded by
  option() flags; GTest / tests target is always built
- code/deps/Cmakelists.txt: CGAL, libigl, glfw, glad are only
  extracted when the corresponding mode is enabled; Eigen always
- Remove Boost (211 MB tarball, 0 usages in the codebase – CGAL 6.x
  does not require Boost for Simple_cartesian / Surface_mesh / basic IO)
- Remove code/src/main.cpp (dead file, not referenced in CMake)

All 16 C++ tests pass in tests-only mode (verified locally).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 21:42:43 +02:00
Tarik Moussa
5337a9e5a7 ci: use eulernest runner (Raspberry Pi, ARM64)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 14:51:45 +02:00
Tarik Moussa
d909683a5b add Gitea Actions workflow for C++ tests
Runs conformallab_tests (GTest) on every push to main/dev/claude/**
using ubuntu-latest + cmake + g++. Only the test binary is built,
not the full app (no CGAL/Boost compilation needed).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:35:23 +02:00
Tarik Moussa
a2876b9cbf port MatrixUtility and SurfaceCurveUtility tests to C++
- include/matrix_utility.hpp: 4x4 mapping matrix R·from=to (Eigen)
- include/projective_math.hpp: dehomogenize, hyperbolicDistance,
  isOnSegment (collinearity + betweenness via 3D cross/dot),
  getPointOnCorrespondingSegment (parameter by arc-length ratio)
- test_matrix_utility.cpp: port of MatrixUtilityTest (1 test)
- test_surface_curve_utility.cpp: port of SurfaceCurveUtilityTest
  testIsBetween and testGetPointOnSegment_SegmentEdge (2 tests)
- tolerance adjusted to 1e-12 for matrix inversion (2.7e-15 rounding
  from Eigen vs jReality's LU; both well within meaningful accuracy)

Total: 16/16 tests pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 01:15:35 +02:00
Tarik Moussa
c30d540521 add GTest infrastructure and port first mathematical tests from Java
- Add Google Test via CMake FetchContent (v1.14.0)
- Add clausen.hpp: Clausen integral, Lobachevsky function, Im(Li2)
- Add hyper_ideal_utility.hpp: generalized and ideal-vertex hyperbolic
  tetrahedron volume formulas using Eigen for the 4x4 Gram determinant
- Port ClausenTest (5 tests) and HyperIdealUtilityTest (8 tests) from
  Java/JUnit — all 13 pass with same tolerances as the Java originals
- Fix pre-existing VIEWER/viewer case mismatch in CMakeLists.txt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 01:07:19 +02:00
Tarik Moussa
94533514fc fix typo 2026-03-17 21:25:33 +02:00
Tarik Moussa
e150cf6ef3 add new compile target for viewer 2026-03-17 21:18:59 +02:00
Tarik Moussa
2479aedeee ad simple visualization 2026-03-16 17:47:48 +02:00
Tarik Moussa
1ce993f296 ad simple visualization 2026-03-16 17:20:15 +02:00
Tarik Moussa
d134add5a6 update readme 2026-03-07 11:25:56 +02:00
Tarik Moussa
14c825dcf0 v0 2026-03-06 21:55:16 +02:00
Tarik Moussa
e1a90dbd85 fix typo 2026-03-06 21:43:54 +02:00
Tarik Moussa
5be43c90bc add dep liblig 2026-03-04 13:42:26 +02:00
Tarik Moussa
2499ee862f .git/MERGE_MSG 2026-03-02 22:20:24 +02:00
user2595
82e1a72bf1 doc/architecture/overall_pipeline.md aktualisiert 2026-03-02 18:11:53 +01:00
user2595
a2e3dae414 doc/architecture/overall_pipeline.md aktualisiert 2026-03-02 15:56:38 +01:00
user2595
439cbfc44c doc/architecture/overall_pipeline.md aktualisiert
Final the first
2026-03-02 14:46:48 +01:00
Tarik Moussa
f3b7453a45 add CMake dependency handling for portability 2026-02-16 18:18:39 +02:00
Tarik Moussa
edc9415744 .git/MERGE_MSG 2026-02-16 08:14:41 +02:00
Tarik Moussa
1d20c3a195 add CMake dependency handling for portability 2026-02-16 08:13:46 +02:00
user2595
3a4fee3f76 doc/architecture/overall_pipeline.md hinzugefügt 2026-02-15 13:54:11 +01:00
Tarik Moussa
b7875f3b88 add CMake dependency handling for portability 2026-02-14 22:23:21 +02:00
Tarik Moussa
fbd3b26acc CLI11.hpp 2026-02-09 21:43:21 +02:00
Tarik Moussa
6d283fd952 json.hpp 2026-02-09 21:35:54 +02:00
Tarik Moussa
119601d639 CMakeList.txt 2026-02-09 21:30:36 +02:00
Tarik Moussa
a140f439a6 README.md 2026-02-09 20:05:35 +02:00
user2595
a0dbdb8818 Initial commit 2026-02-09 18:39:03 +01:00