Skip to content

Commit

Permalink
add debugging output for failed FOFC
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Feb 5, 2024
1 parent 52da2d0 commit bf8d035
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/RadhydroSimulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,15 @@ auto RadhydroSimulation<problem_t>::advanceHydroAtLevel(amrex::MultiFab &state_o
amrex::Print() << "[FOFC-1] failed for " << ncells_bad << " cells on level " << lev << "\n";
}
if (abortOnFofcFailure_ != 0) {
#ifdef AMREX_USE_ASCENT
// write Blueprint HDF5 files
conduit::Node mesh;
amrex::SingleLevelToBlueprint(state_inter_cc_, componentNames_cc_, geom[lev], time, istep[lev] + 1, mesh);
conduit::Node bpMeshHost;
bpMeshHost.set(mesh); // copy to host mem (needed for Blueprint HDF5 output)
amrex::WriteBlueprintFiles(bpMeshHost, "debug_hydro_state_inter_cc_", istep[lev] + 1, "hdf5");
#endif
// indicate failure
return false;
}
}
Expand Down

0 comments on commit bf8d035

Please sign in to comment.