Open AshtonSBradley opened 8 months ago
Just wondering if there is any progress on this... are these methods going to remain broken for a while?
are there working examples for any SplitDOEProblems?
I don't see any runnable example code in the docs
https://docs.sciml.ai/DiffEqDocs/stable/types/split_ode_types/#split_ode_prob
maybe I am not looking in the right place
The new docs have some very rudimentary examples: https://docs.sciml.ai/OrdinaryDiffEq/stable/imex/IMEXMultistep/
The benchmarks have a few more:
https://docs.sciml.ai/SciMLBenchmarksOutput/stable/SimpleHandwrittenPDE/burgers_fdm_wpd/
But we probably need to find the time to do a tutorial
This really great book by Kyle Novak has some short fast examples of spectral methods using FFTW.
Unfortunately some of the code was broken since the shift to SciMLOperators, and this has now made its way explicitly into the current online version https://www.equalsharepress.com (digital download free), E.g. on page 469 for Kuramoto-Sivashinsky.
The book was written before the shift to SciMLOperators and the updated online edition attempts to update to that API, but there are some casualties. Happily, due to recent updates, this is one example that has now been revived - the code now works, as far as I can tell, but I had to use KenKarp4 to get Figure 16.1 of the book.
However, it would be great to see a couple of short runnable examples working, maybe even taken from the book since there are so many nice examples that use IMEX methods etc. The popularity and flexibility of Fourier spectral methods, and the value of splitting, would seem to highlight the importance of these examples.
using FFTW, DifferentialEquations, SciMLOperators
l = 100; T = 200.0; n = 512
x = LinRange(-l/2,l/2,n+1)[2:end]
u0 = exp.(-x.^2)
iξ = im*[0:(n÷2);(-n÷2+1):-1]*2π/l
F = plan_fft(u0)
L = DiagonalOperator(-iξ.^2-iξ.^4)
N = (u,_,_) -> -0.5iξ.*(F*((F\u).^2))
problem = SplitODEProblem(L,N,F*u0,(0,T))
@time solution = solve(problem,KenCarp4(linsolve=KrylovJL(),autodiff=false),reltol=1e-12);
u = t -> real(F\solution(t))
using ColorSchemes, ImageShow
s = hcat(u.(LinRange(0,T,500))...)
get(colorschemes[:binary],abs.(s),:extrema)
Describe the bug 🐞
Error when using e.g. ETDRK4 with SplitOperatorProblem and SciMLOperators
Expected behavior
Should run without error.
Minimal Reproducible Example 👇
Error & Stacktrace ⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
Add any other context about the problem here.