Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(api): Non convergence is no reason to crash the API (#1141)
* Non convergence is no reason to crash the API

* fprettify
  • Loading branch information
mjr-deltares committed Jan 27, 2023
1 parent 3427970 commit 1d39137
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions srcbmi/mf6xmi.f90
Expand Up @@ -296,14 +296,14 @@ function xmi_finalize_solve(subcomponent_idx) result(bmi_status) &
call ns%finalizeSolve(iterationCounter, hasConverged, 0)

! check convergence on solution
if (hasConverged == 1) then
bmi_status = BMI_SUCCESS
else
if (.not. hasConverged == 1) then
write (bmi_last_error, fmt_fail_cvg_sol) subcomponent_idx
call report_bmi_error(bmi_last_error)
bmi_status = BMI_FAILURE
end if

! non-convergence is no reason to crash the API:
bmi_status = BMI_SUCCESS

! clear this for safety
deallocate (iterationCounter)

Expand Down

0 comments on commit 1d39137

Please sign in to comment.