|
CDT++ 1.0.0
Causal Dynamical Triangulations in C++
|
3D Foliated triangulation More...
#include <Foliated_triangulation.hpp>
Public Member Functions | |
| FoliatedTriangulation ()=default | |
| Default ctor. | |
| FoliatedTriangulation (Causal_vertices_t< 3 > const &causal_vertices, double const t_initial_radius=INITIAL_RADIUS, double const t_foliation_spacing=FOLIATION_SPACING) | |
| Constructor from Causal_vertices. | |
| FoliatedTriangulation (Delaunay triangulation, double const initial_radius=INITIAL_RADIUS, double const foliation_spacing=FOLIATION_SPACING) | |
| Constructor using delaunay triangulation Pass-by-value-then-move. Delaunay is the ctor for the Delaunay triangulation. | |
| FoliatedTriangulation (FoliatedTriangulation &&other) noexcept=default | |
| Move constructor. | |
| FoliatedTriangulation (FoliatedTriangulation const &other) | |
| Copy Constructor. | |
| FoliatedTriangulation (Int_precision const t_simplices, Int_precision const t_timeslices, cdt::Random &&generator, double const t_initial_radius=INITIAL_RADIUS, double const t_foliation_spacing=FOLIATION_SPACING) | |
| Construct from an explicit temporary initialization stream. | |
| FoliatedTriangulation (Int_precision const t_simplices, Int_precision const t_timeslices, cdt::Random &generator, double const t_initial_radius=INITIAL_RADIUS, double const t_foliation_spacing=FOLIATION_SPACING) | |
| Constructor with a caller-owned initialization stream. | |
| ~FoliatedTriangulation ()=default | |
| Default dtor. | |
| auto | check_all_cells () const -> bool |
| Check that all cells are correctly classified. | |
| auto | check_all_vertices () const -> bool |
| auto | delaunay_snapshot () const -> Delaunay |
| auto | dimension () const |
| auto | does_vertex_radius_match_timevalue (Vertex_handle_t< 3 > const t_vertex) const -> bool |
| Check the radius of a vertex from the origin with its timevalue. | |
| auto | expected_radius (Vertex_handle_t< 3 > const &t_vertex) const -> double |
| Calculates the expected radial distance of a vertex. | |
| auto | expected_timevalue (Vertex_handle_t< 3 > const &t_vertex) const -> int |
| Calculate the expected timevalue for a vertex. | |
| auto | fix_cells () -> bool |
| Fix all cells in the triangulation. | |
| auto | fix_vertices () -> bool |
| Fix vertices with wrong timevalues after foliation. | |
| auto | foliation_spacing () const |
| auto | initial_radius () const |
| auto | is_correct () const -> bool |
| auto | is_correct_with_diagnostics () const -> bool |
| auto | is_delaunay () const -> bool |
| auto | is_fixed () -> bool |
| auto | is_foliated () const -> bool |
| Verifies the triangulation is properly foliated. | |
| auto | is_initialized () const -> bool |
| auto | is_structurally_correct () const -> bool |
| auto | is_tds_valid () const -> bool |
| auto | max_time () const |
| auto | min_time () const |
| auto | N1_SL () const |
| auto | N1_TL () const |
| auto | number_of_finite_cells () const |
| auto | number_of_finite_edges () const |
| auto | number_of_finite_facets () const |
| auto | number_of_one_three_cells () const noexcept -> std::size_t |
| auto | number_of_spacelike_faces () const noexcept -> std::size_t |
| auto | number_of_three_one_cells () const noexcept -> std::size_t |
| auto | number_of_two_two_cells () const noexcept -> std::size_t |
| auto | number_of_vertices () const |
| auto | operator= (FoliatedTriangulation &&other) noexcept -> FoliatedTriangulation & |
| Move assignment operator. | |
| auto | operator= (FoliatedTriangulation const &other) -> FoliatedTriangulation & |
| Copy assignment operator. | |
| void | print () const |
| Print triangulation statistics. | |
| void | print_cells () const |
| Print timevalues of each vertex in the cell and the resulting cell->info(). | |
| void | print_edges () const |
| Print timevalues of each vertex in the edge and classify as timelike or spacelike. | |
| void | print_vertices () const |
| Print values of a vertex. | |
| void | print_volume_per_timeslice () const |
| Print the number of spacelike faces per timeslice. | |
| auto | spacelike_face_count (Int_precision const timevalue) const noexcept -> std::size_t |
Friends | |
| void | swap (FoliatedTriangulation &swap_from, FoliatedTriangulation &swap_into) noexcept |
| Non-member swap function for Foliated Triangulations. | |
3D Foliated triangulation
This class is a wrapper around a Delaunay triangulation. The Delaunay triangulation is augmented with a timevalue for each vertex and a simplex type for each cell. The FoliatedTriangulation class invariant is that the Delaunay triangulation has validly foliated vertices and cells, and has further containers for the various sub-simplicial complexes of the triangulation. Member functions on the same object must not be invoked concurrently. Use owning snapshots when topology must cross an ownership or concurrency boundary. Supported Pachner moves preserve the triangulation-data-structure and causal manifold invariants, but are not required to preserve CGAL's geometric Delaunay predicate. Use is_correct() for canonical simulation states and is_initialized() when the geometric Delaunay property is also required.
Definition at line 1407 of file Foliated_triangulation.hpp.
|
inline |
Copy Constructor.
| other | Triangulation to copy. |
Definition at line 1555 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), and swap.
|
defaultnoexcept |
Move constructor.
The invariant-bearing Delaunay state transfers its lock owner and detaches the moved-from triangulation as one operation.
| other | Triangulation whose state is transferred. |
References FoliatedTriangulation().
|
inlineexplicit |
Constructor using delaunay triangulation Pass-by-value-then-move. Delaunay is the ctor for the Delaunay triangulation.
| triangulation | Delaunay triangulation |
| initial_radius | Radius of first timeslice |
| foliation_spacing | Radial separation between timeslices |
initial_radius is finite and nonnegative; foliation_spacing is finite and positive. | std::invalid_argument | if triangulation is empty. |
Definition at line 1640 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), cdt::FOLIATION_SPACING, foliation_spacing(), cdt::INITIAL_RADIUS, and initial_radius().
|
inline |
Constructor with a caller-owned initialization stream.
| t_simplices | Desired number of simplices |
| t_timeslices | Desired number of timeslices |
| generator | Caller-owned initialization stream whose state is advanced during construction |
| t_initial_radius | Radius of the first timeslice |
| t_foliation_spacing | Radial separation between timeslices |
| std::invalid_argument | if the counts or geometry are invalid, the generated points are not unique, or construction produces no vertices. |
| std::out_of_range | if a layer population cannot be represented. |
generator may have advanced if construction fails after sampling begins. Definition at line 1681 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), cdt::FOLIATION_SPACING, cdt::INITIAL_RADIUS, and cdt::foliated_triangulations::make_triangulation().
|
inline |
Construct from an explicit temporary initialization stream.
| t_simplices | Desired number of simplices |
| t_timeslices | Desired number of timeslices |
| generator | Temporary initialization stream whose state is consumed during construction |
| t_initial_radius | Radius of the first timeslice |
| t_foliation_spacing | Radial separation between timeslices |
| std::invalid_argument | if the counts or geometry are invalid, the generated points are not unique, or construction produces no vertices. |
| std::out_of_range | if a layer population cannot be represented. |
Definition at line 1702 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), cdt::FOLIATION_SPACING, and cdt::INITIAL_RADIUS.
|
inlineexplicit |
Constructor from Causal_vertices.
| causal_vertices | Causal_vertices to place into the FoliatedTriangulation |
| t_initial_radius | Radius of first timeslice |
| t_foliation_spacing | Radial separation between timeslices |
t_initial_radius is finite and nonnegative; t_foliation_spacing is finite and positive. | std::invalid_argument | if causal_vertices is empty or contains duplicate geometric points. |
Definition at line 1720 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), cdt::FOLIATION_SPACING, and cdt::INITIAL_RADIUS.
|
inlinenodiscard |
Check that all cells are correctly classified.
A default triangulation will have no cells, and for this case the triangulation is correctly classified. A triangulation with cells will have them checked via check_cells.
Definition at line 1990 of file Foliated_triangulation.hpp.
References cdt::foliated_triangulations::check_cells().
Referenced by is_structurally_correct().
|
inlinenodiscard |
Definition at line 1910 of file Foliated_triangulation.hpp.
References cdt::foliated_triangulations::check_vertices().
|
inlinenodiscard |
Mutating the returned value cannot invalidate this object's cached topology classifications.
Definition at line 1795 of file Foliated_triangulation.hpp.
|
inlinenodiscard |
Definition at line 1826 of file Foliated_triangulation.hpp.
|
inlinenodiscard |
Check the radius of a vertex from the origin with its timevalue.
| t_vertex | The vertex to check |
Definition at line 1867 of file Foliated_triangulation.hpp.
References expected_radius(), cdt::foliated_triangulations::squared_radius(), and cdt::TOLERANCE.
|
inlinenodiscard |
Calculates the expected radial distance of a vertex.
The formula for the radius is:
\[R=I+S(t-1)\]
Where I is the initial radius, S is the foliation spacing, and t is the timevalue.
| t_vertex | The vertex to check |
Definition at line 1892 of file Foliated_triangulation.hpp.
Referenced by does_vertex_radius_match_timevalue().
|
inlinenodiscard |
Calculate the expected timevalue for a vertex.
| t_vertex | The vertex to check |
Definition at line 1902 of file Foliated_triangulation.hpp.
References cdt::foliated_triangulations::expected_timevalue().
Referenced by print_vertices().
|
inlinenodiscard |
Fix all cells in the triangulation.
Publishes a fully rebuilt triangulation only when a change is required. Any handles obtained from an earlier owning snapshot remain tied to that snapshot, not to the replacement stored here.
Definition at line 2000 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), cdt::foliated_triangulations::fix_cells(), and swap.
|
inlinenodiscard |
Fix vertices with wrong timevalues after foliation.
Publishes a fully rebuilt triangulation only when a change is required. Any handles obtained from an earlier owning snapshot remain tied to that snapshot, not to the replacement stored here.
Definition at line 1921 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), cdt::foliated_triangulations::fix_vertices(), and swap.
|
inlinenodiscard |
Definition at line 1861 of file Foliated_triangulation.hpp.
Referenced by FoliatedTriangulation().
|
inlinenodiscard |
Definition at line 1858 of file Foliated_triangulation.hpp.
Referenced by FoliatedTriangulation().
|
inlinenodiscard |
This deliberately checks TDS, causal, and structural consistency without requiring the geometric Delaunay predicate, which supported Pachner moves need not preserve.
Definition at line 1759 of file Foliated_triangulation.hpp.
References is_structurally_correct().
Referenced by is_initialized().
|
inlinenodiscard |
This diagnostic path rescans cached handles and rebuilds classifications for comparison. Prefer is_correct() in hot paths.
Definition at line 1765 of file Foliated_triangulation.hpp.
References is_structurally_correct().
|
inlinenodiscard |
Definition at line 1740 of file Foliated_triangulation.hpp.
Referenced by is_initialized().
|
inlinenodiscard |
Definition at line 1774 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), cdt::foliated_triangulations::fix_cells(), cdt::foliated_triangulations::fix_timevalues(), cdt::foliated_triangulations::fix_vertices(), and swap.
|
inlinenodiscard |
Verifies the triangulation is properly foliated.
Can not be called until after Foliated_triangulation has been constructed (i.e. not in make_triangulation)
Definition at line 1734 of file Foliated_triangulation.hpp.
References cdt::foliated_triangulations::has_valid_timevalues().
|
inlinenodiscard |
Definition at line 1770 of file Foliated_triangulation.hpp.
References is_correct(), and is_delaunay().
|
inlinenodiscard |
This path avoids rebuilding derived caches and is suitable for validating move candidates.
Definition at line 1750 of file Foliated_triangulation.hpp.
References check_all_cells(), and is_tds_valid().
Referenced by is_correct(), and is_correct_with_diagnostics().
|
inlinenodiscard |
Definition at line 1744 of file Foliated_triangulation.hpp.
Referenced by is_structurally_correct().
|
inlinenodiscard |
Definition at line 1852 of file Foliated_triangulation.hpp.
Referenced by print_volume_per_timeslice().
|
inlinenodiscard |
Definition at line 1855 of file Foliated_triangulation.hpp.
Referenced by print_volume_per_timeslice().
|
inlinenodiscard |
Definition at line 1848 of file Foliated_triangulation.hpp.
|
inlinenodiscard |
Definition at line 1844 of file Foliated_triangulation.hpp.
|
inlinenodiscard |
Definition at line 1804 of file Foliated_triangulation.hpp.
Referenced by print().
|
inlinenodiscard |
Definition at line 1816 of file Foliated_triangulation.hpp.
Referenced by print().
|
inlinenodiscard |
Definition at line 1810 of file Foliated_triangulation.hpp.
Referenced by print().
|
inlinenodiscardnoexcept |
Definition at line 1982 of file Foliated_triangulation.hpp.
|
inlinenodiscardnoexcept |
Definition at line 1840 of file Foliated_triangulation.hpp.
|
inlinenodiscardnoexcept |
Definition at line 1974 of file Foliated_triangulation.hpp.
|
inlinenodiscardnoexcept |
Definition at line 1978 of file Foliated_triangulation.hpp.
|
inlinenodiscard |
Definition at line 1822 of file Foliated_triangulation.hpp.
Referenced by print().
|
inlinenoexcept |
Move assignment operator.
| other | Triangulation whose state is transferred. |
Definition at line 1591 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), and swap.
|
inline |
Copy assignment operator.
Builds a complete copy before replacing the current value.
| other | Triangulation to copy. |
Definition at line 1574 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), and swap.
|
inline |
Print triangulation statistics.
Definition at line 2019 of file Foliated_triangulation.hpp.
References number_of_finite_cells(), number_of_finite_edges(), number_of_finite_facets(), and number_of_vertices().
|
inline |
Print timevalues of each vertex in the cell and the resulting cell->info().
Definition at line 2015 of file Foliated_triangulation.hpp.
References cdt::foliated_triangulations::print_cells().
|
inline |
Print timevalues of each vertex in the edge and classify as timelike or spacelike.
Definition at line 1948 of file Foliated_triangulation.hpp.
References cdt::foliated_triangulations::classify_edge(), and cdt::TIMELIKE.
|
inline |
Print values of a vertex.
Definition at line 1936 of file Foliated_triangulation.hpp.
References expected_timevalue().
|
inline |
Print the number of spacelike faces per timeslice.
Definition at line 1964 of file Foliated_triangulation.hpp.
References max_time(), min_time(), and spacelike_face_count().
|
inlinenodiscardnoexcept |
| timevalue | Timeslice whose facets are counted. |
Definition at line 1830 of file Foliated_triangulation.hpp.
Referenced by print_volume_per_timeslice().
|
friend |
Non-member swap function for Foliated Triangulations.
Note that this function calls swap() from CGAL's Triangulation_3 base class, which assumes that the first triangulation is discarded after it is swapped into the second one.
| swap_from | The value to be swapped from. Assumed to be discarded. |
| swap_into | The value to be swapped into. |
Definition at line 1605 of file Foliated_triangulation.hpp.
References FoliatedTriangulation(), and swap.
Referenced by FoliatedTriangulation(), fix_cells(), fix_vertices(), is_fixed(), operator=(), operator=(), and swap.