changeTensorIndex
Last updated
Last updated
The index of the tensors can be changed using raising and lowering operations.
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.
[
outputTensor
] = changeTensorIndex(
inputTensor
,
index
,
metricTensor
)
blue are required inputs.
orange are optional inputs with native default values.
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
.
outputTensor
struct
object
Returns tensor with new index, can be either metric or stress-energy depending on inputTensor
.