FourierFlows / FourierFlows.jl

Tools for building fast, hackable, pseudospectral partial differential equation solvers on periodic domains
https://bit.ly/FourierFlows
MIT License
206 stars 29 forks source link

Remove extra substep in ETDRK4 #315

Closed cnrrobertson closed 2 years ago

cnrrobertson commented 2 years ago

It seems that only one of ETDRK4substep12!(ts.sol₁, ts.exp½Ldt, sol, ts.ζ, ts.N₁) or @. ts.sol₁ = ts.exp½Ldt * sol + ts.ζ * ts.N₁ is needed as the first substep in ETDRK4. They both operate on the same array in place using the same arguments, so perform identical operations. As a further check, removing either passes the tests.

glwagner commented 2 years ago

Probably good to copy over the rationale from #314 into this PR too!