integrate.tests.test_integrate

Tests for numerical integration.

Module Contents

Classes

TestOdeint()
TestODEClass()
TestOde()
TestComplexOde()
TestSolout()
TestComplexSolout()
ODE() ODE problem
SimpleOscillator() r
ComplexExp() rThe equation :lm:`\dot u = i u`
Pi() rIntegrate 1/(t + 1j) from t=-10 to t=10
CoupledDecay() r
ODECheckParameterUse() Call an ode-class solver with several cases of parameter use.
TestDOPRI5CheckParameterUse()
TestDOP853CheckParameterUse()
TestVODECheckParameterUse()
TestZVODECheckParameterUse()
TestLSODACheckParameterUse()

Functions

f(t,x)
jac(t,x)
f1(t,x,omega)
jac1(t,x,omega)
f2(t,x,omega1,omega2)
jac2(t,x,omega1,omega2)
fv(t,x,omega)
jacv(t,x,omega)
test_odeint_trivial_time()
test_odeint_banded_jacobian()
test_odeint_errors()
test_odeint_bad_shapes()
class TestOdeint
_do_problem(problem)
test_odeint()
class TestODEClass
_do_problem(problem, integrator, method="adams")
class TestOde
test_vode()
test_zvode()
test_lsoda()
test_dopri5()
test_dop853()
test_concurrent_fail()
test_concurrent_ok()
class TestComplexOde
test_vode()
test_lsoda()
test_dopri5()
test_dop853()
class TestSolout
_run_solout_test(integrator)
test_solout()
_run_solout_after_initial_test(integrator)
test_solout_after_initial()
_run_solout_break_test(integrator)
test_solout_break()
class TestComplexSolout
_run_solout_test(integrator)
test_solout()
_run_solout_break_test(integrator)
test_solout_break()
class ODE

ODE problem

class SimpleOscillator

r Free vibration of a simple oscillator:

m \ddot{u} + k u = 0, u(0) = u_0 \dot{u}(0) \dot{u}_0
Solution::
u(t) = u_0*cos(sqrt(k/m)*t)+dot{u}_0*sin(sqrt(k/m)*t)/sqrt(k/m)
f(z, t)
verify(zs, t)
class ComplexExp

rThe equation :lm:`\dot u = i u`

f(z, t)
jac(z, t)
verify(zs, t)
class Pi

rIntegrate 1/(t + 1j) from t=-10 to t=10

f(z, t)
verify(zs, t)
class CoupledDecay

r 3 coupled decays suited for banded treatment (banded mode makes it necessary when N>>3)

f(z, t)
jac(z, t)
verify(zs, t)
f(t, x)
jac(t, x)
f1(t, x, omega)
jac1(t, x, omega)
f2(t, x, omega1, omega2)
jac2(t, x, omega1, omega2)
fv(t, x, omega)
jacv(t, x, omega)
class ODECheckParameterUse

Call an ode-class solver with several cases of parameter use.

_get_solver(f, jac)
_check_solver(solver)
test_no_params()
test_one_scalar_param()
test_two_scalar_params()
test_vector_param()
test_warns_on_failure()
class TestDOPRI5CheckParameterUse
class TestDOP853CheckParameterUse
class TestVODECheckParameterUse
class TestZVODECheckParameterUse
class TestLSODACheckParameterUse
test_odeint_trivial_time()
test_odeint_banded_jacobian()
test_odeint_errors()
test_odeint_bad_shapes()