CDT++ 1.0.0-rc3
Causal Dynamical Triangulations in C++
Loading...
Searching...
No Matches
cdt::foliated_triangulations Namespace Reference

Supported construction, inspection, classification, and repair operations for foliated Delaunay triangulations. More...

Classes

class  FoliatedTriangulation
class  FoliatedTriangulation< 3 >
 3D Foliated triangulation More...

Typedefs

using FoliatedTriangulation_3 = FoliatedTriangulation<3>
 Three-dimensional foliated Delaunay triangulation.

Functions

template<int dimension>
auto check_cells (Delaunay_t< dimension > const &t_triangulation) -> bool
 Check all finite cells in the Delaunay triangulation.
template<int dimension>
auto check_vertices (Delaunay_t< dimension > const &t_triangulation, double t_initial_radius, double t_foliation_spacing)
 Check if vertices have the correct timevalues.
template<int dimension>
auto classify_edge (Edge_handle_t< dimension > const &t_edge) -> EdgeType
 Predicate to classify edge as timelike or spacelike.
template<int dimension>
auto collect_cells (Delaunay_t< dimension > const &t_triangulation) -> std::vector< Cell_handle_t< dimension > >
 Obtain all finite cells in the Delaunay triangulation.
template<int dimension>
auto collect_edges (Delaunay_t< dimension > const &delaunay)
 Returns a container of all the finite edges in the triangulation.
template<int dimension, detail::ConstForwardRange Container>
auto collect_spacelike_facets (Container const &t_facets) -> std::vector< std::pair< Int_precision, Facet_t< dimension > > >
 Collect spacelike facets into a contiguous container ordered by time value.
template<int dimension>
auto collect_vertices (Delaunay_t< dimension > const &t_triangulation)
 Obtain all finite vertices in the Delaunay triangulation.
template<int dimension, detail::ConstForwardRange Container>
void debug_print_cells (Container const &t_cells)
 Write to debug log timevalues of each vertex in the cell and the resulting cell->info.
template<int dimension>
auto expected_cell_type (Cell_handle_t< dimension > const &t_cell)
 Classifies cells by their timevalues.
template<int dimension>
auto expected_timevalue (Vertex_handle_t< dimension > const &t_vertex, double t_initial_radius, double t_foliation_spacing) -> Int_precision
 Find the expected timevalue for a vertex.
template<int dimension>
auto filter_cells (std::vector< Cell_handle_t< dimension > > const &t_cells, CellType const &t_cell_type) -> std::vector< Cell_handle_t< dimension > >
template<int dimension>
auto filter_edges (std::vector< Edge_handle_t< dimension > > const &t_edges, EdgeType const edge_type) -> std::vector< Edge_handle_t< dimension > >
template<int dimension>
auto find_bad_vertex (Cell_handle_t< dimension > const &cell) -> Vertex_handle_t< dimension >
 Find the vertex that is causing a cell's foliation to be invalid.
template<int dimension>
auto find_cell (Delaunay_t< dimension > const &delaunay, Vertex_handle_t< dimension > const &vh1, Vertex_handle_t< dimension > const &vh2, Vertex_handle_t< dimension > const &vh3, Vertex_handle_t< dimension > const &vh4) -> std::optional< Cell_handle_t< dimension > >
 Returns the cell containing the vertices.
template<int dimension>
auto find_incorrect_cells (Delaunay_t< dimension > const &t_triangulation)
 Check all finite cells in the Delaunay triangulation.
template<int dimension>
auto find_incorrect_vertices (Delaunay_t< dimension > const &t_triangulation, double t_initial_radius, double t_foliation_spacing)
 Obtain vertices with incorrect timevalues.
template<int dimension>
auto find_incorrect_vertices (std::vector< Cell_handle_t< dimension > > const &t_cells, double t_initial_radius, double t_foliation_spacing)
 Obtain vertices with incorrect timevalues.
template<int dimension>
auto find_invalid_timevalue_cells (Delaunay_t< dimension > const &t_triangulation) -> std::vector< Cell_handle_t< dimension > >
 Find cells whose vertex timevalues violate foliation.
template<int dimension, detail::ConstForwardRange Container>
auto find_max_timevalue (Container const &t_vertices) -> Int_precision
template<int dimension, detail::ConstForwardRange Container>
auto find_min_timevalue (Container const &t_vertices) -> Int_precision
template<int dimension>
auto find_vertex (Delaunay_t< dimension > const &delaunay, Point_t< dimension > const &point) -> std::optional< Vertex_handle_t< dimension > >
 Find the vertex whose stored point equals the requested point.
