Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in adaptive time-stepping #667

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/simulation/m_start_up.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@

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

real(kind(0d0)) :: dt_init

contains

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

real(kind(0d0)) :: dt_init

integer :: i, j, k, l

if (cfl_dt) then
Expand All @@ -1108,7 +1108,10 @@

if (t_step == 0) dt_init = dt

if (dt < 1d-3*dt_init .and. cfl_adap_dt) call s_mpi_abort("Delta t has become too small")
if (dt < 1d-3*dt_init .and. cfl_adap_dt .and. proc_rank == 0) then
print*, "Delta t = ", dt
call s_mpi_abort("Delta t has become too small")

Check warning on line 1113 in src/simulation/m_start_up.fpp

View check run for this annotation

Codecov / codecov/patch

src/simulation/m_start_up.fpp#L1112-L1113

Added lines #L1112 - L1113 were not covered by tests
end if
end if

if (cfl_dt) then
Expand Down
Loading