Skip to content

Commit

Permalink
Implement show_element_boundaries in plot/animate_f_unnorm_vs_vpa()
Browse files Browse the repository at this point in the history
  • Loading branch information
johnomotani committed Sep 20, 2024
1 parent be90865 commit 124cc56
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3942,6 +3942,13 @@ function plot_f_unnorm_vs_vpa(run_info; f_over_vpa2=false, input=nothing, neutra

l = plot_1d(dzdt, f_unnorm; ax=ax, label=run_info.run_name, kwargs...)

if input.show_element_boundaries && fig !== nothing
element_boundary_inds =
[i for i 1:run_info.vpa.ngrid-1:run_info.vpa.n_global]
element_boundary_positions = dzdt[element_boundary_inds]
vlines!(ax, element_boundary_positions, color=:black, alpha=0.3)
end

if outfile !== nothing
if fig === nothing
error("When ax is passed, fig must also be passed to save the plot using "
Expand Down

0 comments on commit 124cc56

Please sign in to comment.