template<int dimension>
auto fix_cells (Delaunay_t< dimension > &t_triangulation) -> bool
 Fix simplices with the wrong type.
template<int dimension>
auto fix_timevalues (Delaunay_t< dimension > &t_triangulation) -> bool
 Fix the vertices of a cell to be consistent with the foliation.
template<int dimension>
auto fix_vertices (Delaunay_t< dimension > &t_triangulation, double const t_initial_radius, double const t_foliation_spacing) -> bool
 Fix vertices with incorrect timevalues.
template<int dimension>
auto fix_vertices (std::vector< Cell_handle_t< dimension > > const &t_cells, double t_initial_radius, double t_foliation_spacing)
 Fix vertices with incorrect timevalues.
template<int dimension>
auto get_vertices_from_cells (std::vector< Cell_handle_t< dimension > > const &t_cells)
 Extracts vertices from cells.
template<int dimension>
auto has_valid_timevalues (Delaunay_t< dimension > const &triangulation) -> bool
 Check whether all cell timevalues form a valid foliation.
template<int dimension>
auto is_cell_type_correct (Cell_handle_t< dimension > const &t_cell) -> bool
 Checks if a cell is classified correctly.
template<int dimension>
auto is_vertex_timevalue_correct (Vertex_handle_t< dimension > const &t_vertex, double const t_initial_radius, double const t_foliation_spacing) -> bool
 Checks if vertex timevalue is correct.
template<int dimension>
auto make_causal_vertices (std::span< Point_t< dimension > const > vertices, std::span< size_t const > timevalues) -> Causal_vertices_t< dimension >
 Create causal vertices from vertices and timevalues.
template<int dimension, std::uniform_random_bit_generator Generator>
auto make_foliated_ball (Int_precision const t_simplices, Int_precision const t_timeslices, double const initial_radius, double const foliation_spacing, Generator &generator)
 Make foliated ball.
template<int dimension, std::uniform_random_bit_generator Generator>
auto make_triangulation (Int_precision const t_simplices, Int_precision t_timeslices, double const initial_radius, double const foliation_spacing, Generator &generator) -> Delaunay_t< dimension >
 Make a Delaunay triangulation.
template<int dimension>
void print_cell (Cell_handle_t< dimension > cell)
 Print a cell in the triangulation.
template<int dimension, detail::ConstForwardRange Container>
void print_cells (Container const &t_cells)
 Print timevalues of each vertex in the cell and the resulting cell->info().
template<int dimension>
void print_edge (Edge_handle_t< dimension > const &t_edge)
 Print edge.
template<int dimension>
void print_neighboring_cells (Cell_handle_t< dimension > cell)
 Print neighboring cells.
template<int dimension>
auto squared_radius (Vertex_handle_t< dimension > const &t_vertex) -> double
 Calculate the squared radius from the origin.
template<int dimension, detail::ConstForwardRange Container>
auto volume_per_timeslice (Container const &t_facets) -> std::multimap< Int_precision, Facet_t< dimension > >
 Collect spacelike facets into a container indexed by time value.

Variables

template<int dimension>
constexpr auto compare_v_info

Detailed Description

Supported construction, inspection, classification, and repair operations for foliated Delaunay triangulations.

CGAL handles and descriptors returned by these operations borrow from the triangulation named by the function. All handles supplied to one operation must be valid and belong to that same triangulation. Copying a triangulation does not transfer handle provenance, and topology mutation may invalidate outstanding handles, iterators, circulators, and descriptors.

See also
Multithreaded CGAL contract

Typedef Documentation

◆ FoliatedTriangulation_3

Three-dimensional foliated Delaunay triangulation.

Definition at line 2068 of file Foliated_triangulation.hpp.

Function Documentation

◆ check_cells()

template<int dimension>
auto cdt::foliated_triangulations::check_cells ( Delaunay_t< dimension > const & t_triangulation) -> bool
nodiscard

Check all finite cells in the Delaunay triangulation.

Template Parameters
dimensionDimensionality of the Delaunay triangulation
Parameters
t_triangulationThe Delaunay triangulation
Returns
True if there are no finite cells, or all finite cells are correctly classified

Definition at line 890 of file Foliated_triangulation.hpp.

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::check_all_cells().

◆ check_vertices()

