Skip to content

Commit

Permalink
Make error norm calculation optional
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Nov 23, 2023
1 parent 004bc84 commit 424772c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/callbacks_step/analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,14 @@ function (analysis_callback::AnalysisCallback)(io, du, u, u_ode, t, semi)
println()
end

# Calculate L2/Linf errors, which are also returned
l2_error, linf_error = calc_error_norms(u_ode, t, analyzer, semi, cache_analysis)
if :l2_error in analysis_errors || :linf_error in analysis_errors
# Calculate L2/Linf errors, which are also returned
l2_error, linf_error = calc_error_norms(u_ode, t, analyzer, semi,
cache_analysis)
else # Need something to be returned
l2_error = nothing
linf_error = nothing
end

if mpi_isroot()
# L2 error
Expand Down

0 comments on commit 424772c

Please sign in to comment.