Riemann Tensor Module

This module contains the class for obtaining Riemann Curvature Tensor related to a Metric belonging to any arbitrary space-time symbolically:

class einsteinpy.symbolic.riemann.RiemannCurvatureTensor(arr, syms, config='ulll', parent_metric=None, name='RiemannCurvatureTensor')[source]

Bases: einsteinpy.symbolic.tensor.BaseRelativityTensor

Class for defining Riemann Curvature Tensor

Constructor and Initializer

Parameters
  • arr (ImmutableDenseNDimArray or list) – Sympy Array or multi-dimensional list containing Sympy Expressions

  • syms (tuple or list) – Tuple of crucial symbols denoting time-axis, 1st, 2nd, and 3rd axis (t,x1,x2,x3)

  • config (str) – Configuration of contravariant and covariant indices in tensor. ‘u’ for upper and ‘l’ for lower indices. Defaults to ‘ulll’.

  • parent_metric (MetricTensor) – Metric Tensor related to this Riemann Curvature Tensor.

  • name (str) – Name of the Tensor. Defaults to “RiemannCurvatureTensor”.

Raises
  • TypeError – Raised when arr is not a list or sympy Array

  • TypeError – syms is not a list or tuple

  • ValueError – config has more or less than 4 indices

classmethod from_christoffels(chris, parent_metric=None)[source]

Get Riemann Tensor calculated from Christoffel Symbols. Reimann Tensor is given as:

\[R^{t}{}_{s r n}=\Gamma^{t}{}_{s n, r} - \Gamma^{t }{}_{s r, n } + \Gamma^{p}{}_{s n}\Gamma^{t}{}_{p r} - \Gamma^{p}{}_{s r}\Gamma^{t}{}_{p n}\]
Parameters
  • chris (ChristoffelSymbols) – Christoffel Symbols from which Riemann Curvature Tensor to be calculated

  • parent_metric (MetricTensor or None) – Corresponding Metric for the Riemann Tensor. None if it should inherit the Parent Metric of Christoffel Symbols. Defaults to None.

classmethod from_metric(metric)[source]

Get Riemann Tensor calculated from a Metric Tensor

Parameters

metric (MetricTensor) – Metric Tensor from which Riemann Curvature Tensor to be calculated

change_config(newconfig='llll', metric=None)[source]

Changes the index configuration(contravariant/covariant)

Parameters
  • newconfig (str) – Specify the new configuration. Defaults to ‘llll’

  • metric (MetricTensor or None) – Parent metric tensor for changing indices. Already assumes the value of the metric tensor from which it was initialized if passed with None. Compulsory if not initialized with ‘from_metric’. Defaults to None.

Returns

New tensor with new configuration. Configuration defaults to ‘llll’

Return type

RiemannCurvatureTensor

Raises

Exception – Raised when a parent metric could not be found.

lorentz_transform(transformation_matrix)[source]

Performs a Lorentz transform on the tensor.

Parameters

transformation_matrix (ImmutableDenseNDimArray or list) – Sympy Array or multi-dimensional list containing Sympy Expressions

Returns

lorentz transformed tensor

Return type

RiemannCurvatureTensor