OrdinaryDiffEqLinear
Methods for semi-linear differential equations.
Installation
To be able to access the solvers in OrdinaryDiffEqLinear, you must first install them use the Julia package manager:
using Pkg
Pkg.add("OrdinaryDiffEqLinear")This will only install the solvers listed at the bottom of this page. If you want to explore other solvers for your problem, you will need to install some of the other libraries listed in the navigation bar on the left.
Example usage
using OrdinaryDiffEqLinear, SciMLOperators
function update_func(A, u, p, t)
A[1, 1] = 0
A[2, 1] = sin(u[1])
A[1, 2] = -1
A[2, 2] = 0
end
A0 = ones(2, 2)
A = MatrixOperator(A0, update_func = update_func)
u0 = ones(2)
tspan = (0.0, 30.0)
prob = ODEProblem(A, u0, tspan)
sol = solve(prob, LieRK4(), dt = 1 / 4)Full list of solvers
Time and State-Independent Solvers
OrdinaryDiffEqLinear.LinearExponential — TypeLinearExponential(; krylov = :off,
m = 10,
iop = 0)Semilinear ODE solver Exact solution formula for linear, time-independent problems.
Keyword Arguments
krylov::off: cache the operator beforehand. Requires Matrix(A) method defined for the operator A.:simple: uses simple Krylov approximations with fixed subspace size m.:adaptive: uses adaptive Krylov approximations with internal timestepping.
m: Controls the size of Krylov subspace ifkrylov=:simple, and the initial subspace size ifkrylov=:adaptive.iop: If not zero, determines the length of the incomplete orthogonalization procedure Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@book{strogatz2018nonlinear, title={Nonlinear dynamics and chaos: with applications to physics, biology, chemistry, and engineering}, author={Strogatz, Steven H}, year={2018}, publisher={CRC press}}
Time-Dependent and State-Independent Solvers
OrdinaryDiffEqLinear.MagnusMidpoint — TypeMagnusMidpoint(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Second order Magnus Midpoint method.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
https://joshuagoings.com/2017/06/15/magnus/
OrdinaryDiffEqLinear.MagnusLeapfrog — TypeMagnusLeapfrog(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Second order Magnus Leapfrog method.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
https://joshuagoings.com/2017/06/15/magnus/
OrdinaryDiffEqLinear.MagnusGauss4 — TypeMagnusGauss4(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Fourth order Magnus method approximated using a two stage Gauss quadrature.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{hairer2011solving, title={Solving differential equations on manifolds}, author={Hairer, Ernst}, journal={Lecture notes}, year={2011} }
OrdinaryDiffEqLinear.MagnusNC6 — TypeMagnusNC6(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Sixth order Magnus method approximated using Newton-Cotes quadrature.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{blanes2000improved, title={Improved high order integrators based on the Magnus expansion}, author={Blanes, Sergio and Casas, Fernando and Ros, Javier}, journal={BIT Numerical Mathematics}, volume={40}, number={3}, pages={434–450}, year={2000}, publisher={Springer} }
OrdinaryDiffEqLinear.MagnusGL6 — TypeMagnusGL6(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Sixth order Magnus method approximated using Gauss-Legendre quadrature.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{blanes2000improved, title={Improved high order integrators based on the Magnus expansion}, author={Blanes, Sergio and Casas, Fernando and Ros, Javier}, journal={BIT Numerical Mathematics}, volume={40}, number={3}, pages={434–450}, year={2000}, publisher={Springer} }
OrdinaryDiffEqLinear.MagnusGL8 — TypeMagnusGL8(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Eighth order Magnus method approximated using Newton-Cotes quadrature.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{blanes2000improved, title={Improved high order integrators based on the Magnus expansion}, author={Blanes, Sergio and Casas, Fernando and Ros, Javier}, journal={BIT Numerical Mathematics}, volume={40}, number={3}, pages={434–450}, year={2000}, publisher={Springer} }
OrdinaryDiffEqLinear.MagnusNC8 — TypeMagnusNC8(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Eighth order Magnus method approximated using Gauss-Legendre quadrature.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{blanes2000improved, title={Improved high order integrators based on the Magnus expansion}, author={Blanes, Sergio and Casas, Fernando and Ros, Javier}, journal={BIT Numerical Mathematics}, volume={40}, number={3}, pages={434–450}, year={2000}, publisher={Springer} }
OrdinaryDiffEqLinear.MagnusGL4 — TypeMagnusGL4(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Fourth order Magnus method approximated using Gauss-Legendre quadrature.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{blanes2009magnus, title={The Magnus expansion and some of its applications}, author={Blanes, Sergio and Casas, Fernando and Oteo, Jose-Angel and Ros, Jos{'e}}, journal={Physics reports}, volume={470}, number={5-6}, pages={151–238}, year={2009}, publisher={Elsevier} }
State-Dependent Solvers
OrdinaryDiffEqLinear.LieEuler — TypeLieEuler(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver description
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{celledoni2014introduction, title={An introduction to Lie group integrators–basics, new developments and applications}, author={Celledoni, Elena and Marthinsen, H{�a}kon and Owren, Brynjulf}, journal={Journal of Computational Physics}, volume={257}, pages={1040–1061}, year={2014}, publisher={Elsevier} }
OrdinaryDiffEqLinear.RKMK2 — TypeRKMK2(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Second order Runge–Kutta–Munthe-Kaas method.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{celledoni2014introduction, title={An introduction to Lie group integrators–basics, new developments and applications}, author={Celledoni, Elena and Marthinsen, H{�a}kon and Owren, Brynjulf}, journal={Journal of Computational Physics}, volume={257}, pages={1040–1061}, year={2014}, publisher={Elsevier} }
OrdinaryDiffEqLinear.RKMK4 — TypeRKMK4(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Fourth order Runge–Kutta–Munthe-Kaas method.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{celledoni2014introduction, title={An introduction to Lie group integrators–basics, new developments and applications}, author={Celledoni, Elena and Marthinsen, H{�a}kon and Owren, Brynjulf}, journal={Journal of Computational Physics}, volume={257}, pages={1040–1061}, year={2014}, publisher={Elsevier} }
OrdinaryDiffEqLinear.LieRK4 — TypeLieRK4(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Fourth order Lie Runge-Kutta method.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{celledoni2014introduction, title={An introduction to Lie group integrators–basics, new developments and applications}, author={Celledoni, Elena and Marthinsen, H{�a}kon and Owren, Brynjulf}, journal={Journal of Computational Physics}, volume={257}, pages={1040–1061}, year={2014}, publisher={Elsevier} }
OrdinaryDiffEqLinear.CG2 — TypeCG2(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Second order Crouch–Grossman method.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{celledoni2014introduction, title={An introduction to Lie group integrators–basics, new developments and applications}, author={Celledoni, Elena and Marthinsen, H{�a}kon and Owren, Brynjulf}, journal={Journal of Computational Physics}, volume={257}, pages={1040–1061}, year={2014}, publisher={Elsevier} }
OrdinaryDiffEqLinear.CG4a — TypeCG4a(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Fourth order Crouch-Grossman method.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{jackiewicz2000construction, title={Construction of Runge–Kutta methods of Crouch–Grossman type of high order}, author={Jackiewicz, Zdzislaw and Marthinsen, Arne and Owren, Brynjulf}, journal={Advances in Computational Mathematics}, volume={13}, pages={405–415}, year={2000}, publisher={Springer} }
OrdinaryDiffEqLinear.MagnusAdapt4 — TypeMagnusAdapt4()Semilinear ODE solver Fourth Order Adaptive Magnus method.
Keyword Arguments
References
@article{li2008adaptive, title={Adaptive explicit Magnus numerical method for nonlinear dynamical systems}, author={Li, Wen-cheng and Deng, Zi-chen}, journal={Applied Mathematics and Mechanics}, volume={29}, number={9}, pages={1111–1118}, year={2008}, publisher={Springer}}
OrdinaryDiffEqLinear.CayleyEuler — TypeCayleyEuler()Semilinear ODE solver First order method using Cayley transformations.
Keyword Arguments
References
@article{iserles2000lie, title={Lie-group methods}, author={Iserles, Arieh and Munthe-Kaas, Hans Z and Norsett, Syvert P and Zanna, Antonella}, journal={Acta numerica}, volume={9}, pages={215–365}, year={2000}, publisher={Cambridge University Press}}
Time and State-Dependent Operators
OrdinaryDiffEqLinear.CG3 — TypeCG3(; krylov = false,
m = 30,
iop = 0)Semilinear ODE solver Third order Crouch-Grossman method.
Keyword Arguments
krylov: Determines whether Krylov approximation or operator caching is used, the latter only available for semilinear problems.krylov=trueis much faster for larger systems and is thus recommended whenever there are >100 ODEs.m: Controls the size of Krylov subspace.iop: If not zero, determines the length of the incomplete orthogonalization procedure (IOP). Note that if the linear operator/Jacobian is hermitian, then the Lanczos algorithm will always be used and the IOP setting is ignored.
References
@article{crouch1993numerical, title={Numerical integration of ordinary differential equations on manifolds}, author={Crouch, Peter E and Grossman, R}, journal={Journal of Nonlinear Science}, volume={3}, pages={1–33}, year={1993}, publisher={Springer} }