Opened 2 years ago
Last modified 23 months ago
#24792 closed enhancement
More functionalities for bases of free modules and vector frames — at Version 3
Reported by: | egourgoulhon | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.2 |
Component: | geometry | Keywords: | basis, vector frame, manifold, free moduie |
Cc: | tscrim | Merged in: | |
Authors: | Eric Gourgoulhon | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | public/manifolds/more_basis_flexibility (Commits) | Commit: | 01681b8f3f739e56962f1ae215a098e706a67ee7 |
Dependencies: | Stopgaps: |
Description (last modified by )
This ticket provides more flexibility in the choice of symbols and indices for bases of free modules of finite rank and, consequently, for vector frames on manifolds. In particular, the labels of the basis elements are no longer necessarily integers and can be customized, for instance:
sage: M = Manifold(3, 'M') sage: e = M.vector_frame('e', indices=('x', 'y', 'z')); e Vector frame (M, (e_x,e_y,e_z))
The symbol of each element of the basis can also be freely chosen, by providing a tuple of symbols instead of a single string; it is then mandatory to specify as well some symbols for the dual coframe:
sage: e = M.vector_frame(('a', 'b', 'c'), symbol_dual=('A', 'B', 'C')); e Vector frame (M, (a,b,c)) sage: e[0] Vector field a on the 3-dimensional differentiable manifold M sage: e.coframe() Coframe (M, (A,B,C)) sage: e.coframe()[0] 1-form A on the 3-dimensional differentiable manifold M
Besides, the slice operator is introduced for bases; it is now possible to write
sage: e[:] (Vector field a on the 3-dimensional differentiable manifold M, Vector field b on the 3-dimensional differentiable manifold M, Vector field c on the 3-dimensional differentiable manifold M)
Internally, some refactoring of code has been performed. In particular, by renaming the FreeModuleCoBasis
's attribute _form
(the tuple containing the cobasis elements) to _vec
, so that it matches the name of the FreeModuleBasis
's attribute storing the basis elements, it has been possible to factor the method __getitem__
to the ABC Basis_abstract
. Another improvement is getting rid of all methods _init_dual_basis
in classes FreeModuleBasis
, VectorFrame
and CoordFrame
thanks to the introduction of the class attribute _cobasis_class
.
The functionalities introduced here provide a better user interface for #24623.
This work is part of the SageManifolds project, see #18528 for an overview.
Change History (3)
comment:1 Changed 2 years ago by
- Branch set to public/manifolds/more_basis_flexibility
- Commit set to 01681b8f3f739e56962f1ae215a098e706a67ee7
comment:2 Changed 2 years ago by
- Cc tscrim added
- Status changed from new to needs_review
comment:3 Changed 2 years ago by
- Description modified (diff)
New commits:
First draft adding more flexibility in symbols of free module bases and vector frames
More refactoring in vector frames
More work on vector frames
Add documentation for new options of vector frames