Opened 20 months ago
Closed 18 months ago
#31654 closed enhancement (fixed)
copy_from for scalar fields
Reported by:  Michael Jung  Owned by:  

Priority:  major  Milestone:  sage9.4 
Component:  manifolds  Keywords:  scalarfields 
Cc:  Eric Gourgoulhon, Travis Scrimshaw  Merged in:  
Authors:  Michael Jung  Reviewers:  Travis Scrimshaw, Samuel Lelièvre 
Report Upstream:  N/A  Work issues:  
Branch:  e15fbf3 (Commits, GitHub, GitLab)  Commit:  e15fbf3743e34666aff1b97dfc14d407e269688c 
Dependencies:  Stopgaps: 
Description
In this ticket we equip scalar fields with a method copy_from
as we did for tensor fields in #28628.
Change History (25)
comment:1 Changed 20 months ago by
Branch:  → u/ghmjungmath/copy_from_scalarfields 

comment:2 Changed 20 months ago by
Commit:  → 4d6993e51c7b5f6eb4c92a66d9e68a0652a27425 

Status:  new → needs_review 
Type:  PLEASE CHANGE → enhancement 
comment:3 Changed 20 months ago by
Commit:  4d6993e51c7b5f6eb4c92a66d9e68a0652a27425 → 075f512c8c10f66d04a7d1d5110af20984bc047b 

Branch pushed to git repo; I updated commit sha1. New commits:
075f512  Trac #31654: copy of restrictions unnecessary

comment:4 Changed 20 months ago by
Copying the restrictions seems unnecessary. All information should be contained in the expressions.
comment:5 Changed 20 months ago by
Commit:  075f512c8c10f66d04a7d1d5110af20984bc047b → 3a2f28572f847e20378e715b2a155f3c00cae0f5 

Branch pushed to git repo; I updated commit sha1. New commits:
3a2f285  Trac #31654: minor typo

comment:6 Changed 20 months ago by
Branch:  u/ghmjungmath/copy_from_scalarfields → public/31654 

comment:7 Changed 20 months ago by
Branch:  public/31654 → public/ticket/21991 

Commit:  3a2f28572f847e20378e715b2a155f3c00cae0f5 → 13b8f3fa915439e5edbc2df077c22fc679b6593e 
Sorry!!! I pushed my branch to the wrong ticket (typo).
New commits:
13b8f3f  #21991 regression test for issue fixed in #24371

comment:8 Changed 20 months ago by
Branch:  public/ticket/21991 → u/ghmjungmath/copy_from_scalarfields 

Commit:  13b8f3fa915439e5edbc2df077c22fc679b6593e → 3a2f28572f847e20378e715b2a155f3c00cae0f5 
comment:9 Changed 20 months ago by
No worries. I am just happy so see that I am not the only one doing these kind of mistakes. :D
comment:10 Changed 20 months ago by
Thanks very much for your understanding. Please be sure your ticket is set back to the correct branch. I tried to fix it, but I don't really understand trac, so I'm confused and I think may have made things worse: I set the branch to u/ghmjungmath/copy_from_scalarfields
but it looks like maybe it should be public/ticket/21991
. (PS my branch was intended for #31645, and is now there.)
comment:13 Changed 20 months ago by
Reviewers:  → Travis Scrimshaw 

Status:  needs_review → positive_review 
LGTM.
comment:15 Changed 20 months ago by
Commit:  3a2f28572f847e20378e715b2a155f3c00cae0f5 → 3ea7920db5451a1d28d3f604a275c36602d2c1b3 

Status:  positive_review → needs_review 
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:
3ea7920  Trac #31654: add copy_from to scalarfields

comment:16 Changed 20 months ago by
Sorry, I was a little sloppy here and simply copied the code. This name thingy is actually not needed.
comment:19 Changed 20 months ago by
Status:  needs_review → positive_review 

comment:20 Changed 20 months ago by
Reviewers:  Travis Scrimshaw → Travis Scrimshaw, Samuel Lelièvre 

Status:  positive_review → needs_work 
In both tensorfield.py
and scalarfield.py
, maybe change
 Make ``self`` to a copy of ``other``. + Make ``self`` a copy of ``other``.
Maybe rephrase this:
  ``other``  other scalar field in the very same module from which  ``self`` should be a copy of +  ``other``  other scalar field, in the same module as ``self``
Maybe remove the + sign here?
raise TypeError("the original must be an element "  + "of {}".format(self.parent())) + "of {}".format(self.parent()))
Or feel free to ignore these suggestions and move back to positive review.
comment:21 Changed 20 months ago by
Commit:  3ea7920db5451a1d28d3f604a275c36602d2c1b3 → e15fbf3743e34666aff1b97dfc14d407e269688c 

Branch pushed to git repo; I updated commit sha1. New commits:
e15fbf3  Trac #31654: docstring improvements

comment:23 Changed 20 months ago by
Status:  needs_review → positive_review 

comment:24 Changed 20 months ago by
Milestone:  sage9.3 → sage9.4 

comment:25 Changed 18 months ago by
Branch:  u/ghmjungmath/copy_from_scalarfields → e15fbf3743e34666aff1b97dfc14d407e269688c 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
Trac #31654: add copy_from to scalarfields