template<int dimension>
auto cdt::foliated_triangulations::check_vertices ( Delaunay_t< dimension > const & t_triangulation,
double t_initial_radius,
double t_foliation_spacing )
nodiscard

Check if vertices have the correct timevalues.

Template Parameters
dimensionDimensionality of the vertices and Delaunay triangulation
Parameters
t_triangulationThe Delaunay triangulation
t_initial_radiusThe initial radius of the radial foliation
t_foliation_spacingThe spacing between successive leaves
Returns
True if all vertices have correct timevalues

Definition at line 676 of file Foliated_triangulation.hpp.

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::check_all_vertices().

◆ classify_edge()

template<int dimension>
auto cdt::foliated_triangulations::classify_edge ( Edge_handle_t< dimension > const & t_edge) -> EdgeType
nodiscard

Predicate to classify edge as timelike or spacelike.

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_edgeThe Edge_handle to classify
Returns
The causal edge classification

Definition at line 534 of file Foliated_triangulation.hpp.

References CDT_PRETTY_FUNCTION, cdt::SPACELIKE, and cdt::TIMELIKE.

Referenced by filter_edges(), and cdt::foliated_triangulations::FoliatedTriangulation< 3 >::print_edges().

◆ collect_cells()

template<int dimension>
auto cdt::foliated_triangulations::collect_cells ( Delaunay_t< dimension > const & t_triangulation) -> std::vector< Cell_handle_t< dimension > >
nodiscard

Obtain all finite cells in the Delaunay triangulation.

Template Parameters
dimensionDimensionality of the Delaunay triangulation
Parameters
t_triangulationThe triangulation
Returns
Borrowed finite-cell handles tied to t_triangulation and subject to its mutation-invalidation rules.

Definition at line 693 of file Foliated_triangulation.hpp.

Referenced by cdt::ergodic_moves::do_23_move(), find_incorrect_cells(), find_incorrect_vertices(), find_invalid_timevalue_cells(), fix_vertices(), and cdt::ergodic_moves::propose_23_move().

◆ collect_edges()

template<int dimension>
auto cdt::foliated_triangulations::collect_edges ( Delaunay_t< dimension > const & delaunay)
nodiscard

Returns a container of all the finite edges in the triangulation.

Regardless of the dimensionality of the triangulation, the edges are 1-d simplices connecting 0-d vertices.

Template Parameters
dimensionThe dimensionality of the triangulation
Parameters
delaunayThe triangulation
Returns
Borrowed finite-edge descriptors tied to delaunay and subject to its mutation-invalidation rules.

Definition at line 422 of file Foliated_triangulation.hpp.

Referenced by cdt::ergodic_moves::do_32_move(), cdt::ergodic_moves::do_44_move(), cdt::ergodic_moves::propose_32_move(), and cdt::ergodic_moves::propose_44_move().

◆ collect_spacelike_facets()

template<int dimension, detail::ConstForwardRange Container>
auto cdt::foliated_triangulations::collect_spacelike_facets ( Container const & t_facets) -> std::vector< std::pair< Int_precision, Facet_t< dimension > > >
nodiscard

Collect spacelike facets into a contiguous container ordered by time value.

Warning! Turning on debugging info will generate gigabytes of logs.

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_facetsFacets whose cell handles are valid and belong to one triangulation.
Returns
Contiguous container with spacelike facets per timeslice. The facet descriptors borrow from the source triangulation and follow its mutation-invalidation rules.

Definition at line 1027 of file Foliated_triangulation.hpp.

References CDT_PRETTY_FUNCTION.

Referenced by volume_per_timeslice().

◆ collect_vertices()

template<int dimension>
auto cdt::foliated_triangulations::collect_vertices ( Delaunay_t< dimension > const & t_triangulation)
nodiscard

Obtain all finite vertices in the Delaunay triangulation.

Template Parameters
dimensionDimensionality of the Delaunay triangulation
Parameters
t_triangulationThe Delaunay triangulation
Returns
Borrowed finite-vertex handles tied to t_triangulation and subject to its mutation-invalidation rules.

Definition at line 655 of file Foliated_triangulation.hpp.

Referenced by cdt::ergodic_moves::do_62_move(), and cdt::ergodic_moves::propose_62_move().

◆ debug_print_cells()

template<int dimension, detail::ConstForwardRange Container>
void cdt::foliated_triangulations::debug_print_cells ( Container const & t_cells)

Write to debug log timevalues of each vertex in the cell and the resulting cell->info.

