Skip to content

Commit 355e0c1

Browse files
committed
Print writer's actual timestep in plot
1 parent 7a6d273 commit 355e0c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tutorial/heat2d/python/heat_plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ def Plot2D(args, fr, data, fullshape, step, fontsize, displaysec):
8282
# Read through the steps, one at a time
8383
step = 0
8484
while (not fr.eof()):
85+
inpstep = fr.currentstep()
8586
data = fr.read(args.varname, start, size, endl=True)
8687

8788
# Print a couple simple diagnostics
8889
avg = np.average(data)
8990
std = np.std(data)
90-
inpstep = fr.currentstep()
9191
print("step:{0}, rank: {1}, avg: {2:.3f}, std: {3:.3f}".format(inpstep, mpi.rank['world'], avg, std))
92-
Plot2D(args, fr, data, fullshape, step, fontsize, displaysec)
92+
Plot2D(args, fr, data, fullshape, inpstep, fontsize, displaysec)
9393

9494
step += 1
9595

0 commit comments

Comments
 (0)