30 for (
int mu = 0; mu <
DIM; ++mu) {
31 for (
int nu = 0; nu <
DIM; ++nu) {
32 if (!std::isfinite(
g[mu][nu]))
return false;
36 if (
g[0][0] >= 0.0)
return false;
38 for (
int i = 1; i <
DIM; ++i) {
39 if (
g[i][i] <= 0.0)
return false;
47 for (
int i = 0; i <
DIM; ++i) {
48 if (!std::isfinite(
g[i][i]) ||
g[i][i] == 0.0)
return std::nullopt;
51 for (
int i = 0; i <
DIM; ++i) {
52 inv.
g[i][i] = 1.0 /
g[i][i];
60 return std::isfinite(
t) && std::isfinite(
x)
61 && std::isfinite(
y) && std::isfinite(
z);
68 if (!event.is_finite())
return std::nullopt;
71 const double abs_x = std::abs(event.x);
72 const double beta_proxy = std::tanh(abs_x);
74 if (!std::isfinite(beta_proxy))
return std::nullopt;
83std::array<double, NUM_CHRISTOFFEL>
85 std::array<double, NUM_CHRISTOFFEL> result{};
89 if (!metric.is_valid())
return result;
92 auto inv_opt = metric.inverse_diagonal();
93 if (!inv_opt)
return result;
97 constexpr double EPS = 1e-5;
113 for (
int lambda = 0; lambda <
DIM; ++lambda) {
114 for (
int mu = 0; mu <
DIM; ++mu) {
115 for (
int nu = 0; nu <
DIM; ++nu) {
116 double christoffel_val = 0.0;
117 for (
int sigma = 0; sigma <
DIM; ++sigma) {
125 const double d_mu_g_nu_sigma = 0.0;
126 const double d_nu_g_mu_sigma = 0.0;
127 const double d_sigma_g_mu_nu = 0.0;
128 christoffel_val += 0.5 * g_inv.
g[lambda][sigma]
129 * (d_mu_g_nu_sigma + d_nu_g_mu_sigma - d_sigma_g_mu_nu);
132 result[
static_cast<std::size_t
>(idx)] = christoffel_val;
std::array< double, NUM_CHRISTOFFEL > christoffelSymbols(const MetricTensor &metric) const noexcept
Compute all 64 Christoffel symbols Γ^λ_μν via finite differences.
std::optional< Regime > process(const SpacetimeEvent &event) const noexcept
Classify a spacetime event into a relativistic regime.
MetricTensor flatMetric() const noexcept
Return the flat Minkowski metric.
@ Subluminal
Catch-all: |β| ≥ 0 and < BETA_MAX_SAFE.
@ Newtonian
|β| < 0.1 — classical approximation valid
@ Relativistic
0.1 ≤ |β| < 0.9 — corrections needed
@ HighGamma
0.9 ≤ |β| < 0.9999 — extreme Lorentz contraction
constexpr int DIM
Number of spacetime dimensions.
constexpr int christoffel_index(int lambda, int mu, int nu) noexcept
Pack (λ, μ, ν) into flat index in [0, 64).
Spacetime manifold processor with Christoffel symbols (AGT-13 / SRFM)
Symmetric 4×4 spacetime metric tensor g_{μν}.
std::array< std::array< double, DIM >, DIM > g
std::optional< MetricTensor > inverse_diagonal() const noexcept
bool is_valid() const noexcept
static MetricTensor minkowski() noexcept
Construct the flat Minkowski metric η = diag(−1,+1,+1,+1).
A point in 4D spacetime (t, x, y, z).
bool is_finite() const noexcept
True iff all coordinates are finite.