parthenon-hpc-lab / parthenon

Parthenon AMR infrastructure
https://parthenon-hpc-lab.github.io/parthenon/
Other
112 stars 33 forks source link

UserWorkBeforeRestartOutput #1062

Closed brryan closed 5 months ago

brryan commented 5 months ago

PR Summary

We have a downstream need to call a third party library's restart capability when writing our own restarts. This PR adds hooks for Mesh and MeshBlock analogs of UserWorkBeforeOutput that are only triggered during restart outputs.

PR Checklist

Yurlungur commented 5 months ago

@brryan is this ready for review? It's still marked WIP

brryan commented 5 months ago

@brryan is this ready for review? It's still marked WIP

@Yurlungur Yes it works but I just wanted to see what people think about including OutputParameters* in the function signature for UserWorkBeforeRestartOutput (and somehow extending UserWorkBeforeOutput in the same way?) so we could get things like output filename downstream.

brryan commented 5 months ago

OK I updated this to reintroduce explicitness around nullptr with std::function and I removed the per-MeshBlock version of UserWorkBeforeRestartOutput. What I did not do is: