-
Notifications
You must be signed in to change notification settings - Fork 31
Fix openPMD Meta-Data #349
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -211,6 +211,7 @@ namespace detail | |
|
|
||
| void BeamMonitor::prepare ( | ||
| PinnedContainer & pc, | ||
| RefPart const & ref_part, | ||
| int step | ||
| ) { | ||
| #ifdef ImpactX_USE_OPENPMD | ||
|
|
@@ -253,6 +254,17 @@ namespace detail | |
| getComponentRecord(component_name).resetDataset(d_fl); | ||
| } | ||
| } | ||
|
|
||
| // openPMD coarse position | ||
| { | ||
| beam["positionOffset"]["x"].resetDataset(d_fl); | ||
| beam["positionOffset"]["x"].makeConstant(ref_part.x); | ||
| beam["positionOffset"]["y"].resetDataset(d_fl); | ||
| beam["positionOffset"]["y"].makeConstant(ref_part.y); | ||
| beam["positionOffset"]["ct"].resetDataset(d_fl); | ||
| beam["positionOffset"]["ct"].makeConstant(ref_part.t); | ||
|
Comment on lines
+264
to
+265
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cemitch99 here for
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I follow what the intended output is here. I understand that by "ct" you mean "ref_part.t", but what is meant by "dt"? Does this represent one or more particle values of the "t" coordinate? In general, I would say that "s" is qualitatively different from the other variables like ct. It is an independent variable, it is associated only with the reference particle, and the other (beam particle) values are given as functions of "s".
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, ah yes I was confused for a second... So per particle, splitting the longitudinal position (for a fixed s) into
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's true.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, will do in #350 |
||
| } | ||
|
|
||
| // AoS: Int | ||
| beam["id"][scalar].resetDataset(d_ui); | ||
|
|
||
|
|
@@ -298,7 +310,7 @@ namespace detail | |
| */ | ||
|
|
||
| // prepare element access | ||
| this->prepare(pinned_pc, step); | ||
| this->prepare(pinned_pc, ref_part, step); | ||
|
|
||
| // loop over refinement levels | ||
| int const nLevel = pinned_pc.finestLevel(); | ||
|
|
@@ -320,6 +332,8 @@ namespace detail | |
| auto series = std::any_cast<io::Series>(m_series); | ||
| io::WriteIterations iterations = series.writeIterations(); | ||
| io::Iteration iteration = iterations[m_step]; | ||
|
|
||
| // close iteration | ||
| iteration.close(); | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.