SciML / StochasticDiffEq.jl

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

WIP: fix SROCK2 for NoiseWrapper noise #507

Open axsk opened 1 year ago

axsk commented 1 year ago

fixes #505

axsk commented 1 year ago

Looking at the other uses of gen_prob I just realized that some methods don't care about W.rng and just use rand() anyways. I guess we want to use W.rng everywhere?

ChrisRackauckas commented 1 year ago

What's the status of this?

axsk commented 1 year ago

Sorry for leaving this hanging, was on vacation and then forgot about it. I think it is done.

The one thing I am not sure of (looking at it now) is that I am not using the oftype(W.dW, ... any more. I don't know if that poses any problems.

ChrisRackauckas commented 1 year ago

Add a test?

axsk commented 1 year ago

Well the canonical tests seem to be working. I think the oftype only comes to play when W.dW is of different type then rand(W.rng), and I wouldn't know when this is the case.

Edit: the omission of oftype is fine. c.f. the code comment below.

axsk commented 1 year ago

Or do you mean a test that the NoiseWrapper is actually respected?

ChrisRackauckas commented 1 year ago

Or do you mean a test that the NoiseWrapper is actually respected?

That. Try solving it with a NoiseWrapper and seeing if it succeeds / fails. Also try other noise types like NoiseGrid`

axsk commented 1 year ago

Could you hint me at where to put these tests?

ChrisRackauckas commented 1 year ago

https://github.com/SciML/StochasticDiffEq.jl/blob/master/test/noise_type_test.jl would probably be good