Opened 2 years ago

Closed 2 years ago

#30228 closed enhancement (fixed)

Declare Sections with Name only

Reported by: Michael Jung Owned by:
Priority: major Milestone: sage-9.2
Component: manifolds Keywords:
Cc: Eric Gourgoulhon, Travis Scrimshaw Merged in:
Authors: Michael Jung Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 78692a6 (Commits, GitHub, GitLab) Commit: 78692a6b4a712cbaf5f20b5f8199a529f9755be7
Dependencies: Stopgaps:

Status badges

Description (last modified by Michael Jung)

At this stage we have the following difference between sections and tensor fields:

sage: M = Manifold(2, 'M', start_index=1)                  
....: X.<x,y> = M.chart()                            
....: E = M.vector_bundle(2, 'E')      
....: e = E.local_frame('e')      
....: v = M.vector_field('v')      
....: s = E.section('s')
Traceback (most recent call last)
IndexError: string index out of range

This simply comes from the fact that the method section does not like pure strings as input, in contrast to vector_field or tensor.

Change History (7)

comment:1 Changed 2 years ago by Michael Jung

Description: modified (diff)

comment:2 Changed 2 years ago by Michael Jung

Branch: u/gh-mjungmath/declare_sections_with_name_only

comment:3 Changed 2 years ago by Michael Jung

Commit: 490d38d93b1f75a3ca245f9c3add92c017f35d42
Status: newneeds_review

New commits:

490d38dTrac #30228: init comp with string

comment:4 Changed 2 years ago by Michael Jung

Description: modified (diff)

comment:5 Changed 2 years ago by git

Commit: 490d38d93b1f75a3ca245f9c3add92c017f35d4278692a6b4a712cbaf5f20b5f8199a529f9755be7

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

78692a6Trac #30228: misleading comment corrected

comment:6 Changed 2 years ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review


comment:7 Changed 2 years ago by Volker Braun

Branch: u/gh-mjungmath/declare_sections_with_name_only78692a6b4a712cbaf5f20b5f8199a529f9755be7
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.