Skip to content

Commit 542a917

Browse files
committed
remove magic number
1 parent 02c5a3f commit 542a917

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/common/m_constants.fpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ module m_constants
7878
real(wp), parameter :: ERRCON = 1.89e-4_wp !< Limit to slightly increase dt when truncation error is between ERRCON and 1
7979
real(wp), parameter :: PGROW = -0.2_wp !< Factor to increase dt when truncation error is between ERRCON and 1
8080

81+
! Relativity
82+
integer, parameter :: relativity_cons_to_prim_max_iter = 100
83+
8184
! System constants
8285
integer, parameter :: CASE_FILE_ERROR_CODE = 22
8386

src/common/m_variables_conversion.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ contains
959959
! Newton-Raphson
960960
W = E + D
961961
!$acc loop seq
962-
do iter = 1, 100
962+
do iter = 1, relativity_cons_to_prim_max_iter
963963
Ga = (W + B2)*W/sqrt((W + B2)**2*W**2 - (m2*W**2 + S**2*(2*W + B2)))
964964
pres = (W - D*Ga)/((gamma_K + 1)*Ga**2) ! Thermal pressure from EOS
965965
f = W - pres + (1 - 1/(2*Ga**2))*B2 - S**2/(2*W**2) - E - D

0 commit comments

Comments
 (0)