Template Parameters
dimensionThe dimensionality of the simplices
ContainerThe type of container
Parameters
t_cellsThe cells to write to debug log

Definition at line 968 of file Foliated_triangulation.hpp.

Referenced by find_bad_vertex().

◆ expected_cell_type()

template<int dimension>
auto cdt::foliated_triangulations::expected_cell_type ( Cell_handle_t< dimension > const & t_cell)
nodiscard

◆ expected_timevalue()

template<int dimension>
auto cdt::foliated_triangulations::expected_timevalue ( Vertex_handle_t< dimension > const & t_vertex,
double t_initial_radius,
double t_foliation_spacing ) -> Int_precision
nodiscard

Find the expected timevalue for a vertex.

The formula for the expected timevalue is:

\[t=\frac{R-I+S}{S}\]

Where R is radius, I is the initial radius, and S is the foliation spacing.

Template Parameters
dimensionDimensionality of the vertex
Parameters
t_vertexThe vertex
t_initial_radiusThe initial radius of the radial foliation
t_foliation_spacingThe spacing between successive leaves
Precondition
t_vertex is a valid handle and both geometric parameters are finite, with t_foliation_spacing greater than zero.
Returns
The timeslice label implied by the vertex radius.

Definition at line 617 of file Foliated_triangulation.hpp.

References squared_radius().

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::expected_timevalue(), and is_vertex_timevalue_correct().

◆ filter_cells()

template<int dimension>
auto cdt::foliated_triangulations::filter_cells ( std::vector< Cell_handle_t< dimension > > const & t_cells,
CellType const & t_cell_type ) -> std::vector< Cell_handle_t< dimension > >
nodiscard
Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_cellsThe container of simplices
t_cell_typeThe type of simplex to filter by
Returns
A container of simplices filtered by type

Definition at line 575 of file Foliated_triangulation.hpp.

Referenced by cdt::ergodic_moves::do_23_move(), and cdt::ergodic_moves::propose_23_move().

◆ filter_edges()

template<int dimension>
auto cdt::foliated_triangulations::filter_edges ( std::vector< Edge_handle_t< dimension > > const & t_edges,
EdgeType const edge_type ) -> std::vector< Edge_handle_t< dimension > >
nodiscard
Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_edgesThe container of edges to filter
edge_typeThe edge classification to retain
Returns
A container of edges with the requested classification

Definition at line 557 of file Foliated_triangulation.hpp.

References classify_edge().

Referenced by cdt::ergodic_moves::do_32_move(), cdt::ergodic_moves::do_44_move(), cdt::ergodic_moves::propose_32_move(), and cdt::ergodic_moves::propose_44_move().

◆ find_bad_vertex()

template<int dimension>
auto cdt::foliated_triangulations::find_bad_vertex ( Cell_handle_t< dimension > const & cell) -> Vertex_handle_t< dimension >
nodiscard

Find the vertex that is causing a cell's foliation to be invalid.

Template Parameters
dimensionDimensionality of the cell
Parameters
cellValid cell handle from the triangulation being repaired.
Returns
A borrowed handle to the offending vertex in cell, with the same source-triangulation lifetime and invalidation rules.

Definition at line 1146 of file Foliated_triangulation.hpp.

References CDT_PRETTY_FUNCTION, and debug_print_cells().

Referenced by fix_timevalues().

◆ find_cell()

template<int dimension>
auto cdt::foliated_triangulations::find_cell ( Delaunay_t< dimension > const & delaunay,
Vertex_handle_t< dimension > const & vh1,
Vertex_handle_t< dimension > const & vh2,
Vertex_handle_t< dimension > const & vh3,
Vertex_handle_t< dimension > const & vh4 ) -> std::optional< Cell_handle_t< dimension > >
nodiscard

Returns the cell containing the vertices.

Template Parameters
dimensionThe dimensionality of the triangulation
Parameters
delaunayThe triangulation
vh1The first vertex
vh2The second vertex
vh3The third vertex
vh4The fourth vertex
Precondition
All four handles are valid and belong to delaunay.
Returns
A cell handle borrowing from delaunay, or std::nullopt when those vertices do not form a cell. The returned handle is subject to the triangulation's mutation-invalidation rules.
See also
https://doc.cgal.org/latest/Triangulation_3/classCGAL_1_1Triangulation__3.html#a8766c9a0c2a84203be31537e5e015646

Definition at line 472 of file Foliated_triangulation.hpp.

◆ find_incorrect_cells()

