Use RV at initialization in NoiseTransport#198
Conversation
|
Hmm, I think I did this on purpose. In the first run, it uses the value provided by |
|
Right, I can also see this point -- and I read the docs again, and you wrote it already pretty explicit:
We should perhaps add this to the example with some additional comments as well? (That it's not just the rv "prototype" but really the rv for the first run.) |
|
Now that you drew attention to this, I come to realize it might not have been a good design option. The whole sentence is confusing:
It says it is optional, but at the end it says it is necessary in the case of a random vector. At the moment, I think the best thing is to consider |
Addresses #197
The values of
vare indeed zero for the first run of the SDE solver. This seems to be a bug. For later runs, they do get initialized byreinit!https://github.com/SciML/StochasticDiffEq.jl/pull/502/files#diff-ca1c45d4f0bec64e8340981f6b27f4037bf6ac13c8f1af132656c485c0a8e941R422
An easy fix (?) seems to be to force initialization in the constructor. This is already done for oop/scalar processes but not for inplace/array-like random variables (see changes below). Given that the docs say:
I think the fix below should be fine.
@rmsrosa could you have a look at this change as well, please? I haven't used
NoiseTransportmyself yet...and I am not fully confident I oversee all potential difficulties.Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.