CDT++ 1.0.0
Causal Dynamical Triangulations in C++
Loading...
Searching...
No Matches
Runtime_config.hpp File Reference

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"
Include dependency graph for Runtime_config.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cdt::runtime_config::Simulation
class  cdt::runtime_config::Triangulation

Namespaces

namespace  cdt
 clang-15 does not support std::format

Typedefs

using cdt::runtime_config::detail::GeneratedPopulation = utilities::Generated_population_bounds

Functions

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

Detailed Description

Validated runtime configuration for CDT++ command-line programs.

Definition in file Runtime_config.hpp.

Typedef Documentation

◆ GeneratedPopulation

using cdt::runtime_config::detail::GeneratedPopulation = utilities::Generated_population_bounds

Definition at line 246 of file Runtime_config.hpp.

Function Documentation

◆ checked_finite()

template<typename FloatingPoint>
auto cdt::runtime_config::detail::checked_finite ( char const * name,
FloatingPoint const value ) -> FloatingPoint
nodiscard

Definition at line 183 of file Runtime_config.hpp.

◆ checked_int()

auto cdt::runtime_config::detail::checked_int ( char const * name,
long long const value ) -> Int_precision
inlinenodiscard

Definition at line 194 of file Runtime_config.hpp.

◆ checked_threads()

auto cdt::runtime_config::detail::checked_threads ( long long const value) -> std::size_t
inlinenodiscard

Definition at line 206 of file Runtime_config.hpp.

◆ 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

Definition at line 248 of file Runtime_config.hpp.

◆ 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
triangulationPreviously validated triangulation configuration.
alphaFinite Wick-rotation parameter greater than 1/2.
kFinite inverse Newton coupling.
lambdaFinite cosmological coupling.
passesPositive number of move passes.
checkpointPositive checkpoint interval in move passes.
write_filesWhether the run should publish persistence artifacts.
Returns
A complete validated simulation configuration.
Exceptions
std::invalid_argumentfor non-finite couplings or non-positive cadence values.
std::domain_errorif alpha is not greater than 1/2.
std::out_of_rangewhen 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
sphericalWhether spherical topology was selected.
toroidalWhether toroidal topology was selected; currently rejected.
simplicesRequested target number of simplices; must be at least two.
timeslicesRequested number of timeslices; must be at least two.
dimensionsRequested dimensionality; must equal three.
initial_radiusPositive finite radius of the first timeslice.
foliation_spacingPositive finite spacing between timeslices.
seedRoot random seed to retain.
threadsPositive maximum concurrency; serial builds require one.
Returns
A configuration containing only validated domain values.
Exceptions
std::invalid_argumentfor conflicting/unsupported topology, invalid dimensions or counts, non-finite/non-positive geometry, or an unsupported serial-build thread count.
std::out_of_rangewhen 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

Definition at line 230 of file Runtime_config.hpp.