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

Add Time-Averaged Field Diagnostics #5285

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

Conversation

n01r
Copy link
Member

@n01r n01r commented Sep 18, 2024

This PR adds time-averaged field diagnostics to the WarpX output

  • code
  • docs
  • tests
  • example
  • meta-data $\Longrightarrow$ Follow-up PR
  • make compatible with adaptive time stepping $\Longrightarrow$ Follow-up PR

Currently, compiling for GPU creates a linking error. We would like to see the CI output to possibly find the issue.
Hence, we do not flag this as WIP right now.

This PR is based on work performed during the 2024 WarpX Refactoring Hackathon and was created together with @RevathiJambunathan. 🙂

Successfully merging this pull request may close #5165.

@n01r n01r added hackathon Let's address this topic during the GPU hackathon component: diagnostics all types of outputs labels Sep 18, 2024
@archermarx
Copy link
Contributor

Thanks for making this PR! One complication is that with #5176, adaptive timestepping will be possible. This means that the timestep length can change, so simply summing the multifabs and dividing by the period won't be enough for a proper time average. I don't think addressing this will be too hard, however.

@n01r
Copy link
Member Author

n01r commented Sep 18, 2024

Thanks, @archermarx! I wasn't aware of that yet. 🙂 We can do a follow-up and catch if dt_update_interval is set. In that case, we could create a cumulative sum weighted with the time step length and also add up the total time as we go. During the flush, we then divide by the total time.

@archermarx
Copy link
Contributor

Thanks, @archermarx! I wasn't aware of that yet. 🙂 We can do a follow-up and catch if dt_update_interval is set. In that case, we could create a cumulative sum weighted with the time step length and also add up the total time as we go. During the flush, we then divide by the total time.

Yep, my thought exactly. The adaptive timestepping PR was just merged, too.

@EZoni
Copy link
Member

EZoni commented Sep 19, 2024

I think #5296 should fix the clang-tidy errors that remain, which don't seem related to this PR.

- Implement warnings and errors for certain inputs concerning averaging periods
- added first documentation on time averaged diags
- put more operations on summation multifabs into if-environments
- added time averaged diags to laser-ion acceleration example
- fix first issues that came up when testing this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: diagnostics all types of outputs hackathon Let's address this topic during the GPU hackathon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagnostics: Time-Averaged Fields
4 participants