-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close #1688 : Transform the moving window velocity to its boosted-frame value. #1700
Conversation
…hat in the boosted frame '(moving_window_v-beta_boost*c)/(1-moving_window_v/c*beta_boost)'. Examples/Tests/moving_window_boost : A simple test gives the moving window velocity in the boosted frame.
Hi @steelan, thank you for your first contribution to WarpX! We will assign a reviewer from our team to take a look and iterate with you on your changes. Can you in the meantime please add a detailed pull request description, outlining what you try to achieve and how? Thank you already and again welcome ✨ |
z2max=ds.domain_right_edge.v[2] | ||
|
||
vv=(z2max-z1max)/(t2-t1)/299792458. | ||
print('moving_window_v in boosted frame =', vv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could write an additional line here, comparing the value in vv
with an expected value (within an epsilon range) and returning a non-zero exit code with sys.exit(1)
in case the value does not match.
That way, we can verify the test without manual intervention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this PR!
The changes to WarpX itself look good. Could you add some more explanations in the file that defines the automated test? Thanks!
@@ -0,0 +1,22 @@ | |||
import os | |||
import yt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add a few lines of comments here, in order to explain what the tests does, and what it is checking at the end of the simulation?
After more discussion within the WarpX team, we think that an automated test is not necessarily needed for this feature. |
I agree. This feature is intrinsic so a test is not necessary. Thanks for
merging it.
…On Wed 10. Feb 2021 at 23:13, Remi Lehe ***@***.***> wrote:
After more discussion within the WarpX team, we think that an automated
test is not necessarily needed for this feature.
Since @steelan <https://github.com/steelan> tested this by hand, I think
that we can merge as is.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1700 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEGUJTHV3OV4ZM5PCLMFA4DS6MAG7ANCNFSM4XM4OMYQ>
.
|
Sorry I forgot to mention it is related to #1688.
…On Wed 10. Feb 2021 at 22:08, Axel Huebl ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Examples/Tests/moving_window_boost/moving_window_v_boost.py
<#1700 (comment)>:
> +kk = 0
+fn = './diags/'+dlist[kk]
+print(fn)
+ds=yt.load(fn)
+t1=ds.current_time.v[()]
+z1max=ds.domain_right_edge.v[2]
+
+kk = 1
+fn = './diags/'+dlist[kk]
+print(fn)
+ds=yt.load(fn)
+t2=ds.current_time.v[()]
+z2max=ds.domain_right_edge.v[2]
+
+vv=(z2max-z1max)/(t2-t1)/299792458.
+print('moving_window_v in boosted frame =', vv)
I think we could write an additional line here, comparing the value in vv
with an expected value (within an epsilon range) and returning a non-zero
exit code with sys.exit(1) in case the value does not match.
That way, we can verify the test without manual intervention.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1700 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEGUJTG3I3VXCF4KHTCVHRTS6LYTHANCNFSM4XM4OMYQ>
.
|
Source/Utils/WarpXMovingWindow.cpp
: Transformmoving_window_v
to that in the boosted frame(moving_window_v-beta_boost*c)/(1-moving_window_v*beta_boost/c)
.Examples/Tests/moving_window_boost
: A simple test gives the moving window velocity in the boosted frame.