Skip to content

Commit

Permalink
fix check in inversion routine
Browse files Browse the repository at this point in the history
  • Loading branch information
mewesv committed Jul 13, 2023
1 parent 8d07bb3 commit 5a60c40
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Distributions/EOSSource/wlEOSInversionModule.F90
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ SUBROUTINE ComputeTemperatureWith_DXY_Guess &

f_b = X - X_b

IF ( f_a * f_b < 0.0_dp ) THEN
IF ( f_a * f_b <= 0.0_dp ) THEN
T = InverseLogInterp( T_a, T_b, X_a, X_b, X, OS )
RETURN
END IF
Expand All @@ -363,7 +363,7 @@ SUBROUTINE ComputeTemperatureWith_DXY_Guess &

f_b = X - X_b

IF ( f_a * f_b < 0.0_dp ) THEN
IF ( f_a * f_b <= 0.0_dp ) THEN

i_c = MIN( MAX( i_a + 1, iT ), i_b - 1 )
DO WHILE ( i_b > i_a + 1 )
Expand All @@ -376,7 +376,7 @@ SUBROUTINE ComputeTemperatureWith_DXY_Guess &

f_c = X - X_c

IF ( f_a * f_c < 0.0_dp ) THEN
IF ( f_a * f_c <= 0.0_dp ) THEN
i_b = i_c
T_b = T_c
X_b = X_c
Expand Down Expand Up @@ -412,7 +412,7 @@ SUBROUTINE ComputeTemperatureWith_DXY_Guess &

d_c = ABS( i - i_c )

IF ( f_c * f_b < 0.0_dp .AND. d_c < d_i ) THEN
IF ( f_c * f_b <= 0.0_dp .AND. d_c < d_i ) THEN
d_i = d_c
i_a = i - 1
T_a = T_c
Expand Down Expand Up @@ -503,7 +503,7 @@ SUBROUTINE ComputeTemperatureWith_DXY_NoGuess &

f_b = X - X_b

IF ( f_a * f_b < 0.0_dp ) THEN
IF ( f_a * f_b <= 0.0_dp ) THEN

DO WHILE ( i_b > i_a + 1 )

Expand All @@ -516,7 +516,7 @@ SUBROUTINE ComputeTemperatureWith_DXY_NoGuess &

f_c = X - X_c

IF ( f_a * f_c < 0.0_dp ) THEN
IF ( f_a * f_c <= 0.0_dp ) THEN
i_b = i_c
T_b = T_c
X_b = X_c
Expand Down Expand Up @@ -544,7 +544,7 @@ SUBROUTINE ComputeTemperatureWith_DXY_NoGuess &
f_a = X - X_i
f_b = X - X_b

IF ( f_a * f_b < 0.0_dp ) THEN
IF ( f_a * f_b <= 0.0_dp ) THEN
i_a = i
T_a = T_i
X_a = X_i
Expand All @@ -560,7 +560,7 @@ SUBROUTINE ComputeTemperatureWith_DXY_NoGuess &
f_a = X - X_a
f_b = X - X_b

IF ( f_a * f_b >= 0.0_dp ) Error = 13
IF ( f_a * f_b > 0.0_dp ) Error = 13

END IF

Expand Down

0 comments on commit 5a60c40

Please sign in to comment.