-
Notifications
You must be signed in to change notification settings - Fork 196
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
Particle Buffer for Backtransformed Diagnostics #1898
Particle Buffer for Backtransformed Diagnostics #1898
Conversation
79948f7
to
5e02f5f
Compare
4203c13
to
3ee1df9
Compare
93c5c5c
to
8c6ffe0
Compare
e32554c
to
877945e
Compare
877945e
to
9e87d3c
Compare
a9e4ef4
to
0db228f
Compare
f95521b
to
911bf14
Compare
ADIOS2 backend issue will we approached in openPMD/openPMD-api#1126 We will add an assert for now. |
1a82f80
to
8137d3e
Compare
a9e84d5 This commit add the Abort. This commit add this in the documentation. |
7dc3abf
to
87cff7e
Compare
…article container
…Data common to both are initialized separately
for more information, see https://pre-commit.ci
0774f1c
to
2e7cf66
Compare
Add Prabhat's suggestion Co-authored-by: Prabhat Kumar <[email protected]>
…ntum_z is 3.68e-3 and the current tolerance is 2.5e-3
@@ -15,5 +15,5 @@ | |||
|
|||
my_check = checksumAPI.evaluate_checksum( | |||
'background_mcc', 'Python_background_mcc_plt00050', | |||
do_particles=True, rtol=2.5e-3 | |||
do_particles=True, rtol=3.7e-3 |
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.
@roelof-groenewald I changed this temporarily to 3.7e-3 as that was the relative difference for particle_momentum_z for electrons. All other quantities in the checksum are within this tolerance. Was 2.5e-3 chosen specifically or was this driven by the maximum difference in the checksum?
This PR changes when time get updated, and as a result, background_mcc benchmarks are updated since the potential hi uses the updated time
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.
That sounds fine. The 2.5e-3 tolerance was not intelligently chosen, but by the needed tolerance for the test to pass so increasing it to 3.7e-3 is fine.
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!
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.
We have a couple of known issues:
- openPMD: ADIOS2 particle resize/output seems to be not working yet
- plotfiles: reading back pure particle output does not work yet
but we can address them in follow-ups.
m_doParticleSetUp = false; | ||
if (counter.GetTotalNumParticles() > 0 and ParticleFlushOffset == 0) { | ||
// This will trigger meta-data flush for particles the first-time non-zero number of particles are flushed. | ||
m_doParticleSetUp = true; | ||
} |
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.
This PR implements the capability to transform particle-data from boosted-frame to lab-frame and visualize it using plotfiles and openpmd format using the new BTD interface.
Please note that the output below is not in SI to compare with old BTD. However, the code has been fixed to only output SI units similar to FullDiagnostics.
Also an Abort is added in the code when adios backend is used with openpmd format to write particles in lab-frame. A corresponding Issue is generated #2448
Below is the 2D input file that was used to verify the simulations using the customized output from old BTD with that from new BTD using plotfile and openpmd format.
inputs_2d_boost_testBTD.txt
Output from old-BTD for 2nd snapshot
Output from new-BTD with plotfile format
Output from new BTD with openpmd format :
I was unable to plot particles and fields in the same slice using openpmd-viewer , but they are plotted separately here
I compared the mean(uz) from old BTD and new BTD (plotfile) and found that both outputs agree exactly.
for completeness : mean(uz) for the driver particles in WarpX units from old and new BTD = 59605413002956.99