Trait MetricSystem

Source
pub trait MetricSystem: CoordinateSystem{
    // 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§

Source

fn g(point: &Point<Self>) -> TwoForm<Self>

Returns the metric tensor at a given point.

Provided Methods§

Source

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.

Source

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.

Source

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.

Source

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.

Implementors§