Skip to content

Commit 18ac868

Browse files
author
Diego Vaca
committed
Remove RKCK (time_stepper == 4)
1 parent 16e51c9 commit 18ac868

File tree

16 files changed

+37
-527
lines changed

16 files changed

+37
-527
lines changed

src/common/m_checker_common.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ contains
6262
!! Called by s_check_inputs_common for simulation and post-processing
6363
subroutine s_check_inputs_time_stepping
6464
if (cfl_dt) then
65-
@:PROHIBIT((cfl_target < 0 .or. cfl_target > 1._wp) .and. .not. rkck_adap_dt)
65+
@:PROHIBIT(cfl_target < 0 .or. cfl_target > 1._wp)
6666
@:PROHIBIT(t_stop <= 0)
6767
@:PROHIBIT(t_save <= 0)
6868
@:PROHIBIT(t_save > t_stop)

src/common/m_constants.fpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -49,35 +49,6 @@ module m_constants
4949
integer, parameter :: mapCells = 3 !< Number of cells around the bubble where the smoothening function will have effect
5050
real(wp), parameter :: R_uni = 8314._wp ! Universal gas constant - J/kmol/K
5151

52-
! RKCK constants
53-
integer, parameter :: num_ts_rkck = 6 !< Number of time-stages in the RKCK stepper
54-
! RKCK 4th/5th time stepper coefficients based on Cash J. and Karp A. (1990)
55-
real(wp), parameter :: rkck_c1 = 0._wp, rkck_c2 = 0.2_wp, rkck_c3 = 0.3_wp, rkck_c4 = 0.6_wp, & ! c1 c2 c3 c4 c5 c6
56-
rkck_c5 = 1._wp, rkck_c6 = 0.875_wp
57-
real(wp), dimension(6), parameter :: rkck_coef1 = (/0.2_wp, 0._wp, 0._wp, 0._wp, 0._wp, 0._wp/) ! a21
58-
real(wp), dimension(6), parameter :: rkck_coef2 = (/3._wp/40._wp, 9._wp/40._wp, 0._wp, 0._wp, & ! a31 a32
59-
0._wp, 0._wp/)
60-
real(wp), dimension(6), parameter :: rkck_coef3 = (/0.3_wp, -0.9_wp, 1.2_wp, 0._wp, 0._wp, 0._wp/) ! a41 a42 a43
61-
real(wp), dimension(6), parameter :: rkck_coef4 = (/-11._wp/54._wp, 2.5_wp, -70._wp/27._wp, & ! a51 a52 a53 a54
62-
35._wp/27._wp, 0._wp, 0._wp/)
63-
real(wp), dimension(6), parameter :: rkck_coef5 = (/1631._wp/55296._wp, 175._wp/512._wp, & ! a61 a62 a63 a64 a65
64-
575._wp/13824._wp, 44275._wp/110592._wp, &
65-
253._wp/4096._wp, 0._wp/)
66-
real(wp), dimension(6), parameter :: rkck_coef6 = (/37._wp/378._wp, 0._wp, 250._wp/621._wp, & ! b1 b2 b3 b4 b5 b6
67-
125._wp/594._wp, 0._wp, 512._wp/1771._wp/)
68-
real(wp), dimension(6), parameter :: rkck_coefE = (/37._wp/378._wp - 2825._wp/27648._wp, 0._wp, & ! er1 er2 er3 er4 er5 er6 (4th/5th error)
69-
250._wp/621._wp - 18575._wp/48384._wp, &
70-
125._wp/594._wp - 13525._wp/55296._wp, &
71-
-277._wp/14336._wp, 512._wp/1771._wp - 0.25_wp/)
72-
! Adaptive rkck constants
73-
real(wp), parameter :: verysmall_dt = 1e-14_wp !< Very small dt, stop stepper
74-
real(wp), parameter :: SAFETY = 0.9_wp !< Next dt will be maximum 0.9*dt if truncation error is above tolerance.
75-
real(wp), parameter :: RNDDEC = 1e8_wp !< Round calculated dt (16th digit) to avoid the inclusion of random decimals
76-
real(wp), parameter :: PSHRNK = -0.25_wp !< Factor to reduce dt when truncation error above tolerance
77-
real(wp), parameter :: SHRNKDT = 0.5_wp !< Factor to reduce dt due to negative bubble radius
78-
real(wp), parameter :: ERRCON = 1.89e-4_wp !< Limit to slightly increase dt when truncation error is between ERRCON and 1
79-
real(wp), parameter :: PGROW = -0.2_wp !< Factor to increase dt when truncation error is between ERRCON and 1
80-
8152
! Relativity
8253
integer, parameter :: relativity_cons_to_prim_max_iter = 100
8354

