Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Added overflow check
  • Loading branch information
daminton committed May 27, 2021
1 parent c3f51cb commit 0b50b65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/util_solve_linear_system.f90
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function solve_wbs(u) result(x) ! solve with backward substitution
n = size(u, 1)
if (allocated(x)) deallocate(x)
if (.not.allocated(x)) allocate(x(n))
if (any(abs(u) < tiny(1._DP))) then
if (any(abs(u) < tiny(1._DP)) .or. any(abs(u) > huge(1._DP))) then
x(:) = 0._DP
return
end if
Expand Down

0 comments on commit 0b50b65

Please sign in to comment.