Skip to content
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

[WIP] re-organizing metadata for incomplete BTD flush to close cleanly without nans #4704

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

RevathiJambunathan
Copy link
Member

@RevathiJambunathan RevathiJambunathan commented Feb 19, 2024

The example in Examples/Physics_applications/laser_acceleration/inputs_2d_boost
will produce nans in openpmd output if BTD flush is incomplete (i.e., run with fewer timesteps)

In this PR, this is fixed by changing the meta data for the snapshot box and geometry, so its consistent with all the previous buffers that were flushed and the number of cells in the current flush.
Now the same example, when run with fewer timesteps (i.e., scenario where we have an incomplete BTD flush), has consistent meta data and therefore will not show nans for the missing cell data in the OpenPMD output.

This PR fixes the meta-data for the fields

To do :

  1. Update OpenPMD metadata so that the geometry and new number of boxes are corrected wrt to that of the terminated output. @ax3l Is there a way to reset the openpmd metadata (that was set at first buffer flush) if there is an abrupt force flush and the btd flush is incomplete?
    It wont change the way we do offsets, except for the last incomplete flush, wher the offset will be zero, because the index of the geometry is updated to be consistent with the incomplete buffer.
Screenshot 2024-02-19 at 4 47 31 PM
  1. meta-data for particles

@RevathiJambunathan RevathiJambunathan added bug Something isn't working bug: affects latest release Bug also exists in latest release version component: diagnostics all types of outputs labels Feb 19, 2024
@ax3l ax3l self-requested a review February 20, 2024 17:29
@RevathiJambunathan
Copy link
Member Author

Discussed at development meeting :
@ax3l is adding support for openPMD meta-data to be updated.

(currentncells + ncellsflushed) *
dz_lab(warpx.getdt(lev), ref_ratio[m_moving_window_dir]);
amrex::Print() << " old z lo : " << m_snapshot_domain_lab[i_buffer].lo(m_moving_window_dir) << " \n";
// m_snapshot_domain_lab[i_buffer].setLo(m_moving_window_dir, new_zlo);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working component: diagnostics all types of outputs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants