-
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
Always write the particles' positions #4855
Conversation
// to be consistent with always writing out r and z. | ||
// TODO: openPMD does a reconstruction to Cartesian, so we can now skip force-writing this | ||
m_plot_flags[pc->getParticleComps().at("theta")] = 1; | ||
#endif |
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.
My impression is that theta
is not useful, since the particles are dumped in Cartesian coordinates anyway. In fact, I think that this flag is not doing anything, since theta
is actually not written anymore as of:
#4686
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.
Hm, it seems that this is still needed when writing plotfiles
.
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!
@@ -49,6 +49,15 @@ ParticleDiag::ParticleDiag( | |||
m_plot_flags[existing_variable_names.at(var)] = 1; | |||
} | |||
} | |||
// Always write the position | |||
// Note: for WARPX_DIM_RZ, no need to set the flag y: it is always written |
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.
In RZ, I observed empirically that:
- I need to set
m_plot_flags[pc->getParticleComps().at("x")] = 1;
(otherwise the Cartesianx
position is not written correctly with openPMD) - I cannot set
m_plot_flags[pc->getParticleComps().at("y")] = 1;
(otherwise I get an error inat
, saying that this property does not exist), but the Cartesiany
is automatically reconstructed and written anyway.
@ax3l Do you understand why y
is automatically written, but not x
? (i.e. why do I need to set the flag for x
, but not for y
)
Replaced by #4914 |
As part of our restructuring from AoS positions to SoA (#4653), it seems that the particles' positions are not written out by default anymore. (But they probably should, since, in my understanding, the particles' positions and ID are required attributes in the openPMD standard.)
This PR writes out the particle positions by default.
Fixes #4841