Skip to content

Commit

Permalink
test time_update for the third window.
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdalaziz-Hamdan committed Jul 17, 2023
1 parent 71795d9 commit f2565bc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/allatonce/test_allatonceform.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def form_mass(u, v):
assert (float(aaoform.t0) == 0)
for i in range(aaofunc.ntimesteps):
assert (times.dglobal[i] == ((i + 1)*dt))

# Test time seried of the second window with the optional argument t=0.
aaoform.time_update(t=0)

for i in range(aaofunc.nlocal_timesteps):
Expand All @@ -293,3 +293,14 @@ def form_mass(u, v):
assert (float(aaoform.t0) == .04)
for i in range(aaofunc.ntimesteps):
assert (times.dglobal[i] == ((4 + i + 1)*dt))

# Test the time series of the third window with the optional argument t=None.
aaoform.time_update()

for i in range(aaofunc.nlocal_timesteps):
times.dlocal[i] = aaoform.time[i]
times.synchronise()

assert (float(aaoform.t0) == .08)
for i in range(aaofunc.ntimesteps):
assert (times.dglobal[i] == ((8 + i + 1)*dt))

0 comments on commit f2565bc

Please sign in to comment.