-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)^s
withs
being the number of negative eigenvalues of the metric, that is,📝 Checklist
⌛ Dependencies