Closed isaacsas closed 5 years ago
Way too few points? I thought the issue was too many in the plot?
No, the issue is I can't get the plot to actually look well-resolved. Changing tstops
to also be 1000 points doesn't seem to make a difference.
What did you set tstops
to?
The "issue" that you're having is that the true solution hits the tolerance with only a few steps and uses linear interpolation, so it doesn't look like a small dt SDE solution, but it's still a valid path. You can constrain the dt, lower the tolerance, tstops, etc. if you want more steps, but without a stochastic interpolation (whatever that would be) it would be hard to noise the intermediate parts between steps.
sol = solve(sprob, saveat=4e-3, tstops=4e-5)
gives
tstops
doesn't expand scalars. You need an array if you want more than one point.
I see. I'll check that fixes it and then close if it looks good. Thanks!
Yup, I was dumb. Sorry to waste your time on that one. Thanks.
If you have ideas for high order stochastic interpolation then I'm interested though. It's a funny little problem that comes up once you're able to start solving these things efficiently!
That is an interesting issue I hadn't thought about before; since I usually just work with ODEs/PDEs and jump processes I'm not super familiar with the intermediate SDE/SPDE representations and issues that crop up there.
gives a plot that seems to have way too few points and just uses linear interpolation:
I've played around with
tstops
in the solver andplotdensity
and neither seems to fix this issue.