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

Restart from phdf outputs #135

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

Restart from phdf outputs #135

wants to merge 4 commits into from

Conversation

bprather
Copy link
Contributor

@bprather bprather commented Feb 7, 2025

Parthenon outputs dumps and restarts in basically the same format, so they can substitute for one another in a pinch. However, dumps generally lack face-centered or conserved magnetic fields, so they must be interpolated/multiplied appropriately, and in the case of face-centered fields must then be cleaned.

Luckily, we do all that stuff for iharm3d format restarts anyway, so I just re-use that code, and mark the cell-centered prims.B as Restart so that it gets read, instead of just cons.fB which won't exist. The whole thing ends up pretty clean.

Using this requires patching out Parthenon's type check, src/outputs/restart.hpp L125. If I'm not lazy I'll add that patch to the patchset before I merge this.

Restarting from phdfs is already documented on the wiki: https://github.com/AFD-Illinois/kharma/wiki/Running-KHARMA#restarting-simulations.

Previously, B_CT::UtoP on e.g. IndexDomain::inner_x1 would only update
ghost cell centers.  But changing the flux on the domain face calls for
updating the first interior row too, since it's involved in averaging.

Also patches up initializing/normalizing B in the presence of boundaries
Update first interior cells on B_CT::UtoP and fix B for tilts >45 degrees
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.

1 participant