einsteinpy / riccipy

Development Halted for indefinite time!
MIT License
6 stars 2 forks source link

Issue with calculating contraction #14

Open cjayross opened 5 years ago

cjayross commented 5 years ago

For some reason the API has it that equation

Currently, the left hand side yields the correct value while the right hand side sums the diagonal components of the array representing the tensor literally.

However this is only an issue with contractions on a single tensor (not a product of tensors), and when the contraction yields a scalar. Meaning that the calculation of the Ricci tensor is fine, but the Ricci scalar is not.

cjayross commented 5 years ago

This is an issue with https://github.com/sympy/sympy.

The ~sympy.tensor.tensor.Tensor._extract_data method contracts indices without applying the metric to the arrays in the replacement_dict argument.