Skip to content

Commit 44bce70

Browse files
authored
Fix bug in adaptive time-stepping (#667)
1 parent 354dc47 commit 44bce70

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/simulation/m_start_up.fpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ module m_start_up
113113

114114
procedure(s_read_abstract_data_files), pointer :: s_read_data_files => null()
115115

116+
real(kind(0d0)) :: dt_init
117+
116118
contains
117119

118120
!> The purpose of this procedure is to first verify that an
@@ -1097,8 +1099,6 @@ contains
10971099
real(kind(0d0)), intent(inout) :: start, finish
10981100
integer, intent(inout) :: nt
10991101

1100-
real(kind(0d0)) :: dt_init
1101-
11021102
integer :: i, j, k, l
11031103

11041104
if (cfl_dt) then
@@ -1108,7 +1108,10 @@ contains
11081108

11091109
if (t_step == 0) dt_init = dt
11101110

1111-
if (dt < 1d-3*dt_init .and. cfl_adap_dt) call s_mpi_abort("Delta t has become too small")
1111+
if (dt < 1d-3*dt_init .and. cfl_adap_dt .and. proc_rank == 0) then
1112+
print*, "Delta t = ", dt
1113+
call s_mpi_abort("Delta t has become too small")
1114+
end if
11121115
end if
11131116

11141117
if (cfl_dt) then

0 commit comments

Comments
 (0)