SciML / StochasticDiffEq.jl

Solvers for stochastic differential equations which connect with the scientific machine learning (SciML) ecosystem
Other
252 stars 69 forks source link

Weak Order 2 SDIRK methods #151

Open ChrisRackauckas opened 5 years ago

ChrisRackauckas commented 5 years ago

https://arxiv.org/pdf/1303.5104.pdf https://www.sciencedirect.com/science/article/pii/S0377042714003422 https://infoscience.epfl.ch/record/182186/files/S_SDIRK_abd_vil_zyg.pdf

ChrisRackauckas commented 5 years ago

This is technically a Weak Order 2 SDIRK method too, and is probably a good one to start with: https://epubs.siam.org/doi/abs/10.1137/110846609

ChrisRackauckas commented 5 years ago

https://epubs.siam.org/doi/abs/10.1137/060673308

timbode commented 1 year ago

@ChrisRackauckas Are there any plans to continue with this class of algorithms? There is also https://www.sciencedirect.com/science/article/pii/S0377042715001065

timbode commented 1 year ago

This question is related. I could provide a relatively simple example of a stiff SDE system where such methods might be helpful.

ChrisRackauckas commented 1 year ago

These already exist. See the docs:

https://docs.sciml.ai/DiffEqDocs/stable/solvers/sde_solve/#S-ROCK-Methods

[S-ROCK Methods](https://docs.sciml.ai/DiffEqDocs/stable/solvers/sde_solve/#S-ROCK-Methods)
SROCK1 - is a fixed step size stabilized explicit method for stiff problems. Defaults to solving the Ito problem but SROCK1(interpretation=:Stratonovich) can make it solve the Stratonovich problem. Strong order of convergence is 0.5 and weak order 1, but is optimized to get order 1 in case of scalar/diagonal noise.
SROCKEM - is fixed step Euler-Mayurama with first order ROCK stabilization, and can thus handle stiff problems. Only for Ito problems. Defaults to strong and weak order 1.0, but can solve with weak order 0.5 as SROCKEM(strong_order_1=false). This method can handle 1-dimensional, diagonal and non-diagonal noise.
SROCK2 - is a weak second order and strong first order fixed step stabilized method for stiff Ito problems. This method can handle 1-dimensional, diagonal and non-diagonal noise.
SKSROCK - is fixed step stabilized explicit method for stiff Ito problems. Strong order 0.5 and weak order 1. This method has a better stability domain then SROCK1. Also, it allows special post-processing techniques in case of ergodic dynamical systems, in the context of ergodic Brownian dynamics, to achieve order 2 accuracy. SKSROCK(;post_processing=true) will make use of post-processing. By default, it doesn't use post-processing. Post-processing is optional and under development. The rest of the method is completely functional and can handle 1-dimensional, diagonal and non-diagonal noise.
TangXiaoSROCK2 - is a fixed step size stabilized explicit method for stiff problems. Only for Ito problems. Weak order of 2 and strong order of 1. Has 5 versions with different stability domains which can be used as TangXiaoSROCK2(version_num=i) where i is 1-5. Under Development.

@frankschae is there more to be added here or should this be closed?

frankschae commented 1 year ago

hmm... I am not entirely sure. I think @deeepeshthakur implemented most of the SROCK methods https://github.com/SciML/StochasticDiffEq.jl/issues/73.

The authors in https://www.sciencedirect.com/science/article/pii/S0377042715001065 claim that their DDISRK methods have a larger stability region (and they do show it numerically).

In Fig. 1, the mean-square stability regions of DDISRK1 and DDISRK2 possess infinity stability domains along the negative real axis. Whereas in s-ROCK methods [20], [21], [22], the size of the stability domain increases with the stage number. So, DDISRK1 and DDISRK2 methods are efficient for SDE systems with larger drift stiffness. In the next section, we also compare the mean-square stability of our proposed DDISRK methods with s-ROCK methods introduced by Komori and Burrage [22].

So I guess it's worth keeping the issue open and implementing them (would need to look a bit more carefully though).

@timbode did you test how the SROCK methods perform on your example?

timbode commented 1 year ago

@timbode did you test how the SROCK methods perform on your example?

I probably did and got poor results, but I'm not 100% sure right now... Will check and let you know.

I do have a lot of drift stiffness, though. I start from multiplicative noise and then do a change of variables (Ito) to go to additive noise plus non-linear drift terms like exp(u_1) * exp(-u_2). That's where the stiffness comes from, as far as I can tell.

The above methods are all explicit, are they not? That's where DDISRK should help - I think drift implicitness will be crucial for my application. (Note that I'm not a huge expert on stochastic numerics, however).

ChrisRackauckas commented 1 year ago

Oh wait, I just realized this thread was on SDIRK not SROCK methods 😅 😅 😅 😅 😅 😅 😅 😅

Okay yeah we should look into doing these, but there's no implementation plan as of right now. Just whenever someone wants to contribute I'd be happy to review. I also would like to have a student who's interested in this topic, I don't think the current methods are great, but 🤷 that's a longer term thing.