Processes spacetime events and computes manifold geometry.
Processes spacetime events and computes manifold geometry.Stateless. Thread-safe.
SpacetimeManifold manifold;
SpacetimeEvent evt{1.0, 100.5, 1e6, 0.02};
auto regime = manifold.process(evt);
auto metric = MetricTensor::minkowski();
auto christoffel = manifold.christoffelSymbols(metric);
#pragma once
#include <array>
#include <cmath>
#include <optional>
inline constexpr int DIM = 4;
struct MetricTensor {
std::array<std::array<double, DIM>,
DIM>
g{};
[[nodiscard]]
static MetricTensor
minkowski()
noexcept;
[[nodiscard]]
bool is_valid()
const noexcept;
};
struct SpacetimeEvent {
[[nodiscard]]
bool is_finite()
const noexcept;
};
};
[[nodiscard]] inline constexpr int christoffel_index(int lambda, int mu, int nu) noexcept {
}
class SpacetimeManifold {
public:
[[nodiscard]] std::optional<Regime>
process(
const SpacetimeEvent& event)
const noexcept;
[[nodiscard]] std::array<double, NUM_CHRISTOFFEL>
[[nodiscard]] MetricTensor
flatMetric()
const noexcept;
};
}
std::array< double, NUM_CHRISTOFFEL > christoffelSymbols(const MetricTensor &metric) const noexcept
Compute all 64 Christoffel symbols Γ^λ_μν via finite differences.
SpacetimeManifold() noexcept=default
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.
Regime
Market relativistic regime classification.
@ 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 NUM_CHRISTOFFEL
Total Christoffel symbols: DIM³ = 64.
constexpr int DIM
Number of spacetime dimensions.
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).
bool is_finite() const noexcept
True iff all coordinates are finite.