Vector module

This module contains the class GenericVector to represent a vector in arbitrary space-time symbolically

class einsteinpy.symbolic.vector.GenericVector(arr, syms, config='l', parent_metric=None)

Inherits from ~einsteinpy.symbolic.tensor.BaseRelativityTensor. Class to represent a vector in arbitrary space-time symbolically

Constructor and Initializer

Parameters
  • arr (ImmutableDenseNDimArray) – Sympy Array 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 ‘l’.

  • parent_metric (MetricTensor or None) – Corresponding Metric for the Generic Vector. Defaults to None.

Raises
change_config(newconfig='u', metric=None)

Changes the index configuration(contravariant/covariant)

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

  • 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. Defaults to None.

Returns

New tensor with new configuration.

Return type

GenericVector

Raises

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