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

Priority:  major  Milestone:  sage9.4 
Component:  manifolds  Keywords:  pullback 
Cc:  Travis Scrimshaw, Michael Jung, Matthias Köppe  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 18 months ago by
Description:  modified (diff) 

comment:2 Changed 18 months ago by
Description:  modified (diff) 

comment:3 Changed 18 months ago by
Authors:  → Eric Gourgoulhon 

Branch:  → public/manifolds/pullback_bug31904 
Cc:  Travis Scrimshaw Michael Jung Matthias Köppe added 
Commit:  → 8455aab6a2b5193539aea0a0c783aa02c43e6bfd 
Status:  new → needs_review 
comment:4 Changed 18 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 18 months ago by
The return partial
statement in the parallel code has seemingly accidentally been indented too far.
comment:6 Changed 18 months ago by
Commit:  8455aab6a2b5193539aea0a0c783aa02c43e6bfd → aea4554d90de3a3cb39c0e3704edc0807d8b4109 

Branch pushed to git repo; I updated commit sha1. New commits:
aea4554  #31904: Fix indentation in _pullback_chart

comment:7 Changed 18 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:9 Changed 18 months ago by
Reviewers:  → Ricardo Buring 

Status:  needs_review → positive_review 
Yes, looks good now.
comment:11 Changed 18 months ago by
Branch:  public/manifolds/pullback_bug31904 → aea4554d90de3a3cb39c0e3704edc0807d8b4109 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
Fix bug #31904 in pullback