def test_ssp3(): # test with 4, 9, and 16 stages ssp3 = lserk.SSP3() odes.sample_odes(ssp3, 3) ssp3 = lserk.SSP3(3) odes.sample_odes(ssp3, 3) ssp3 = lserk.SSP3(4) odes.sample_odes(ssp3, 3)
def test_ssp2(): # test with 2, 3, and 4 stages ssp2 = lserk.SSP2() odes.sample_odes(ssp2, 2) ssp2 = lserk.SSP2(3) odes.sample_odes(ssp2, 2) ssp2 = lserk.SSP2(4) odes.sample_odes(ssp2, 2)
def test_irk2(): irk2 = irk.IRK2() odes.sample_odes(irk2, 2)
def test_backward_euler(): backward_euler = irk.BackwardEuler() odes.sample_odes(backward_euler, 1)
def test_crank_nicolson(): crank_nicolson = irk.CrankNicolson() odes.sample_odes(crank_nicolson, 2)
def test_imex3(): imex3 = imexrk.IMEX3() odes.sample_odes(imex3, 3)
def test_imex1(): imex1 = imexrk.IMEX1() odes.sample_odes(imex1, 1)
def test_imex2(): imex2 = imexrk.IMEX2() odes.sample_odes(imex2, 2)
def test_tvd_rk3(): tvd_rk3 = explicit_runge_kutta.TVDRK3() odes.sample_odes(tvd_rk3, 3)
def test_forward_euler(): forward_euler = explicit_runge_kutta.ForwardEuler() odes.sample_odes(forward_euler, 1)
def test_tvd_rk2(): tvd_rk2 = explicit_runge_kutta.TVDRK2() odes.sample_odes(tvd_rk2, 2)
def test_ssp_rk3(): ssp_rk3 = explicit_runge_kutta.SSPRK3() odes.sample_odes(ssp_rk3, 3)
def test_classic_rk4(): rk4 = explicit_runge_kutta.ClassicRK4() odes.sample_odes(rk4, 4)
def test_ssp4(): ssp4 = lserk.SSP4() odes.sample_odes(ssp4, 4)