-
-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-35354: Add a few operations from linear symplectic geometry
### 📚 Description - Add trace of a `(0,2)`-tensor with respect to the symplectic form (or metric) - Add extension of the symplectic form to a bilinear form on `p`-forms - Fix hodge star for symplectic manifolds (was off by a minus sign for odd-degree forms) - Add option for hodge star to add an additional factor of `(-1)^s` with `s` being the number of negative eigenvalues of the metric, that is, ```latex \alpha \wedge \star \beta = (-1)^s g(\alpha, \beta) vol_g ``` ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #35354 Reported by: Tobias Diez Reviewer(s): Eric Gourgoulhon, Matthias Köppe, Tobias Diez
- Loading branch information
Showing
9 changed files
with
216 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/sage/manifolds/differentiable/tensorfield_paral_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# pylint: disable=missing-function-docstring,missing-class-docstring | ||
import pytest | ||
|
||
from sage.manifolds.differentiable.examples.euclidean import EuclideanSpace | ||
from sage.manifolds.differentiable.manifold import DifferentiableManifold | ||
|
||
|
||
class TestR3VectorSpace: | ||
@pytest.fixture | ||
def manifold(self): | ||
return EuclideanSpace(3) | ||
|
||
def test_trace_using_metric_works(self, manifold: DifferentiableManifold): | ||
metric = manifold.metric('g') | ||
assert metric.trace(using=metric) == manifold.scalar_field(3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.