pub trait MetricSystem: CoordinateSystemwhere
<Self as CoordinateSystem>::Dimension: Pow<U2> + Pow<U3>,
Exp<<Self as CoordinateSystem>::Dimension, U2>: ArrayLength<f64>,
Exp<<Self as CoordinateSystem>::Dimension, U3>: ArrayLength<f64>,{
// Required method
fn g(point: &Point<Self>) -> TwoForm<Self>;
// Provided methods
fn inv_g(point: &Point<Self>) -> InvTwoForm<Self> { ... }
fn dg(
point: &Point<Self>,
) -> Tensor<Self, (CovariantIndex, (CovariantIndex, CovariantIndex))> { ... }
fn covariant_christoffel(
point: &Point<Self>,
) -> Tensor<Self, (CovariantIndex, (CovariantIndex, CovariantIndex))> { ... }
fn christoffel(
point: &Point<Self>,
) -> Tensor<Self, (ContravariantIndex, (CovariantIndex, CovariantIndex))> { ... }
}
Expand description
Trait representing the metric properties of the coordinate system
Required Methods§
Provided Methods§
Sourcefn inv_g(point: &Point<Self>) -> InvTwoForm<Self>
fn inv_g(point: &Point<Self>) -> InvTwoForm<Self>
Returns the inverse metric tensor at a given point.
The default implementation calculates the metric and then inverts it. A direct implementation may be desirable for more performance.
Sourcefn dg(
point: &Point<Self>,
) -> Tensor<Self, (CovariantIndex, (CovariantIndex, CovariantIndex))>
fn dg( point: &Point<Self>, ) -> Tensor<Self, (CovariantIndex, (CovariantIndex, CovariantIndex))>
Returns the partial derivatives of the metric at a given point.
The default implementation calculates them numerically. A direct implementation may be desirable for performance.
Sourcefn covariant_christoffel(
point: &Point<Self>,
) -> Tensor<Self, (CovariantIndex, (CovariantIndex, CovariantIndex))>
fn covariant_christoffel( point: &Point<Self>, ) -> Tensor<Self, (CovariantIndex, (CovariantIndex, CovariantIndex))>
Returns the covariant Christoffel symbols (with three lower indices).
The default implementation calculates them from the metric. A direct implementation may be desirable for performance.
Sourcefn christoffel(
point: &Point<Self>,
) -> Tensor<Self, (ContravariantIndex, (CovariantIndex, CovariantIndex))>
fn christoffel( point: &Point<Self>, ) -> Tensor<Self, (ContravariantIndex, (CovariantIndex, CovariantIndex))>
Returns the Christoffel symbols.
The default implementation calculates them from the metric. A direct implementation may be desirable for performance.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.