-
-
Save Jason-S-Ross/f33ea4aa80cc2577be0bff3dbe19c765 to your computer and use it in GitHub Desktop.
I would need some help to get this merged. I don't have a strong enough grasp of tensor calculus to know if all the assumptions I'm making are correct.
sympy.tensor.tensor
was originally meant to only support the Penrose abstract index notation (which is independent of coordinate systems). Unfortunately that was too restrictive as partial derivatives cannot be represented. Adding support for indices with coordinate systems is quite complicated OTOH.
Another great shortcoming of sympy.tensor.tensor
is that it is complicated to use, and its applications are quite limited (physics and Riemannian geometry only).
I have since switched to the development of sympy.tensor.array.expressions
, which is meant to be more general as possible (it's just N-dimensional arrays, not even tensors, but it's probably useful to many more users of SymPy).
Also have a look at sympy.diffgeom
, that's a quite robust implementation of Riemannian geometry.
sympy.tensor.tensor
was originally meant to only support the Penrose abstract index notation (which is independent of coordinate systems). Unfortunately that was too restrictive as partial derivatives cannot be represented. Adding support for indices with coordinate systems is quite complicated OTOH.
To my understanding this does add support for indices with coordinate systems, but probably not in a rigorous way.
Another great shortcoming of
sympy.tensor.tensor
is that it is complicated to use, and its applications are quite limited (physics and Riemannian geometry only).
I see. To me as an engineering student, physics and Riemannian geometry are basically the entire universe. I didn't find the tensor
module to be overly complicated to use, for what it's worth.
Also have a look at
sympy.diffgeom
, that's a quite robust implementation of Riemannian geometry.
I tried that module first, but I don't have any background in differential geometry and I didn't understand how I could use it to solve problems like this. I asked the mailing list and didn't get much help, so I wrote this.
Unfortunately I am ignorant of the extent of my own ignorance of this subject, so I'm not qualified to speculate on whether or not this would be good for SymPy. I assume I have made some crucial mistakes in my assumptions that would not be appropriate for the level of generality desired for the tensor
module. If not, I would be happy to submit a pull request.
Interesting. Do you plan on merging your changes back to SymPy?