CDT++
Causal Dynamical Triangulations in C++
Loading...
Searching...
No Matches
Macros | Functions | Variables
bistellar-flip.cpp File Reference

Tests and views bistellar flips. More...

#include <doctest/doctest.h>
#include <spdlog/spdlog.h>
#include <numbers>
#include "Ergodic_moves_3.hpp"
+ Include dependency graph for bistellar-flip.cpp:

Go to the source code of this file.

Functions

auto bistellar_triangulation_vertices () -> std::vector< Point_t< 3 > >
 
 catch (...)
 
 catch (std::exception const &e)
 
auto main (int const argc, char *argv[]) -> int try
 
 SCENARIO ("Perform bistellar flip on Delaunay triangulation" *doctest::test_suite("bistellar"))
 

Variables

static std::floating_point auto constexpr INV_SQRT_2 = 1 / SQRT_2
 
static std::floating_point auto constexpr SQRT_2
 

Detailed Description

Tests and views bistellar flips.

This is a unit test of the bistellar flip algorithm. The reason it is not in /tests is because it uses CGAL::draw() to display the results, which requires Qt5. Qt5 is extremely heavy and not needed for the other unit tests, so I don't want to require/link it to the test binary.

Author
Adam Getchell

Definition in file bistellar-flip.cpp.

Macro Definition Documentation

◆ DOCTEST_CONFIG_IMPLEMENT

#define DOCTEST_CONFIG_IMPLEMENT

Definition at line 20 of file bistellar-flip.cpp.

Function Documentation

◆ bistellar_triangulation_vertices()

auto bistellar_triangulation_vertices ( ) -> std::vector<Point_t<3>>

Definition at line 33 of file bistellar-flip.cpp.

◆ catch() [1/2]

catch (   ...)

Definition at line 86 of file bistellar-flip.cpp.

◆ catch() [2/2]

catch ( std::exception const &  e)

Definition at line 80 of file bistellar-flip.cpp.

◆ main()

auto main ( int const  argc,
char *  argv[] 
) -> int try

Definition at line 46 of file bistellar-flip.cpp.

◆ SCENARIO()

SCENARIO ( "Perform bistellar flip on Delaunay triangulation" *  doctest::test_suite"bistellar")

FIXME: This fails because the triangulation is not valid after the flip neighbor of c has not c as neighbor

Definition at line 92 of file bistellar-flip.cpp.

Referenced by SCENARIO().

Variable Documentation

◆ INV_SQRT_2

std::floating_point auto constexpr INV_SQRT_2 = 1 / SQRT_2
inlinestaticconstexpr

Definition at line 31 of file bistellar-flip.cpp.

◆ SQRT_2

std::floating_point auto constexpr SQRT_2
inlinestaticconstexpr
Initial value:
=
std::numbers::sqrt2_v<double>

Definition at line 29 of file bistellar-flip.cpp.