CDT++ 1.0.0
Causal Dynamical Triangulations in C++
Loading...
Searching...
No Matches
Triangulation_traits.hpp
Go to the documentation of this file.
1/*******************************************************************************
2 Causal Dynamical Triangulations in C++ using CGAL
3
4 Copyright © 2021 Adam Getchell
5 ******************************************************************************/
6
15
16#ifndef CDT_PLUSPLUS_TRIANGULATION_TRAITS_HPP
17#define CDT_PLUSPLUS_TRIANGULATION_TRAITS_HPP
18
19#include <CGAL/Delaunay_triangulation_3.h>
20#include <CGAL/Delaunay_triangulation_cell_base_3.h>
21#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
22#include <CGAL/point_generators_3.h>
23#include <CGAL/tags.h>
24#include <CGAL/Triangulation_cell_base_with_info_3.h>
25#include <CGAL/Triangulation_data_structure_3.h>
26#include <CGAL/Triangulation_vertex_base_with_info_3.h>
27
28#include <utility>
29#include <vector>
30
31#include "Settings.hpp"
32
33namespace cdt::detail
34{
35 template <int dimension>
36 struct TriangulationTraits;
37
38 template <>
39 struct TriangulationTraits<3>
40 {
41 using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
42 using Vertex_base =
43 CGAL::Triangulation_vertex_base_with_info_3<Int_precision, Kernel>;
44 using Delaunay_cell_base = CGAL::Delaunay_triangulation_cell_base_3<Kernel>;
45 using Cell_base =
46 CGAL::Triangulation_cell_base_with_info_3<Int_precision, Kernel,
47 Delaunay_cell_base>;
48#if defined(CDT_ENABLE_PARALLEL_TRIANGULATION) && \
49 CDT_ENABLE_PARALLEL_TRIANGULATION
50#ifndef CGAL_LINKED_WITH_TBB
51#error "Parallel CDT++ triangulations require CGAL::TBB_support."
52#endif
53 using Concurrency_tag = CGAL::Parallel_tag;
54#else
55 using Concurrency_tag = CGAL::Sequential_tag;
56#endif
57 using Tds = CGAL::Triangulation_data_structure_3<Vertex_base, Cell_base,
58 Concurrency_tag>;
59 using Delaunay = CGAL::Delaunay_triangulation_3<Kernel, Tds>;
60
61 using Cell_handle = Delaunay::Cell_handle;
62 using Facet = Delaunay::Facet;
63 using Edge_handle = Delaunay::Edge;
64 using Vertex_handle = Delaunay::Vertex_handle;
65 using Point = Delaunay::Point;
66 using Causal_vertices = std::vector<std::pair<Point, Int_precision>>;
67
72 using squared_distance = Kernel::Compute_squared_distance_3;
73
74 using Spherical_points_generator = CGAL::Random_points_on_sphere_3<Point>;
75
76 static inline Point const ORIGIN_POINT = Point{0, 0, 0};
77 }; // TriangulationTraits<3>
78} // namespace cdt::detail
79
80#endif // CDT_PLUSPLUS_TRIANGULATION_TRAITS_HPP
Vertex_handle_t< 3 > Vertex_handle
Three-dimensional CGAL vertex handle.
Edge_handle_t< 3 > Edge_handle
Three-dimensional CGAL edge descriptor.
Cell_handle_t< 3 > Cell_handle
Three-dimensional CGAL cell handle.
Delaunay_t< 3 > Delaunay
Three-dimensional Delaunay triangulation used by move implementations.
Global integer and precision settings.
std::int32_t Int_precision
Definition Settings.hpp:30