Skip to content

Commit

Permalink
example: ensure dt is a float
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Aug 5, 2024
1 parent 55cbff1 commit ca4270b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/advection/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def rhs(t, u):
logger.info("nsteps: %d", nsteps)

from grudge.shortcuts import set_up_rk4
dt_stepper = set_up_rk4("u", dt, u0, rhs)
dt_stepper = set_up_rk4("u", float(dt), u0, rhs)
plot = Plotter(actx, dcoll, order, visualize=visualize)

norm_u = actx.to_numpy(op.norm(dcoll, u0, 2))
Expand Down
2 changes: 1 addition & 1 deletion examples/advection/var-velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def rhs(t, u):
# {{{ time stepping

from grudge.shortcuts import set_up_rk4
dt_stepper = set_up_rk4("u", dt, u, rhs)
dt_stepper = set_up_rk4("u", float(dt), u, rhs)
plot = Plotter(actx, dcoll, order, visualize=visualize,
ylim=[-0.1, 1.1])

Expand Down
2 changes: 1 addition & 1 deletion examples/advection/weak.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def rhs(t, u):
# {{{ time stepping

from grudge.shortcuts import set_up_rk4
dt_stepper = set_up_rk4("u", dt, u, rhs)
dt_stepper = set_up_rk4("u", float(dt), u, rhs)
plot = Plotter(actx, dcoll, order, visualize=visualize,
ylim=[-1.1, 1.1])

Expand Down

0 comments on commit ca4270b

Please sign in to comment.