Skip to content

Commit

Permalink
Fail water balance check on either tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Oct 1, 2024
1 parent d538627 commit 0089275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/callback.jl
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ function check_water_balance_error(
mean_flow_rate = (total_in + total_out) / 2
relative_error = iszero(mean_flow_rate) ? 0.0 : balance_error / mean_flow_rate

if abs(balance_error) > water_balance_abstol &&
if abs(balance_error) > water_balance_abstol ||
abs(relative_error) > water_balance_reltol
errors = true
@error "Too large water balance error" id balance_error relative_error
Expand Down

0 comments on commit 0089275

Please sign in to comment.