template<int dimension>
auto cdt::foliated_triangulations::find_incorrect_cells ( Delaunay_t< dimension > const & t_triangulation)
nodiscard

Check all finite cells in the Delaunay triangulation.

Template Parameters
dimensionDimensionality of the Delaunay triangulation
Parameters
t_triangulationThe Delaunay triangulation
Returns
Borrowed handles for incorrectly classified cells, tied to t_triangulation and subject to its mutation-invalidation rules.

Definition at line 904 of file Foliated_triangulation.hpp.

References collect_cells().

Referenced by fix_cells().

◆ find_incorrect_vertices() [1/2]

template<int dimension>
auto cdt::foliated_triangulations::find_incorrect_vertices ( Delaunay_t< dimension > const & t_triangulation,
double t_initial_radius,
double t_foliation_spacing )
nodiscard

Obtain vertices with incorrect timevalues.

Template Parameters
dimensionDimensionality of the vertices and Delaunay triangulation
Parameters
t_triangulationThe Delaunay triangulation
t_initial_radiusThe initial radius of the radial foliation
t_foliation_spacingThe spacing between successive leaves
Returns
Borrowed handles for vertices with incorrect timevalues, tied to t_triangulation and subject to its mutation-invalidation rules.

Definition at line 760 of file Foliated_triangulation.hpp.

References collect_cells(), and find_incorrect_vertices().

◆ find_incorrect_vertices() [2/2]

template<int dimension>
auto cdt::foliated_triangulations::find_incorrect_vertices ( std::vector< Cell_handle_t< dimension > > const & t_cells,
double t_initial_radius,
double t_foliation_spacing )
nodiscard

Obtain vertices with incorrect timevalues.

Template Parameters
dimensionDimensionality of vertices and cells
Parameters
t_cellsValid cells that all belong to one triangulation.
t_initial_radiusThe initial radius of the radial foliation
t_foliation_spacingThe spacing between successive leaves
Returns
Borrowed handles for vertices with incorrect timevalues, retaining the source triangulation's lifetime and invalidation rules.

Definition at line 735 of file Foliated_triangulation.hpp.

References get_vertices_from_cells().

Referenced by find_incorrect_vertices(), and fix_vertices().

◆ find_invalid_timevalue_cells()

template<int dimension>
auto cdt::foliated_triangulations::find_invalid_timevalue_cells ( Delaunay_t< dimension > const & t_triangulation) -> std::vector< Cell_handle_t< dimension > >
nodiscard

Find cells whose vertex timevalues violate foliation.

The timevalues of the vertices of a cell differ by at most one and cannot all be the same. The first case would correspond to the cell (simplex) spanning more than one timeslice; the second would correspond to the cell being purely spacelike. Both of these cases are causally inconsistent. Note that this takes a Delaunay triangulation as input, as it is expected to be called while the Foliated triangulation is still being constructed. Note also that to guard against numeric errors causing invalid cells, fix_vertices() should be called before this function.

Template Parameters
dimensionThe dimensionality of the cells and triangulation
Parameters
t_triangulationThe Delaunay triangulation
Returns
Borrowed handles for invalid cells, tied to t_triangulation and subject to its mutation-invalidation rules; empty means the foliation is valid.

Definition at line 1115 of file Foliated_triangulation.hpp.

References collect_cells().

Referenced by fix_timevalues(), and has_valid_timevalues().

◆ find_max_timevalue()

template<int dimension, detail::ConstForwardRange Container>
auto cdt::foliated_triangulations::find_max_timevalue ( Container const & t_vertices) -> Int_precision
nodiscard
Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_verticesThe container of vertices
Returns
The maximum timevalue in the container
Exceptions
std::invalid_argumentIf t_vertices is empty.

Definition at line 500 of file Foliated_triangulation.hpp.

References compare_v_info.

◆ find_min_timevalue()

template<int dimension, detail::ConstForwardRange Container>
auto cdt::foliated_triangulations::find_min_timevalue ( Container const & t_vertices) -> Int_precision
nodiscard
Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_verticesThe container of vertices
Returns
The minimum timevalue in the container
Exceptions
std::invalid_argumentIf t_vertices is empty.

Definition at line 517 of file Foliated_triangulation.hpp.

References compare_v_info.

◆ find_vertex()

template<int dimension>
auto cdt::foliated_triangulations::find_vertex ( Delaunay_t< dimension > const & delaunay,
Point_t< dimension > const & point ) -> std::optional< Vertex_handle_t< dimension > >
nodiscard

