Files
ConformalLabpp/code/tests/cgal/CMakeLists.txt
Tarik Moussa de3a35ad4f
All checks were successful
C++ Tests / test-fast (push) Successful in 2m0s
C++ Tests / test-cgal (push) Has been skipped
test: Java-Konvergenz- + Homologie-Tests portiert — 173 CGAL-Tests
Mesh-Dateien aus Java-Referenzimplementierung übernommen:
  code/data/obj/cathead.obj    — offenes Mesh (Java: cathead.obj)
  code/data/obj/tetraflat.obj  — flaches Tetraeder (Java: tetraflat.obj)
  code/data/obj/brezel.obj     — Genus-1-Brezel (Java: brezel.obj)
  code/data/obj/brezel2.obj    — Genus-2-Brezel, V=2622 F=5248 χ=−2 (Java: brezel2.obj)
code/.gitignore: !data/**/*.obj — Mesh-Daten von *.obj-Regel ausgenommen.

Neue Tests in test_geometry_utils.cpp:

  HomologyGenerators.Genus2_FourCutEdges                    [vorher: GTEST_SKIP]
    Java: HomologyTest.testHomology — brezel2.obj, expects paths.size()==4
    C++:  compute_cut_graph(brezel2) → cut_edge_indices.size()==4, genus==2

  EuclideanLayout.DoLayout_TetraFlat_EdgeLengthsPreserved   [neu]
    Java: EuclideanLayoutTest.testDoLayout — tetraflat.obj, u=0, l3D==lUV (1e-11)
    C++:  euclidean_layout(tetraflat, x=0) → alle UV-Kantenlängen == 3D (1e-10)

  EuclideanLayout.CatHead_NewtonConverges_AngleSumsTwoPi    [neu]
    Java: EuclideanLayoutTest.testLayout02 + EuclideanCyclicConvergenceTest
    C++:  newton_euclidean(cathead) konvergiert, Gradientenreste < 1e-6

  SphericalLayout.SphericalTetrahedron_NewtonConverges_AngleSumsTwoPi [neu]
    Java: SphericalConvergenceTest.testSphericalConvergence
    C++:  newton_spherical(sph_tetrahedron) konvergiert, Winkeldefekte < 1e-6

CMakeLists.txt: CONFORMALLAB_DATA_DIR=${CMAKE_SOURCE_DIR}/data als Compile-Def.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 01:33:21 +02:00

85 lines
3.4 KiB
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# tests/cgal/CMakeLists.txt
#
# CGAL-dependent test target. Only built when -DWITH_CGAL=ON.
# Requires Boost (find_package(Boost REQUIRED) is called in the root CMakeLists).
#
# Run with:
# cmake -S code -B build -DWITH_CGAL=ON
# cmake --build build --target conformallab_cgal_tests
# ctest --test-dir build -R cgal
add_executable(conformallab_cgal_tests
# ── Phase 3a: mesh infrastructure ──────────────────────────────────────
test_conformal_mesh.cpp
# ── Phase 3b: HyperIdealFunctional ─────────────────────────────────────
test_hyper_ideal_functional.cpp
# ── Phase 3c + 3e: SphericalFunctional + gauge-fix ────────────────────
test_spherical_functional.cpp
# ── Phase 3d: EuclideanCyclicFunctional ───────────────────────────────
test_euclidean_functional.cpp
# ── Phase 3f: Hessians (cotangent Laplacian, spherical + Euclidean) ───
test_euclidean_hessian.cpp
test_spherical_hessian.cpp
# ── Phase 4a: Newton solver ────────────────────────────────────────────
test_newton_solver.cpp
# ── Phase 4b: Mesh I/O (CGAL::IO) ─────────────────────────────────────
test_mesh_io.cpp
# ── Phase 4c: End-to-end pipeline + user examples ─────────────────────
test_pipeline.cpp
# ── Phase 5: Layout / embedding + serialization ────────────────────────
test_layout.cpp
# ── Phase 6: GaussBonnet, cut graph, exact trilateration, normalisation
test_phase6.cpp
# ── Phase 7: Java-parity layout — MobiusMap, priority BFS, halfedge_uv,
# period matrix, fundamental domain, tiling
test_phase7.cpp
# ── Java-Parität: Geometrie-Utility-Tests ─────────────────────────────────
# Portiert aus CuttinUtilityTest, UnwrapUtilityTest,
# ConvergenceUtilityTests, HomologyTest (Tests 16).
# Test 7 (Genus-2-Homologie) als GTEST_SKIP-Stub bis Phase 8.
test_geometry_utils.cpp
)
target_include_directories(conformallab_cgal_tests SYSTEM PRIVATE
${CMAKE_SOURCE_DIR}/deps/eigen-3.4.0
${CMAKE_SOURCE_DIR}/deps/CGAL-6.1.1/include
${CMAKE_SOURCE_DIR}/deps/single_includes
${Boost_INCLUDE_DIRS}
)
target_include_directories(conformallab_cgal_tests PRIVATE
${CMAKE_SOURCE_DIR}/include
)
target_compile_definitions(conformallab_cgal_tests PRIVATE
CGAL_DISABLE_GMP
CGAL_DISABLE_MPFR
# Data directory — absolute path to code/data/ at build time.
# Used by tests that load real mesh files (cathead.obj, brezel2.obj, …).
CONFORMALLAB_DATA_DIR="${CMAKE_SOURCE_DIR}/data"
)
# Suppress warnings from CGAL/Boost headers
target_compile_options(conformallab_cgal_tests PRIVATE
$<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-Wno-unused-parameter>
)
target_link_libraries(conformallab_cgal_tests PRIVATE GTest::gtest_main)
include(GoogleTest)
gtest_discover_tests(conformallab_cgal_tests
TEST_PREFIX "cgal."
DISCOVERY_TIMEOUT 60
)