Skip to content

Commit 922d543

Browse files
arciyer123Krishnan Iyer
authored andcommitted
Replace instances of 0d0 and d0 with wp
1 parent bc6fec9 commit 922d543

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2332
-2332
lines changed

src/common/m_checker_common.fpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ contains
6161
!! Called by s_check_inputs_common for simulation and post-processing
6262
subroutine s_check_inputs_time_stepping
6363
if (cfl_dt) then
64-
@:PROHIBIT(cfl_target < 0 .or. cfl_target > 1d0)
64+
@:PROHIBIT(cfl_target < 0 .or. cfl_target > 1._wp)
6565
@:PROHIBIT(t_stop <= 0)
6666
@:PROHIBIT(t_save <= 0)
6767
@:PROHIBIT(t_save > t_stop)
@@ -144,10 +144,10 @@ contains
144144
@:PROHIBIT(relax .and. model_eqns /= 3, "phase change requires model_eqns = 3")
145145
@:PROHIBIT(relax .and. relax_model < 0, "relax_model must be in between 0 and 6")
146146
@:PROHIBIT(relax .and. relax_model > 6, "relax_model must be in between 0 and 6")
147-
@:PROHIBIT(relax .and. palpha_eps <= 0d0, "palpha_eps must be positive")
148-
@:PROHIBIT(relax .and. palpha_eps >= 1d0, "palpha_eps must be less than 1")
149-
@:PROHIBIT(relax .and. ptgalpha_eps <= 0d0, "ptgalpha_eps must be positive")
150-
@:PROHIBIT(relax .and. ptgalpha_eps >= 1d0, "ptgalpha_eps must be less than 1")
147+
@:PROHIBIT(relax .and. palpha_eps <= 0._wp, "palpha_eps must be positive")
148+
@:PROHIBIT(relax .and. palpha_eps >= 1._wp, "palpha_eps must be less than 1")
149+
@:PROHIBIT(relax .and. ptgalpha_eps <= 0._wp, "ptgalpha_eps must be positive")
150+
@:PROHIBIT(relax .and. ptgalpha_eps >= 1._wp, "ptgalpha_eps must be less than 1")
151151
@:PROHIBIT((.not. relax) .and. &
152152
((relax_model /= dflt_int) .or. (.not. f_is_default(palpha_eps)) .or. (.not. f_is_default(ptgalpha_eps))), &
153153
"relax is not set as true, but other phase change parameters have been modified. " // &
@@ -262,35 +262,35 @@ contains
262262

263263
do i = 1, num_fluids
264264
call s_int_to_str(i, iStr)
265-
@:PROHIBIT(.not. f_is_default(fluid_pp(i)%gamma) .and. fluid_pp(i)%gamma <= 0d0, &
265+
@:PROHIBIT(.not. f_is_default(fluid_pp(i)%gamma) .and. fluid_pp(i)%gamma <= 0._wp, &
266266
"fluid_pp("//trim(iStr)//")%gamma must be positive")
267267

268268
@:PROHIBIT(model_eqns == 1 .and. (.not. f_is_default(fluid_pp(i)%gamma)), &
269269
"model_eqns = 1 does not support fluid_pp("//trim(iStr)//")%gamma")
270270

271-
@:PROHIBIT((i <= num_fluids + bub_fac .and. fluid_pp(i)%gamma <= 0d0) .or. &
271+
@:PROHIBIT((i <= num_fluids + bub_fac .and. fluid_pp(i)%gamma <= 0._wp) .or. &
272272
(i > num_fluids + bub_fac .and. (.not. f_is_default(fluid_pp(i)%gamma))), &
273273
"for fluid_pp("//trim(iStr)//")%gamma")
274274

275-
@:PROHIBIT(.not. f_is_default(fluid_pp(i)%pi_inf) .and. fluid_pp(i)%pi_inf < 0d0, &
275+
@:PROHIBIT(.not. f_is_default(fluid_pp(i)%pi_inf) .and. fluid_pp(i)%pi_inf < 0._wp, &
276276
"fluid_pp("//trim(iStr)//")%pi_inf must be non-negative")
277277

278278
@:PROHIBIT(model_eqns == 1 .and. (.not. f_is_default(fluid_pp(i)%pi_inf)), &
279279
"model_eqns = 1 does not support fluid_pp("//trim(iStr)//")%pi_inf")
280280

281-
@:PROHIBIT((i <= num_fluids + bub_fac .and. fluid_pp(i)%pi_inf < 0d0) .or. &
281+
@:PROHIBIT((i <= num_fluids + bub_fac .and. fluid_pp(i)%pi_inf < 0._wp) .or. &
282282
(i > num_fluids + bub_fac .and. (.not. f_is_default(fluid_pp(i)%pi_inf))), &
283283
"for fluid_pp("//trim(iStr)//")%pi_inf")
284284

285-
@:PROHIBIT(fluid_pp(i)%cv < 0d0, &
285+
@:PROHIBIT(fluid_pp(i)%cv < 0._wp, &
286286
"fluid_pp("//trim(iStr)//")%cv must be positive")
287287
end do
288288
end subroutine s_check_inputs_stiffened_eos
289289

290290
!> Checks constraints on the surface tension parameters.
291291
!! Called by s_check_inputs_common for all three stages
292292
subroutine s_check_inputs_surface_tension
293-
@:PROHIBIT(.not. f_is_default(sigma) .and. sigma < 0d0, &
293+
@:PROHIBIT(.not. f_is_default(sigma) .and. sigma < 0._wp, &
294294
"sigma must be greater than or equal to zero")
295295

296296
@:PROHIBIT(.not. f_is_default(sigma) .and. model_eqns /= 3, &
@@ -301,9 +301,9 @@ contains
301301
!! Called by s_check_inputs_common for all three stages
302302
subroutine s_check_inputs_moving_bc
303303
#:for X, VB2, VB3 in [('x', 'vb2', 'vb3'), ('y', 'vb3', 'vb1'), ('z', 'vb1', 'vb2')]
304-
if (any((/bc_${X}$%vb1, bc_${X}$%vb2, bc_${X}$%vb3/) /= 0d0)) then
304+
if (any((/bc_${X}$%vb1, bc_${X}$%vb2, bc_${X}$%vb3/) /= 0._wp)) then
305305
if (bc_${X}$%beg == -15) then
306-
if (any((/bc_${X}$%${VB2}$, bc_${X}$%${VB3}$/) /= 0d0)) then
306+
if (any((/bc_${X}$%${VB2}$, bc_${X}$%${VB3}$/) /= 0._wp)) then
307307
call s_mpi_abort("bc_${X}$%beg must be -15 if "// &
308308
"bc_${X}$%${VB2}$ or bc_${X}$%${VB3}$ "// &
309309
"is set. Exiting ...")
@@ -316,9 +316,9 @@ contains
316316
#:endfor
317317

318318
#:for X, VE2, VE3 in [('x', 've2', 've3'), ('y', 've3', 've1'), ('z', 've1', 've2')]
319-
if (any((/bc_${X}$%ve1, bc_${X}$%ve2, bc_${X}$%ve3/) /= 0d0)) then
319+
if (any((/bc_${X}$%ve1, bc_${X}$%ve2, bc_${X}$%ve3/) /= 0._wp)) then
320320
if (bc_${X}$%end == -15) then
321-
if (any((/bc_${X}$%${VE2}$, bc_${X}$%${VE3}$/) /= 0d0)) then
321+
if (any((/bc_${X}$%${VE2}$, bc_${X}$%${VE3}$/) /= 0._wp)) then
322322
call s_mpi_abort("bc_${X}$%end must be -15 if "// &
323323
"bc_${X}$%${VE2}$ or bc_${X}$%${VE3}$ "// &
324324
"is set. Exiting ...")

src/common/m_constants.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module m_constants
1111
real(wp), parameter :: dflt_real = -1d6 !< Default real value
1212
real(wp), parameter :: sgm_eps = 1d-16 !< Segmentation tolerance
1313
real(wp), parameter :: small_alf = 1d-11 !< Small alf tolerance
14-
real(wp), parameter :: pi = 3.141592653589793d0 !< Pi
14+
real(wp), parameter :: pi = 3.141592653589793_wp !< Pi
1515
real(wp), parameter :: verysmall = 1.d-12 !< Very small number
1616

1717
integer, parameter :: num_stcls_min = 5 !< Minimum # of stencils
@@ -25,7 +25,7 @@ module m_constants
2525
integer, parameter :: pathlen_max = 400
2626
integer, parameter :: nnode = 4 !< Number of QBMM nodes
2727
real(wp), parameter :: capillary_cutoff = 1e-6 !< color function gradient magnitude at which to apply the surface tension fluxes
28-
real(wp), parameter :: acoustic_spatial_support_width = 2.5d0 !< Spatial support width of acoustic source, used in s_source_spatial
29-
real(wp), parameter :: dflt_vcfl_dt = 100d0 !< value of vcfl_dt when viscosity is off for computing adaptive timestep size
28+
real(wp), parameter :: acoustic_spatial_support_width = 2.5_wp !< Spatial support width of acoustic source, used in s_source_spatial
29+
real(wp), parameter :: dflt_vcfl_dt = 100._wp !< value of vcfl_dt when viscosity is off for computing adaptive timestep size
3030

3131
end module m_constants

0 commit comments

Comments
 (0)