changeTensorIndex

Description

The index of the tensors can be changed using raising and lowering operations.

chevron-rightMetric Tensorhashtag

The metric tensor can be in either covariant or contravariant form, this is transformed between each by doing a matrix inverse transformation.

chevron-rightStress-energy Tensorhashtag

The stress-energy tensor can be either covariant, contravariant or a mixed-form. Transformations for covariant or contravariant are just raising/lowering operations given as:

Tμν=gμαgνβTαβT^{\mu\nu} = g^{\mu\alpha} g^{\nu\beta} T_{\alpha \beta} or Tμν=gμαgνβTαβT_{\mu\nu} = g_{\mu\alpha} g_{\nu\beta} T^{\alpha \beta}

Likewise, the mixed form is found by:

T  νμ=gμαTανT^{\mu}_{\ \ \nu} = g^{\mu\alpha} T_{\alpha \nu}

Method

The index-changing operations occur at each point in the spacetime doing the index summations for the stress-energy tensor or inverse operations on the metric tensor.

Syntax

[outputTensor] = changeTensorIndex(inputTensor, index, metricTensor)

Input Arguments

circle-info

blue are required inputs.

orange are optional inputs with native default values.

Inputs
Format
Type
Description

inputTensor

struct

object

Input tensor, metric if transforming the metric or stress-energy tensor. If a stress-energy tensor object is an input, then the metricTensor is required as an input.

index

1x1 array

string

The selected target index. Can be either: "covariant", "contravariant" for both the metric or stress-energy tensor. If transforming a stress-energy tensor then "mixedupdown", "mixeddownup". index transformations can also be done, but only on the stress-energy tensor.

metricTensor

struct

object

Metric tensor object. This is only needed if transforming the stress-energy tensor index, which is input in inputTensor .

Output Arguments

Outputs
Format
Type
Description

outputTensor

struct

object

Returns tensor with new index, can be either metric or stress-energy depending on inputTensor .

Last updated