File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,9 @@ def rhs(t, w):
224224 if comm .rank == 0 :
225225 logger .info ("dt = %g" , dt )
226226
227+ import time
228+ start = time .time ()
229+
227230 t = 0
228231 t_final = 3
229232 istep = 0
@@ -236,6 +239,7 @@ def rhs(t, w):
236239 l2norm = actx .to_numpy (op .norm (dcoll , fields .u , 2 ))
237240
238241 if istep % 10 == 0 :
242+ stop = time .time ()
239243 linfnorm = actx .to_numpy (op .norm (dcoll , fields .u , np .inf ))
240244 nodalmax = actx .to_numpy (op .nodal_max (dcoll , "vol" , fields .u ))
241245 nodalmin = actx .to_numpy (op .nodal_min (dcoll , "vol" , fields .u ))
@@ -244,7 +248,8 @@ def rhs(t, w):
244248 f"L2: { l2norm } "
245249 f"Linf: { linfnorm } "
246250 f"sol max: { nodalmax } "
247- f"sol min: { nodalmin } " )
251+ f"sol min: { nodalmin } "
252+ f"wall: { stop - start } " )
248253 if visualize :
249254 vis .write_parallel_vtk_file (
250255 comm ,
@@ -254,6 +259,7 @@ def rhs(t, w):
254259 ("v" , fields .v ),
255260 ]
256261 )
262+ start = stop
257263
258264 t += dt
259265 istep += 1
You can’t perform that action at this time.
0 commit comments