Fix #164: rebind spans after copy/move/assignment#400
Fix #164: rebind spans after copy/move/assignment#400jurasic-pf merged 4 commits intoproximafusion:mainfrom
Conversation
cf74da6 to
b25868a
Compare
|
Thanks for looking into this issue. |
|
@jurasic-pf Thanks for the review. I will reply to specific comments once I sorted things out. It's like solving one issue keeps leading to another issue. |
b25868a to
56ec23c
Compare
56ec23c to
1765fcc
Compare
jurasic-pf
left a comment
There was a problem hiding this comment.
Great! Thanks for taking the time, I just added a test to confirm behavior is as expected.
|
Hi @jurasic-pf, sorry for the slow progress. I picked up #164 to make contributions to this repo and went with the minimal fix (rebind spans after copy/move/assignment). In hindsight I should have asked direction first. If useful, I can follow up with a separate PR to:
Which direction do you prefer? I am happy to pick up other issues if you guys need extra hands. I would like to contribute. |
|
@jurasic-pf I see that you've also added the test. Thank you! |
|
@jurasic-pf I can't work on this full time, but would like to make contributions to this repo. I'll try to be more consistent. |
Summary
Fixes Issue #164: FourierGeometry/FourierVelocity/FourierForces store std::span views into FourierCoeffs-owned vectors. The compiler-generated copy/move semantics shallow-copy those spans, so after a copy the spans can still point at the source object's buffers.
This PR implements copy/move constructors and copy/move assignment operators for:
These operations rebind the span members to the destination object's own storage after copy/move/assignment.
It also adds copy/move assignment operators to FourierCoeffs (const config members delete the implicit operator=).
Testing
Limitations / follow-up