Find the vertex whose stored point equals the requested point.

Template Parameters
dimensionThe dimensionality of the triangulation
Parameters
delaunayThe triangulation
pointThe point to find the vertex for
Returns
A handle borrowing from delaunay, or std::nullopt when no vertex stores point. The handle is subject to the triangulation's mutation-invalidation rules.
See also
https://doc.cgal.org/latest/Triangulation_3/classCGAL_1_1Triangulation__3.html#a5b45572c663e5d2c10f26e7be421e140

Definition at line 446 of file Foliated_triangulation.hpp.

Referenced by cdt::ergodic_moves::detail::execute().

◆ fix_cells()

template<int dimension>
auto cdt::foliated_triangulations::fix_cells ( Delaunay_t< dimension > & t_triangulation) -> bool
nodiscard

Fix simplices with the wrong type.

Only cell metadata is changed; the triangulation topology and its handles are not replaced by this operation.

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_triangulationThe Delaunay triangulation
Returns
True if cells->info() was fixed

Definition at line 924 of file Foliated_triangulation.hpp.

References find_incorrect_cells().

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::fix_cells(), cdt::foliated_triangulations::FoliatedTriangulation< 3 >::is_fixed(), and make_triangulation().

◆ fix_timevalues()

template<int dimension>
auto cdt::foliated_triangulations::fix_timevalues ( Delaunay_t< dimension > & t_triangulation) -> bool
nodiscard

Fix the vertices of a cell to be consistent with the foliation.

Removes selected vertices from the triangulation. A successful repair changes its topology and may invalidate any outstanding handles, iterators, circulators, and facet or edge descriptors.

Template Parameters
dimensionDimensionality of the triangulation
Parameters
t_triangulationThe Delaunay triangulation
Returns
True if incorrectly foliated simplices were fixed

Definition at line 1182 of file Foliated_triangulation.hpp.

References find_bad_vertex(), and find_invalid_timevalue_cells().

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::is_fixed(), and make_triangulation().

◆ fix_vertices() [1/2]

template<int dimension>
auto cdt::foliated_triangulations::fix_vertices ( Delaunay_t< dimension > & t_triangulation,
double const t_initial_radius,
double const t_foliation_spacing ) -> bool
nodiscard

Fix vertices with incorrect timevalues.

Changes vertex->info() to the correct timevalue

Template Parameters
dimensionDimensionality of the vertices and Delaunay triangulation
Parameters
t_triangulationThe triangulation
t_initial_radiusThe initial radius of the radial foliation
t_foliation_spacingThe spacing between successive leaves
Returns
True if any vertex->info() was fixed

Definition at line 802 of file Foliated_triangulation.hpp.

References collect_cells(), and fix_vertices().

◆ fix_vertices() [2/2]

template<int dimension>
auto cdt::foliated_triangulations::fix_vertices ( std::vector< Cell_handle_t< dimension > > const & t_cells,
double t_initial_radius,
double t_foliation_spacing )
nodiscard

Fix vertices with incorrect timevalues.

Changes vertex->info() to the correct timevalue using foliated_triangulations::expected_timevalue

Template Parameters
dimensionDimensionality of vertices and cells
Parameters
t_cellsValid cells that all belong to one triangulation.
t_initial_radiusThe initial radius of the radial foliation
t_foliation_spacingPositive finite spacing between successive leaves.
Returns
True if any vertex->info() was fixed

Definition at line 779 of file Foliated_triangulation.hpp.

References find_incorrect_vertices().

Referenced by fix_vertices(), cdt::foliated_triangulations::FoliatedTriangulation< 3 >::fix_vertices(), cdt::foliated_triangulations::FoliatedTriangulation< 3 >::is_fixed(), and make_triangulation().

◆ get_vertices_from_cells()

template<int dimension>
auto cdt::foliated_triangulations::get_vertices_from_cells ( std::vector< Cell_handle_t< dimension > > const & t_cells)
nodiscard

Extracts vertices from cells.

Parameters
t_cellsValid cells that all belong to one triangulation.
Returns
Borrowed handles for all vertices contained in t_cells. They retain the cells' source-triangulation lifetime and invalidation rules.

Definition at line 711 of file Foliated_triangulation.hpp.

Referenced by find_incorrect_vertices().

◆ has_valid_timevalues()

template<int dimension>
auto cdt::foliated_triangulations::has_valid_timevalues ( Delaunay_t< dimension > const & triangulation) -> bool
nodiscard

