Opened 12 months ago
Closed 11 months ago
#31904 closed defect (fixed)
Pullback silently fails in some cases with multiple charts
Reported by:  egourgoulhon  Owned by:  

Priority:  major  Milestone:  sage9.4 
Component:  manifolds  Keywords:  pullback 
Cc:  tscrim, ghmjungmath, mkoeppe  Merged in:  
Authors:  Eric Gourgoulhon  Reviewers:  Ricardo Buring 
Report Upstream:  N/A  Work issues:  
Branch:  aea4554 (Commits, GitHub, GitLab)  Commit:  aea4554d90de3a3cb39c0e3704edc0807d8b4109 
Dependencies:  Stopgaps: 
Description (last modified by )
In Sage 9.3, we have
sage: E.<x,y> = EuclideanSpace() sage: polar.<r,ph> = E.polar_coordinates() sage: g = E.metric() sage: M = Manifold(1, 'M') sage: Ct.<t> = M.chart() sage: F = M.diff_map(E, coord_functions={(Ct, polar): (1 + cos(t), t)}) sage: gM = F.pullback(g) sage: gM Field of symmetric bilinear forms on the 1dimensional differentiable manifold M
So far so good, but
sage: gM.display() ValueError: no basis could be found for computing the components in the Coordinate frame (M, (d/dt)
Actually, gM
has been initialized as a tensor field object, but its components have not been evaluated in any frame:
sage: gM._components {}
Forcing the coordinate expression of the map F
in the Cartesian chart (for instance by a call to F.display()
) fixes the issue:
sage: F.display() M > E^2 t > (x, y) = (cos(t)^2 + cos(t), (cos(t) + 1)*sin(t)) t > (r, ph) = (cos(t) + 1, t) sage: gM = F.pullback(g) sage: gM.display() (2*cos(t) + 2) dt*dt
However, the expression of F
in Cartesian coordinates should not be required to compute the pullback of g
since the latter is known in polar coordinates, where F
has been defined:
sage: g.display(polar) g = dr*dr + r^2 dph*dph
This bug has been reported at https://ask.sagemath.org/question/57431/
Change History (11)
comment:1 Changed 12 months ago by
 Description modified (diff)
comment:2 Changed 12 months ago by
 Description modified (diff)
comment:3 Changed 12 months ago by
 Branch set to public/manifolds/pullback_bug31904
 Cc tscrim ghmjungmath mkoeppe added
 Commit set to 8455aab6a2b5193539aea0a0c783aa02c43e6bfd
 Status changed from new to needs_review
comment:4 Changed 12 months ago by
The fix consisted in making the internal function _pullback_chart
of the method pullback
to operate for a single pair of charts (now added as arguments), which is determined in the main part of pullback
, based on the knowledge of the map's coordinate expressions.
comment:5 followup: ↓ 7 Changed 12 months ago by
The return partial
statement in the parallel code has seemingly accidentally been indented too far.
comment:6 Changed 12 months ago by
 Commit changed from 8455aab6a2b5193539aea0a0c783aa02c43e6bfd to aea4554d90de3a3cb39c0e3704edc0807d8b4109
Branch pushed to git repo; I updated commit sha1. New commits:
aea4554  #31904: Fix indentation in _pullback_chart

comment:7 in reply to: ↑ 5 Changed 12 months ago by
Replying to rburing:
The
return partial
statement in the parallel code has seemingly accidentally been indented too far.
Good catch, thanks! (it was not revealed by the parallel doctest because local_list_ind
had a single element in that case).
This is corrected in the above commit (as well as a pyflakes error reported by the patchbot).
comment:8 Changed 11 months ago by
Ricardo, do you agree with the last version?
comment:9 Changed 11 months ago by
 Reviewers set to Ricardo Buring
 Status changed from needs_review to positive_review
Yes, looks good now.
comment:10 Changed 11 months ago by
Thank you!
comment:11 Changed 11 months ago by
 Branch changed from public/manifolds/pullback_bug31904 to aea4554d90de3a3cb39c0e3704edc0807d8b4109
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Fix bug #31904 in pullback