sparse-tensor-0.2.1.2: typesafe tensor algebra library

Copyright(c) 2019 Tobias Reinhart and Nils Alex
LicenseMIT
Maintainertobi.reinhart@fau.de, nils.alex@fau.de
Safe HaskellNone
LanguageHaskell2010

Math.Tensor.Examples.Gravity.Schwarzschild

Description

This module provides the metric, inverse metric, Christoffel symbol, Ricci tensor and Einstein tensor for the Schwarzschild spacetime as an example for tensor sections and partial derivatives thereof.

Synopsis

Documentation

schwarzschild :: Floating a => a -> STTens 0 2 (CFun [a] a) Source #

Schwarzschild metric \( g = (1-\frac{r_\text{s}}{r})\,\mathrm dt\otimes\mathrm dt - \frac{1}{1-\frac{r_\text{s}}{r}}\,\mathrm dr\otimes \mathrm dr - r^2\,\mathrm d\theta\otimes \mathrm d\theta - r^2\sin^2\theta\,\mathrm d\phi\otimes \mathrm d\phi \).

schwarzschild' :: Floating a => a -> STTens 2 0 (CFun [a] a) Source #

Inverse Schwarzschild metric \( g = \frac{1}{1-\frac{r_\text{s}}{r}}\,\partial_t \otimes \partial_t - (1-\frac{r_\text{s}}{r})\,\partial_r \otimes \partial_r - \frac{1}{r^2}\,\partial_\theta \otimes \partial_\theta - \frac{1}{r^2\sin^2\theta}\,\partial_\phi \otimes \partial_\phi \).

christoffel :: forall a. Floating a => a -> STTens 1 2 (CFun [a] a) Source #

Christoffel symbol of the Schwarzschild metric.

ricci :: forall a. Floating a => a -> STTens 0 2 (CFun [a] a) Source #

Ricci tensor of the Schwarzschild metric.

einstein :: forall a. Floating a => a -> STTens 0 2 (CFun [a] a) Source #

Einstein tensor of the Schwarzschild metric. The component functions evaluate to zero:

>>> let g = einstein 2
>>> g `evalSec` [1.1, 2.4, 1.7, 2.2]
ZeroTensor