Check whether all cell timevalues form a valid foliation.

Template Parameters
dimensionCompile-time triangulation dimension.
Parameters
triangulationTriangulation whose finite cells are classified.
Returns
Whether every finite cell has a supported causal classification.

Definition at line 1136 of file Foliated_triangulation.hpp.

References find_invalid_timevalue_cells().

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::is_foliated(), and make_triangulation().

◆ is_cell_type_correct()

template<int dimension>
auto cdt::foliated_triangulations::is_cell_type_correct ( Cell_handle_t< dimension > const & t_cell) -> bool
nodiscard

Checks if a cell is classified correctly.

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_cellThe simplex to check
Returns
True if the cell_info matches expected cell_info

Definition at line 875 of file Foliated_triangulation.hpp.

References cdt::ACAUSAL, expected_cell_type(), and cdt::UNCLASSIFIED.

Referenced by cdt::ergodic_moves::detail::find_adjacent_31_cell(), cdt::ergodic_moves::detail::find_bistellar_flip_location(), cdt::ergodic_moves::detail::is_32_movable(), cdt::ergodic_moves::detail::is_62_movable(), and cdt::ergodic_moves::detail::prepare_two_three().

◆ is_vertex_timevalue_correct()

template<int dimension>
auto cdt::foliated_triangulations::is_vertex_timevalue_correct ( Vertex_handle_t< dimension > const & t_vertex,
double const t_initial_radius,
double const t_foliation_spacing ) -> bool
nodiscard

Checks if vertex timevalue is correct.

Template Parameters
dimensionDimensionality of the vertex
Parameters
t_vertexThe vertex
t_initial_radiusThe initial radius of the radial foliation
t_foliation_spacingThe spacing between successive leaves
Returns
True if the timevalue of the vertex matches its effective radius

Definition at line 635 of file Foliated_triangulation.hpp.

References expected_timevalue().

◆ make_causal_vertices()

template<int dimension>
auto cdt::foliated_triangulations::make_causal_vertices ( std::span< Point_t< dimension > const > vertices,
std::span< size_t const > timevalues ) -> Causal_vertices_t< dimension >
nodiscard

Create causal vertices from vertices and timevalues.

Template Parameters
dimensionDimensionality of the manifold
Parameters
verticesThe vertices of the manifold
timevaluesThe timevalue of each vertex
Returns
A container of vertices that have an associated timevalue
Exceptions
std::length_errorIf the spans have different lengths.
std::out_of_rangeIf a timevalue cannot be represented by Int_precision.

Definition at line 392 of file Foliated_triangulation.hpp.

Referenced by cdt::manifolds::make_causal_vertices().

◆ make_foliated_ball()

template<int dimension, std::uniform_random_bit_generator Generator>
auto cdt::foliated_triangulations::make_foliated_ball ( Int_precision const t_simplices,
Int_precision const t_timeslices,
double const initial_radius,
double const foliation_spacing,
Generator & generator )
nodiscard

Make foliated ball.

Makes a solid ball of successive layers of spheres at a given radius.

Template Parameters
dimensionThe dimensionality of the simplices
GeneratorUniform random bit generator type owned by the caller
Parameters
t_simplicesThe desired number of simplices in the triangulation
t_timeslicesThe desired number of timeslices in the triangulation
initial_radiusThe radius of the first time slice
foliation_spacingThe distance between successive time slices
generatorCaller-owned random stream whose state is maintained by the caller and advanced during this call
Returns
A container of (vertex, timevalue) pairs
Exceptions
std::invalid_argumentIf a count is less than two, a radius or spacing is non-finite or nonpositive, or the parameters cannot populate a triangulation.
std::out_of_rangeIf a layer population cannot be represented by Int_precision.
Note
Once sampling begins, an exception does not roll back generator.

Definition at line 1231 of file Foliated_triangulation.hpp.

Referenced by make_triangulation().

◆ make_triangulation()

template<int dimension, std::uniform_random_bit_generator Generator>
auto cdt::foliated_triangulations::make_triangulation ( Int_precision const t_simplices,
Int_precision t_timeslices,
double const initial_radius,
double const foliation_spacing,
Generator & generator ) -> Delaunay_t< dimension >
nodiscard

Make a Delaunay triangulation.

