Open ChrisRackauckas opened 4 years ago
MagnusGauss4 implemented in https://github.com/SciML/OrdinaryDiffEq.jl/pull/1175
MagnusGL6 implemented in https://github.com/SciML/OrdinaryDiffEq.jl/pull/1183 And MagnusNC6 implemented in https://github.com/SciML/OrdinaryDiffEq.jl/pull/1184
MagnusNC8 implemented in https://github.com/SciML/OrdinaryDiffEq.jl/pull/1188 and Magnus GL8 implemented in https://github.com/SciML/OrdinaryDiffEq.jl/pull/1186
Formally, given an IVP defined by the linear differential equation dX/dt = A(t)X , and X(t0) = I , where I is a matrix containing the inital values of the dependent variables at t0, we can obtain a solution of the IVP that can be written in the form X(t,t0) = eΩ(t,t0).
Now, Ω is obtained as an infinite series Ω(t,t0) = Σ Ωk(t,t0) , wherein the kth term, or Ωk in the series is a multiple integral of nested commutators containing k operators A(t).
What each of the implemeted algoritm does is, an algorithm of order n, say MagnusGL6, where n=6 numerically approximates the integral terms with quadratures so as to obtain the required accuracy of order O(dtn+1) for a sufficiently smooth matrix A(t)
To use any of these, one can simply :
function update_func(A,u,p,t)
A[1,1] = cos(t)
A[2,1] = sin(t)
A[1,2] = -sin(t)
A[2,2] = cos(t)
end
A = DiffEqArrayOperator(ones(2,2),update_func=update_func)
prob = ODEProblem(A, ones(2), (1.0, 6.0))
sol = solve(prob,MagnusGL6(),dt=1/10)
The generated solution object sol
can now be handled separately.
NOTE : The MagnusBlanes and MagnusHybrid methods involved Taylor series expansion of of the Matrix A(t) about t = t0+dt/2, and hence requiring the need to calculate kth order derivatives. Hence these have been skipped for now
Hairer III
IMPROVED HIGH ORDER INTEGRATORS BASED ON THE MAGNUS EXPANSION https://link.springer.com/content/pdf/10.1023/A:1022311628317.pdf
(and adaptive!)
https://arxiv.org/pdf/0810.5488.pdf