src/gray_tables.f90: avoid floating point exception

Due to Fortran non-shortcircuiting expressions, if info /= 0 and
psi_n = NaN or is undefined, it will still raise an exception.
This commit is contained in:
Michele Guerini Rocco 2024-11-04 10:53:45 +01:00
parent 72eb224568
commit 2368a0ba33
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -410,7 +410,8 @@ contains
psi_n = sol(1)
! Handle spurious or no solutions
if (info /= 1 .or. psi_n < 0 .or. psi_n > 1) cycle
if (info /= 1) cycle
if (psi_n < 0 .or. psi_n > 1) cycle
end block
! Compute and print the ψ_n(R,z) = ψ_n contour