Skip to content

Commit

Permalink
fix remaining flake8, pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed May 21, 2024
1 parent b5f253e commit 6523afe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion examples/advection/var-velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def rhs(t, u):

step += 1


# }}}


Expand Down
8 changes: 8 additions & 0 deletions test/test_grudge.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,8 @@ def rhs(t, w):

logger.info("dt %.5e nsteps %5d", dt, nsteps)

esc = None

step = 0
for event in dt_stepper.run(t_end=final_t):
if isinstance(event, dt_stepper.StateComputed):
Expand Down Expand Up @@ -1045,6 +1047,8 @@ def test_norm_real(actx_factory, p):
ref_norm = (1/3)**0.5
elif p == np.inf:
ref_norm = 1
else:
raise AssertionError("unsupported p")

logger.info("norm: %.5e %.5e", norm, ref_norm)
assert abs(norm-ref_norm) / abs(ref_norm) < 1e-13
Expand All @@ -1066,6 +1070,8 @@ def test_norm_complex(actx_factory, p):
ref_norm = (2/3)**0.5
elif p == np.inf:
ref_norm = 2**0.5
else:
raise AssertionError("unsupported p")

logger.info("norm: %.5e %.5e", norm, ref_norm)
assert abs(norm-ref_norm) / abs(ref_norm) < 1e-13
Expand All @@ -1088,6 +1094,8 @@ def test_norm_obj_array(actx_factory, p):
ref_norm = (dim/3)**0.5
elif p == np.inf:
ref_norm = 1
else:
raise AssertionError("unsupported p")

logger.info("norm: %.5e %.5e", norm, ref_norm)
assert abs(norm-ref_norm) / abs(ref_norm) < 1e-14
Expand Down

0 comments on commit 6523afe

Please sign in to comment.