Skip to content

Commit a182b25

Browse files
sbryngelsonclaude
andcommitted
Fix acoustic source and body force timing
Move mytime update to after the TVD RK call so that sub-step source terms see the correct time. Also change acoustic source to use mytime instead of t_step*dt, which was inconsistent with adaptive time stepping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e36eb61 commit a182b25

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/simulation/m_acoustic_src.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ contains
165165

166166
integer, parameter :: mass_label = 1, mom_label = 2
167167

168-
sim_time = t_step*dt
168+
sim_time = mytime
169169

170170
$:GPU_PARALLEL_LOOP(private='[j,k,l]', collapse=3)
171171
do l = 0, p

src/simulation/m_start_up.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,13 +845,13 @@ contains
845845
end do
846846
end if
847847

848-
mytime = mytime + dt
849-
850848
! Total-variation-diminishing (TVD) Runge-Kutta (RK) time-steppers
851849
if (any(time_stepper == (/1, 2, 3/))) then
852850
call s_tvd_rk(t_step, time_avg, time_stepper)
853851
end if
854852

853+
mytime = mytime + dt
854+
855855
if (relax) call s_infinite_relaxation_k(q_cons_ts(1)%vf)
856856

857857
! Time-stepping loop controls

0 commit comments

Comments
 (0)