Skip to content

Commit

Permalink
makie_post_processing: catch errors when plotting steady state residuals
Browse files Browse the repository at this point in the history
Allows creation of other plots to continue if an error occurs.
  • Loading branch information
johnomotani committed Feb 22, 2024
1 parent 4122fe2 commit 51a4176
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3387,11 +3387,15 @@ end
# Utility method to avoid code duplication when saving the calculate_steady_state_residual
# plots
function _save_residual_plots(fig_axes, plot_prefix)
for (key, fa) fig_axes
for (ax, lp) zip(fa[2], fa[3])
Legend(lp, ax)
try
for (key, fa) fig_axes
for (ax, lp) zip(fa[2], fa[3])
Legend(lp, ax)
end
save(plot_prefix * replace(key, " "=>"_") * ".pdf", fa[1])
end
save(plot_prefix * replace(key, " "=>"_") * ".pdf", fa[1])
catch e
println("Error in _save_residual_plots(). Error was ", e)
end
end

Expand Down

0 comments on commit 51a4176

Please sign in to comment.