def ex2(): dx = 0.05 cfl = 1.1 return upwind_p(u0, lambda u: u*u, -0.5, 1., 0., 0.8, dx, cfl * dx)
def ex1(): dx = 0.025 cfl = 0.5 return upwind_p(u0, lambda u: -u, -0.5, 1., 0., 0.4, dx, cfl * dx)