CDT++
Causal Dynamical Triangulations in C++
Loading...
Searching...
No Matches
Torus_test.cpp
Go to the documentation of this file.
1
10
11#include <doctest/doctest.h>
12
13#include "Torus_d.hpp"
14
15SCENARIO("Torus construction" * doctest::test_suite("torus"))
16{
17 std::size_t constexpr NUMBER_OF_POINTS = 250;
18 std::vector<Point> points;
19 points.reserve(NUMBER_OF_POINTS);
20 GIVEN("A 2-torus")
21 {
22 WHEN("A 2-torus is constructed.")
23 {
24 THEN("It should not throw.")
25 {
26 int constexpr dim = 3;
27 REQUIRE_NOTHROW(make_d_cube(points, NUMBER_OF_POINTS, dim));
28 }
29 }
30 }
31 GIVEN("A constructed 2-torus")
32 {
33 int constexpr dim = 3;
34 make_d_cube(points, NUMBER_OF_POINTS, dim);
35 WHEN("The type is queried")
36 {
37 THEN("A result should be returned.")
38 {
39 fmt::print("Torus = {}",
40 boost::typeindex::type_id_with_cvr<decltype(points)>()
41 .pretty_name());
42 }
43 }
44 }
45 GIVEN("A 3-torus")
46 {
47 WHEN("A 3-torus is constructed.")
48 {
49 THEN("It should not throw.")
50 {
51 int constexpr dim = 4;
52 REQUIRE_NOTHROW(make_d_cube(points, NUMBER_OF_POINTS, dim));
53 }
54 }
55 }
56}
Functions on d-dimensional torus.
auto make_d_cube(std::vector< Point > t_points, std::size_t t_number_of_points, int t_dimension)
Make a d-dimensional torus.
Definition: Torus_d.hpp:34
SCENARIO("Perform bistellar flip on Delaunay triangulation" *doctest::test_suite("bistellar"))