Opened 7 months ago

Closed 7 months ago

#22667 closed defect (fixed)

Fix computation of inverse metric on parallelizable manifolds

Reported by: egourgoulhon Owned by:
Priority: major Milestone: sage-8.0
Component: geometry Keywords: metric, manifold
Cc: tscrim Merged in:
Authors: Eric Gourgoulhon Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: fc04276 (Commits) Commit: fc042765144026ad59876ad8680f538c6e274ebc
Dependencies: #22637 Stopgaps:

Description

The following is a bug:

sage: S1 = Manifold(1, 'S^1') # the circle
sage: U = S1.open_subset('U') # the complement of one point
sage: Xt.<t> =  U.chart('t:(0,2*pi)') # the standard angle coordinate
sage: V = S1.open_subset('V') # the complement of the point t=pi
sage: Xu.<u> = V.chart('u:(0,2*pi)') # the angle t-pi
sage: S1.declare_union(U, V)
sage: e = S1.vector_frame('e') # a global vector frame (makes S^1 parallelizable)
sage: g = S1.metric('g')
sage: g[e,0,0] = 1
sage: g[[e,0,0]].display()
S^1 --> R
on U: t |--> 1
on V: u |--> 1
sage: g.inverse()[[e,0,0]].display()
S^1 --> R
on U: t |--> 1

The last output should be

S^1 --> R
on U: t |--> 1
on V: u |--> 1

since the component g00 of the inverse metric in the global frame e is the constant scalar field 1, which must have a representation on both open subsets U and V. The current ticket fixes this.

Change History (6)

comment:1 Changed 7 months ago by egourgoulhon

  • Branch set to public/manifolds/bug-inverse-metric-22667
  • Cc tscrim added
  • Commit set to 73638157694451c7bebc4575b38aa525c457b9ab
  • Status changed from new to needs_review

This should be the last of the manifold bug fixes relative to Sage 7.5.1 ;-)


New commits:

96f814dFix treatment of pullback on parallelizable manifolds
6ab5f63Change the name of first argument to 'self' in nested method _pullback_chart of DiffMap
02add83Revert to previous version of nested function _pullback_chart in DiffMap.pullback
d0de237Merge branch 'public/manifolds/bug-pullback-parallelizable' of git://trac.sagemath.org/sage into Sage 7.6.rc0
9a9ee5bFix treatment of restrictions of tensor fields with parallelizable domains
7363815Fix computation of inverse metric on parallelizable manifolds (#22667)

comment:2 follow-up: Changed 7 months ago by tscrim

  • Reviewers set to Travis Scrimshaw

One little thing: you should put the try/except block on the minimal number of lines as it makes for easier maintenance/debugging. So I think it should just include the assignment of gmat. Otherwise LGTM.

comment:3 Changed 7 months ago by git

  • Commit changed from 73638157694451c7bebc4575b38aa525c457b9ab to fc042765144026ad59876ad8680f538c6e274ebc

Branch pushed to git repo; I updated commit sha1. New commits:

fc04276Better treatment of exceptions in inverse metric computation

comment:4 in reply to: ↑ 2 Changed 7 months ago by egourgoulhon

Replying to tscrim:

One little thing: you should put the try/except block on the minimal number of lines as it makes for easier maintenance/debugging. So I think it should just include the assignment of gmat.

Done (I've also included the computation of the matrix inverse in the try block).

comment:5 Changed 7 months ago by tscrim

  • Status changed from needs_review to positive_review

Thanks.

comment:6 Changed 7 months ago by vbraun

  • Branch changed from public/manifolds/bug-inverse-metric-22667 to fc042765144026ad59876ad8680f538c6e274ebc
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.