src/post_process/m_global_parameters.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ module m_global_parameters
314314

315315
!> @name Lagrangian bubbles
316316
!> @{
317-
logical :: bubbles_lagrange, rkck_adap_dt
317+
logical :: bubbles_lagrange
318318
!> @}
319319

320320
real(wp) :: Bx0 !< Constant magnetic field in the x-direction (1D)
@@ -443,7 +443,6 @@ contains
443443

444444
! Lagrangian bubbles modeling
445445
bubbles_lagrange = .false.
446-
rkck_adap_dt = .false.
447446

448447
! IBM
449448
num_ibs = dflt_int

src/post_process/m_mpi_proxy.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ contains
170170
& 'file_per_process', 'relax', 'cf_wrt', &
171171
& 'adv_n', 'ib', 'cfl_adap_dt', 'cfl_const_dt', 'cfl_dt', &
172172
& 'surface_tension', 'hyperelasticity', 'bubbles_lagrange', &
173-
& 'rkck_adap_dt', 'output_partial_domain', 'relativity', &
174-
& 'cont_damage' ]
173+
& 'output_partial_domain', 'relativity', 'cont_damage' ]
175174
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
176175
#:endfor
177176

src/post_process/m_start_up.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ subroutine s_read_input_file
8383
polydisperse, poly_sigma, file_per_process, relax, &
8484
relax_model, cf_wrt, sigma, adv_n, ib, num_ibs, &
8585
cfl_adap_dt, cfl_const_dt, t_save, t_stop, n_start, &
86-
cfl_target, surface_tension, bubbles_lagrange, rkck_adap_dt, &
86+
cfl_target, surface_tension, bubbles_lagrange, &
8787
sim_data, hyperelasticity, Bx0, relativity, cont_damage
8888

8989
! Inquiring the status of the post_process.inp file
@@ -113,7 +113,7 @@ subroutine s_read_input_file
113113

114114
nGlobal = (m_glb + 1)*(n_glb + 1)*(p_glb + 1)
115115

116-
if (cfl_adap_dt .or. cfl_const_dt .or. rkck_adap_dt) cfl_dt = .true.
116+
if (cfl_adap_dt .or. cfl_const_dt) cfl_dt = .true.
117117

118118
else
119119
call s_mpi_abort('File post_process.inp is missing. Exiting.')

src/pre_process/m_global_parameters.fpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,6 @@ module m_global_parameters
261261
integer :: chemxb, chemxe
262262
!> @}
263263

264-
!> @ lagrangian solver parameters
265-
logical :: rkck_adap_dt
266-
!> @}
267-
268264
integer, allocatable, dimension(:, :, :) :: logic_grid
269265

270266
type(pres_field) :: pb
@@ -526,9 +522,6 @@ contains
526522
fluid_pp(i)%G = 0._wp
527523
end do
528524

529-
! Lagrangian solver
530-
rkck_adap_dt = .false.
531-
532525
Bx0 = dflt_real
533526

534527
end subroutine s_assign_default_values_to_user_inputs

src/pre_process/m_start_up.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ contains
143143
palpha_eps, ptgalpha_eps, ib, num_ibs, patch_ib, &
144144
sigma, adv_n, cfl_adap_dt, cfl_const_dt, n_start, &
145145
n_start_old, surface_tension, hyperelasticity, pre_stress, &
146-
rkck_adap_dt, elliptic_smoothing, elliptic_smoothing_iters, &
147-
viscous, bubbles_lagrange, Bx0, relativity, cont_damage
146+
elliptic_smoothing, elliptic_smoothing_iters, bubbles_lagrange, &
147+
viscous, Bx0, relativity, cont_damage
148148

149149
! Inquiring the status of the pre_process.inp file
150150
file_loc = 'pre_process.inp'
@@ -171,7 +171,7 @@ contains
171171

172172
nGlobal = (m_glb + 1)*(n_glb + 1)*(p_glb + 1)
173173

174-
if (cfl_adap_dt .or. cfl_const_dt .or. rkck_adap_dt) cfl_dt = .true.
174+
if (cfl_adap_dt .or. cfl_const_dt) cfl_dt = .true.
175175

176176
else
177177
call s_mpi_abort('File pre_process.inp is missing. Exiting.')

src/simulation/m_acoustic_src.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ contains
158158
integer, parameter :: mass_label = 1, mom_label = 2
159159

160160
sim_time = t_step*dt
161-
if (time_stepper == 4) sim_time = rkck_time_tmp ! Probably create a time_stepper == 5 for the rkck stepper
162161

163162
!$acc parallel loop collapse(3) gang vector default(present)
164163
do l = 0, p

0 commit comments

Comments
 (0)