Opened 3 years ago
Closed 3 years ago
#27548 closed enhancement (fixed)
Introduce periodic coordinates on manifolds
Reported by: | egourgoulhon | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.8 |
Component: | geometry | Keywords: | coordinate chart, manifold |
Cc: | tscrim | Merged in: | |
Authors: | Eric Gourgoulhon | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | 1718b1d (Commits, GitHub, GitLab) | Commit: | 1718b1d43dcc024c5bb1b9b1be6afa0142c99b36 |
Dependencies: | Stopgaps: |
Description (last modified by )
This ticket introduces periodic coordinates on manifolds for more flexibility. In particular, this fixes an issue with the azimuthal angle phi being limited to the interval (0,2*pi). For instance, the numerical computation of a geodesic that is winding around the center in Schwarzschild spacetime fails:
sage: M = Manifold(4, 'M', structure='Lorentzian') sage: X.<t,r,th,ph> = M.chart(r't r:(0,+oo) th:(0,pi):\theta ph:(0,2*pi):\phi') sage: g = M.metric() sage: g[0,0], g[1,1] = -(1-2/r), 1/(1-2/r) sage: g[2,2], g[3,3] = r^2, (r*sin(th))^2 sage: p0 = M((0, 8, pi/2, pi)) # initial point sage: v0 = M.tangent_space(p0)((1.297, 0, 0, 0.064)) # initial tangent vector sage: s = var('s') sage: geod = M.integrated_geodesic(g, (s, 0, 1500), v0) sage: geod.solve() # numerical integration --------------------------------------------------------------------------- ValueError Traceback (most recent call last) ... ValueError: the 7th point (initial point being the '0th' point) of the numerical solution (obtained for a curve parameter equal to 105.0) is out of the chart domain
This is because phi reaches 2*pi at some point in the integration.
With the branch in this ticket, it suffices to declare phi to be a periodic coordinate, by adding the keyword periodic
in the chart definition
sage: X.<t,r,th,ph> = M.chart(r't r:(0,+oo) th:(0,pi):\theta ph:(0,2*pi):periodic:\phi')
to allow for the full integration of the geodesic.
The periodicity of the coordinate is taken into account in point comparisons:
sage: M((0, 8, pi/2, pi)) == M((0, 8, pi/2, 3*pi)) True sage: M((0, 8, pi/2, pi)) == M((0, 8, pi/2, -pi)) True
Change History (6)
comment:1 Changed 3 years ago by
- Branch set to public/manifolds/periodic_coords
- Cc tscrim added
- Commit set to 1d658e0e3f95a6c8389e7b0b36eea914078bfff8
- Status changed from new to needs_review
comment:2 Changed 3 years ago by
- Description modified (diff)
comment:3 Changed 3 years ago by
- Commit changed from 1d658e0e3f95a6c8389e7b0b36eea914078bfff8 to 1718b1d43dcc024c5bb1b9b1be6afa0142c99b36
Branch pushed to git repo; I updated commit sha1. New commits:
1718b1d | Fix two pyflakes errors in src/sage/manifolds/differentiable
|
comment:4 Changed 3 years ago by
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
LGTM.
comment:5 Changed 3 years ago by
Thanks for the review!
comment:6 Changed 3 years ago by
- Branch changed from public/manifolds/periodic_coords to 1718b1d43dcc024c5bb1b9b1be6afa0142c99b36
- Resolution set to fixed
- Status changed from positive_review to closed
New commits:
Add periodic coordinates in manifold charts
Treatment of periodic coordinates in point comparison; add periodic azimuthal coordinate in Euclidean spaces
Correct typo in error message in IntegratedCurve.solve()