Template Parameters
dimensionDimensionality of the Delaunay triangulation
GeneratorUniform random bit generator type owned by the caller
Parameters
t_simplicesNumber of desired simplices
t_timeslicesNumber of desired timeslices
initial_radiusRadius of first timeslice
foliation_spacingRadial separation between timeslices
generatorCaller-owned random stream whose state is maintained by the caller and advanced during this call
Returns
An owning Delaunay triangulation detached from the internal lock grid

Construction uses the configured parallel range operations when available. The returned triangulation does not borrow the temporary lock grid and can safely outlive this call. Its subsequent range operations are sequential; in a TBB-enabled build, callers can attach a compatible lock grid that they own to re-enable parallel execution.

Exceptions
std::invalid_argumentIf the generation parameters are invalid or the generated point set cannot form a nonempty unique triangulation.
std::out_of_rangeIf a generated layer population cannot be represented by Int_precision.
Note
Once sampling begins, an exception does not roll back generator.
See also
CGAL triangulations

Definition at line 1329 of file Foliated_triangulation.hpp.

References CDT_PRETTY_FUNCTION, fix_cells(), fix_timevalues(), fix_vertices(), has_valid_timevalues(), and make_foliated_ball().

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::FoliatedTriangulation().

◆ print_cell()

template<int dimension>
void cdt::foliated_triangulations::print_cell ( Cell_handle_t< dimension > cell)

Print a cell in the triangulation.

Template Parameters
dimensionThe dimensionality of the triangulation
Parameters
cellThe cell to print

Definition at line 939 of file Foliated_triangulation.hpp.

Referenced by print_cells(), and print_neighboring_cells().

◆ print_cells()

template<int dimension, detail::ConstForwardRange Container>
void cdt::foliated_triangulations::print_cells ( Container const & t_cells)

Print timevalues of each vertex in the cell and the resulting cell->info().

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_cellsThe cells to print

Definition at line 957 of file Foliated_triangulation.hpp.

References print_cell().

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::print_cells().

◆ print_edge()

template<int dimension>
void cdt::foliated_triangulations::print_edge ( Edge_handle_t< dimension > const & t_edge)

Print edge.

An edge is represented by a cell and two indices which refer to the vertices of the cell connected by the edge. The public type is the triangulation's canonical Delaunay::Edge alias.

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_edgeThe edge to print
See also
https://doc.cgal.org/latest/TDS_3/index.html#fig__TDS3figrepres

Definition at line 1004 of file Foliated_triangulation.hpp.

◆ print_neighboring_cells()

template<int dimension>
void cdt::foliated_triangulations::print_neighboring_cells ( Cell_handle_t< dimension > cell)

Print neighboring cells.

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
cellThe cell to print neighbors of

Definition at line 987 of file Foliated_triangulation.hpp.

References print_cell().

◆ squared_radius()

template<int dimension>
auto cdt::foliated_triangulations::squared_radius ( Vertex_handle_t< dimension > const & t_vertex) -> double
nodiscard

Calculate the squared radius from the origin.

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_vertexThe vertex to check
Returns
The squared radial distance of the vertex from the origin

Definition at line 593 of file Foliated_triangulation.hpp.

Referenced by cdt::foliated_triangulations::FoliatedTriangulation< 3 >::does_vertex_radius_match_timevalue(), and expected_timevalue().

◆ volume_per_timeslice()

template<int dimension, detail::ConstForwardRange Container>
auto cdt::foliated_triangulations::volume_per_timeslice ( Container const & t_facets) -> std::multimap< Int_precision, Facet_t< dimension > >
nodiscard

Collect spacelike facets into a container indexed by time value.

Template Parameters
dimensionThe dimensionality of the simplices
Parameters
t_facetsFacets whose cell handles are valid and belong to one triangulation.
Returns
Container with spacelike facets per timeslice. The facet descriptors borrow from the source triangulation and follow its mutation-invalidation rules.

Definition at line 1090 of file Foliated_triangulation.hpp.

References collect_spacelike_facets().

Variable Documentation

◆ compare_v_info

template<int dimension>
auto cdt::foliated_triangulations::compare_v_info
constexpr
Initial value:
= [](Vertex_handle_t<dimension> const& lhs,
return lhs->info() < rhs->info();
}
typename detail::TriangulationTraits< dimension >::Vertex_handle Vertex_handle_t
Mutable CGAL vertex handle for a triangulation dimension.
Template Parameters
dimensionThe dimensionality of the simplices
Returns
True if timevalue of lhs is less than rhs

Definition at line 490 of file Foliated_triangulation.hpp.

Referenced by find_max_timevalue(), and find_min_timevalue().