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

Properly fix when OutputFieldsDefault writes output #326

Merged
merged 24 commits into from
Sep 28, 2023

Conversation

JamesMcClung
Copy link
Collaborator

  • Extract/factor out common behavior of pfield params and tfield params
  • Fix behavior of when to do a pfd/tfd write after checkpoint
  • Fix behavior of when to accumulate for tfd
  • Add comments and generally improve code readability
  • Add tests for the above

@JamesMcClung
Copy link
Collaborator Author

JamesMcClung commented Sep 7, 2023

I'd like to remove next_out as a parameter to do_out() and just calculate whether the given timestep is an "out" step. This would mean removing {p,t}field_next_ and ignoring the result of do_out() when restarting from a checkpoint. The trade is a (presumedly negligible) performance decrease for eliminating the surprising current behavior of do_out().

Although one unaesthetic thing would be having to do the math in both tfield.do_out() and tfield.do_accum(), so maybe it's not worth it.

Copy link
Contributor

@germasch germasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nicely done. I hadn't expected you'd actually do the unit test stuff, but that's great.

@germasch germasch merged commit 5e20470 into psc-code:main Sep 28, 2023
6 of 7 checks passed
@JamesMcClung JamesMcClung deleted the pr/tfield-fix branch December 21, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants