Opened 2 years ago

Last modified 2 years ago

#28916 closed enhancement

MixedFormAlgebra - More Flexible Coercions — at Version 9

Reported by: gh-DeRhamSource Owned by:
Priority: major Milestone: sage-9.1
Component: geometry Keywords: manifolds, mixed-forms
Cc: egourgoulhon, tscrim Merged in:
Authors: Michael Jung Reviewers:
Report Upstream: N/A Work issues:
Branch: u/gh-DeRhamSource/mixedformalgebra___more_flexible_coercions (Commits, GitHub, GitLab) Commit: 6775b86a3a5c4dd10185bc1e7e2eb25136c31041
Dependencies: Stopgaps:

Status badges

Description (last modified by gh-DeRhamSource)

This makes the coercion model of mixed forms more robust against modifications regarding differential forms. For instance: As soon as all differential forms of another mixed form have a coerce map, the mixed form has one too. The same now holds for any algebraic element which is coercible into a single differential form.

At this stage, the method degree is used and special cases are handled separately. But notice that not all coercible objects provide this method (symbold ring). Or conversely, having this method doesn't mean being coercible into a differential form. Hence this invocation is now entirely avoided.

Change History (9)

comment:1 Changed 2 years ago by gh-DeRhamSource

  • Branch set to u/gh-DeRhamSource/mixedformalgebra___more_flexible_coercions

comment:2 Changed 2 years ago by gh-DeRhamSource

  • Cc egourgoulhon tscrim added
  • Commit set to 4ba780eeb294c0390f3d83f1ffc355802590e018
  • Component changed from PLEASE CHANGE to geometry
  • Description modified (diff)
  • Keywords manifolds mixed-forms added
  • Status changed from new to needs_review
  • Type changed from PLEASE CHANGE to enhancement

This makes the coercion model of mixed forms more robust against modifications regarding differential forms. For instance: As soon as differential forms of every degree have coerce maps, the mixed form has one too.


New commits:

4ba780eTrac 28916: Flexible coercion of mixed forms

comment:3 Changed 2 years ago by git

  • Commit changed from 4ba780eeb294c0390f3d83f1ffc355802590e018 to 3132acc35ea82346bafe2eecc81ca97f6adf5e2b

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

3132accTrac 28916: Bugs fixed and code cleaned

comment:4 Changed 2 years ago by gh-DeRhamSource

I spared the try...except block now completely. I think this is a negligible loss of computation time. Also this is more robust and works everytime.

comment:5 Changed 2 years ago by git

  • Commit changed from 3132acc35ea82346bafe2eecc81ca97f6adf5e2b to 6775b86a3a5c4dd10185bc1e7e2eb25136c31041

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

6775b86Trac 28916: try...except removed

comment:6 Changed 2 years ago by gh-DeRhamSource

  • Authors set to Michael Jung

comment:7 Changed 2 years ago by tscrim

Do you have some examples that demonstrates that this change now covers something that it didn't (correctly) do before? If so, please add them to the documentation, but if not, can you give a more detailed explanation as to why you think this is better?

comment:8 Changed 2 years ago by gh-DeRhamSource

Fair enough. I'm not sure this change covers even more at this stage.

The only improvement so far: There might be objects with a method degree which are not coercible into differential forms. Or conversely there are coercible objects without having a degree method (like elements of the symbolic ring). So I avoid invoking degree completely.

Assume in a future version there come more objects not having a degree method but are coercible into differential forms (I admit, I have no idea what else it could be). Nevertheless, these cases have to be handled separately now. But with this changes, all potential coercions are covered.

Was that clearer? What do you think about it? And how could I improve my description?

By the way: Merry christmas retrospectively. :)

Last edited 2 years ago by gh-DeRhamSource (previous) (diff)

comment:9 Changed 2 years ago by gh-DeRhamSource

  • Description modified (diff)
Note: See TracTickets for help on using tickets.