pub struct ChristoffelSymbols4D {
pub gamma: [[[f64; 4]; 4]; 4],
}Expand description
The Christoffel symbols Γ^λ_{μν} at one point.
Fields§
§gamma: [[[f64; 4]; 4]; 4]Implementations§
Source§impl ChristoffelSymbols4D
impl ChristoffelSymbols4D
Sourcepub fn from_metric_derivatives(g: &Metric4, dg: &[Metric4; 4]) -> Option<Self>
pub fn from_metric_derivatives(g: &Metric4, dg: &[Metric4; 4]) -> Option<Self>
The symbols from the metric g and its partial derivatives dg[σ][μ][ν] = ∂_σ g_{μν}
at a point. None if the metric is singular there.
Sourcepub fn from_metric_function(
metric: impl Fn(&[f64; 4]) -> Metric4,
point: [f64; 4],
h: f64,
) -> Option<Self>
pub fn from_metric_function( metric: impl Fn(&[f64; 4]) -> Metric4, point: [f64; 4], h: f64, ) -> Option<Self>
The symbols of the metric field metric(x) at point, with the derivatives taken by
fourth-order central differences of step h (a relative step near 1e-3 works well for
smooth metrics). None if the metric is singular at point.
Sourcepub fn schwarzschild(mass: f64, r: f64, theta: f64) -> Option<Self>
pub fn schwarzschild(mass: f64, r: f64, theta: f64) -> Option<Self>
Exact symbols of the Schwarzschild metric of mass mass (units G = c = 1) in coordinates
(t, r, θ, φ) at radius r > 2·mass and polar angle theta (not a pole). None outside
that domain.
Sourcepub fn geodesic_acceleration(&self, u: [f64; 4]) -> [f64; 4]
pub fn geodesic_acceleration(&self, u: [f64; 4]) -> [f64; 4]
The coordinate acceleration d²x/dτ² = -Γ^λ_{μν} u^μ u^ν of a free particle with
coordinate velocity u = dx/dτ.
Sourcepub fn is_torsion_free(&self, tol: f64) -> bool
pub fn is_torsion_free(&self, tol: f64) -> bool
Whether the symbols are symmetric in their lower indices (always true for Levi-Civita).