Validated runtime configuration for CDT++ command-line programs.
More...
#include <cmath>
#include <cstddef>
#include <limits>
#include <stdexcept>
#include <string>
#include <utility>
#include "Random.hpp"
#include "Utilities.hpp"
Go to the source code of this file.
|
| namespace | cdt |
| | clang-15 does not support std::format
|
|
| template<typename FloatingPoint> |
| auto | cdt::runtime_config::detail::checked_finite (char const *name, FloatingPoint const value) -> FloatingPoint |
| auto | cdt::runtime_config::detail::checked_int (char const *name, long long const value) -> Int_precision |
| auto | cdt::runtime_config::detail::checked_threads (long long const value) -> std::size_t |
| auto | cdt::runtime_config::detail::make_generated_population (Int_precision const simplices, Int_precision const timeslices, double const initial_radius, double const foliation_spacing) -> GeneratedPopulation |
| auto | cdt::runtime_config::make_simulation (Triangulation const &triangulation, long double const alpha, long double const k, long double const lambda, long long const passes, long long const checkpoint, bool const write_files) -> Simulation |
| | Validate the complete simulation configuration.
|
| auto | cdt::runtime_config::make_triangulation (bool const spherical, bool const toroidal, long long const simplices, long long const timeslices, long long const dimensions, double const initial_radius, double const foliation_spacing, cdt::RandomSeed const seed=cdt::RandomSeed{}, long long const threads=1) -> Triangulation |
| | Validate raw triangulation options and narrow them into project types.
|
| auto | cdt::runtime_config::detail::select_topology (bool const spherical, bool const toroidal) -> Topology |
Validated runtime configuration for CDT++ command-line programs.
Definition in file Runtime_config.hpp.
◆ GeneratedPopulation
| using cdt::runtime_config::detail::GeneratedPopulation = utilities::Generated_population_bounds |
◆ checked_finite()
template<typename FloatingPoint>
| auto cdt::runtime_config::detail::checked_finite |
( |
char const * | name, |
|
|
FloatingPoint const | value ) -> FloatingPoint |
|
nodiscard |
◆ checked_int()
| auto cdt::runtime_config::detail::checked_int |
( |
char const * | name, |
|
|
long long const | value ) -> Int_precision |
|
inlinenodiscard |
◆ checked_threads()
| auto cdt::runtime_config::detail::checked_threads |
( |
long long const | value | ) |
-> std::size_t |
|
inlinenodiscard |
◆ make_generated_population()
| auto cdt::runtime_config::detail::make_generated_population |
( |
Int_precision const | simplices, |
|
|
Int_precision const | timeslices, |
|
|
double const | initial_radius, |
|
|
double const | foliation_spacing ) -> GeneratedPopulation |
|
inlinenodiscard |
◆ make_simulation()
| auto cdt::runtime_config::make_simulation |
( |
Triangulation const & | triangulation, |
|
|
long double const | alpha, |
|
|
long double const | k, |
|
|
long double const | lambda, |
|
|
long long const | passes, |
|
|
long long const | checkpoint, |
|
|
bool const | write_files ) -> Simulation |
|
inlinenodiscard |
Validate the complete simulation configuration.
- Parameters
-
| triangulation | Previously validated triangulation configuration. |
| alpha | Finite Wick-rotation parameter greater than 1/2. |
| k | Finite inverse Newton coupling. |
| lambda | Finite cosmological coupling. |
| passes | Positive number of move passes. |
| checkpoint | Positive checkpoint interval in move passes. |
| write_files | Whether the run should publish persistence artifacts. |
- Returns
- A complete validated simulation configuration.
- Exceptions
-
| std::invalid_argument | for non-finite couplings or non-positive cadence values. |
| std::domain_error | if alpha is not greater than 1/2. |
| std::out_of_range | when a cadence value exceeds Int_precision. |
Definition at line 369 of file Runtime_config.hpp.
◆ make_triangulation()
| auto cdt::runtime_config::make_triangulation |
( |
bool const | spherical, |
|
|
bool const | toroidal, |
|
|
long long const | simplices, |
|
|
long long const | timeslices, |
|
|
long long const | dimensions, |
|
|
double const | initial_radius, |
|
|
double const | foliation_spacing, |
|
|
cdt::RandomSeed const | seed = cdt::RandomSeed{}, |
|
|
long long const | threads = 1 ) -> Triangulation |
|
inlinenodiscard |
Validate raw triangulation options and narrow them into project types.
- Parameters
-
| spherical | Whether spherical topology was selected. |
| toroidal | Whether toroidal topology was selected; currently rejected. |
| simplices | Requested target number of simplices; must be at least two. |
| timeslices | Requested number of timeslices; must be at least two. |
| dimensions | Requested dimensionality; must equal three. |
| initial_radius | Positive finite radius of the first timeslice. |
| foliation_spacing | Positive finite spacing between timeslices. |
| seed | Root random seed to retain. |
| threads | Positive maximum concurrency; serial builds require one. |
- Returns
- A configuration containing only validated domain values.
- Exceptions
-
| std::invalid_argument | for conflicting/unsupported topology, invalid dimensions or counts, non-finite/non-positive geometry, or an unsupported serial-build thread count. |
| std::out_of_range | when a count exceeds a project type or generated population bound. |
Definition at line 303 of file Runtime_config.hpp.
◆ select_topology()
| auto cdt::runtime_config::detail::select_topology |
( |
bool const | spherical, |
|
|
bool const | toroidal ) -> Topology |
|
inlinenodiscard |