Opened 3 years ago
Closed 3 years ago
#28579 closed enhancement (fixed)
Wedge Product with Scalar Fields
Reported by:  Michael Jung  Owned by:  

Priority:  major  Milestone:  sage9.0 
Component:  geometry  Keywords:  manifolds, scalar fields, wedge product 
Cc:  Travis Scrimshaw, Eric Gourgoulhon  Merged in:  
Authors:  Michael Jung  Reviewers:  Eric Gourgoulhon 
Report Upstream:  N/A  Work issues:  
Branch:  16d849e (Commits, GitHub, GitLab)  Commit:  16d849e038486dbb6447ed72ef1b2789fd9513e4 
Dependencies:  Stopgaps: 
Description (last modified by )
The wedge product of differential forms was not compatible with scalar fields:
sage: M = Manifold(2, 'M') sage: c_cart.<x,y> = M.chart() sage: a = M.diff_form(1, [x, y], name='a') sage: f = M.scalar_field(x^2, name='f') sage: a.wedge(f) AttributeError Traceback (most recent call last) <ipythoninput1039619b3382c> in <module>() 3 a = M.diff_form(Integer(1), [x, y], name='a') 4 f = M.scalar_field(x**Integer(2), name='f') > 5 a.wedge(f) ... AttributeError: 'DiffScalarFieldAlgebra_with_category.element_class' object has no attribute '_ambient_domain'
In this ticket, this gets fixed.
This ticket is part of the metaticket #28519.
Change History (10)
comment:1 Changed 3 years ago by
Branch:  → u/ghDeRhamSource/wedge_product_with_scalar_fields 

comment:2 Changed 3 years ago by
Authors:  → Michael Jung 

Cc:  Travis Scrimshaw Eric Gourgoulhon added 
Commit:  → 62dabd4520bc2349ef0b8336b461e1cbcce20390 
Component:  PLEASE CHANGE → geometry 
Description:  modified (diff) 
Keywords:  manifolds scalar fields wedge product added 
Reviewers:  → Eric Gourgoulon, Travis Scrimshaw 
Status:  new → needs_review 
Type:  PLEASE CHANGE → enhancement 
comment:3 Changed 3 years ago by
Description:  modified (diff) 

comment:4 Changed 3 years ago by
Dependencies:  → #28579 

comment:5 Changed 3 years ago by
Dependencies:  #28579 

comment:6 Changed 3 years ago by
Thanks for fixing this.
A question: why have you made the method degree()
of scalar fields return self._tensor_rank
instead of 0
?
comment:7 followup: 9 Changed 3 years ago by
Actually, I had no particular reason in mind. :D
I guess, one reason is, to make clear the connection between the degree and the tensor rank. Moreover, this is more consistent to what is implemented in diff_form.py
. In the end it felt more "round".
Do you want me to change it back?
comment:8 Changed 3 years ago by
Commit:  62dabd4520bc2349ef0b8336b461e1cbcce20390 → 16d849e038486dbb6447ed72ef1b2789fd9513e4 

Branch pushed to git repo; I updated commit sha1. New commits:
16d849e  Typos fixed

comment:9 Changed 3 years ago by
Reviewers:  Eric Gourgoulon, Travis Scrimshaw → Eric Gourgoulhon 

Status:  needs_review → positive_review 
Replying to ghDeRhamSource:
Actually, I had no particular reason in mind. :D I guess, one reason is, to make clear the connection between the degree and the tensor rank. Moreover, this is more consistent to what is implemented in
diff_form.py
. In the end it felt more "round".Do you want me to change it back?
No I think it's OK. As you say, it's consistent with the degree()
method of differential forms.
Thanks.
A general comment: when you create a ticket, do not fill the "Reviewers" field; it will be filled by the reviewers themselves when they are actually making the review. If you want to suggest a reviewer for your ticket, simply add its username to the "Cc" field.
comment:10 Changed 3 years ago by
Branch:  u/ghDeRhamSource/wedge_product_with_scalar_fields → 16d849e038486dbb6447ed72ef1b2789fd9513e4 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
Wedge product compatible with scalar fields