Add a few operations from linear symplectic geometry - #35354
Conversation
The convention for the Hodge star on a pseudo-Riemannian manifold is detailed here. |
|
BTW, I'm happy to see that symplectic manifolds are back! |
Thanks! I only added the Tests pass, so this is now ready for review. |
egourgoulhon
left a comment
There was a problem hiding this comment.
The difficulty in providing an example of use of using in FreeModuleTensor.trace points towards reimplementing the method trace in class TensorFieldParal, leaving FreeModuleTensor.trace without the argument using. This would also get rid of the modularity issue.
Co-authored-by: Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
Co-authored-by: Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
Mhh, but doesn't this complicate things by having three implementations of taking the trace? |
Code duplication can be avoided by having |
|
That we lose the documentation of a method from a superclass whenever we override it is a general problem, which seems to be worked around by a lot of copy-paste in the existing code base. It would be great to have a general solution for that. As doc processing for the terminal is under our control (in |
|
Thank you Matthias for your feedback. It would indeed be nice to have such a feature for the documentation. Here, the ultimate solution would be to implement the linear algebra versions of |
|
I've now added a test for the changes in free_module_tensor. This seems to be the easiest way out for now, since the other solution (copy & paste the whole docstring for trace from tensofield to tensorfield_paral) seems to be more of maintenance burden than providing additional value. Will implement the up/down methods for normal tensors in a follow-up PR (and maybe think about a general solution how operations from linear algebra can be lifted to tensor fields by applying them pointwise). |
|
Documentation preview for this PR is ready! 🎉 |
egourgoulhon
left a comment
There was a problem hiding this comment.
Thanks for your work on this!
|
Thanks for the review, Eric and Matthias! |
📚 Description
(0,2)-tensor with respect to the symplectic form (or metric)p-forms(-1)^swithsbeing the number of negative eigenvalues of the metric, that is,📝 Checklist
⌛ Dependencies