Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable event detection #26

Open
sdwfrost opened this issue Apr 20, 2017 · 6 comments
Open

Enable event detection #26

sdwfrost opened this issue Apr 20, 2017 · 6 comments

Comments

@sdwfrost
Copy link
Collaborator

This issue is mostly to @ChrisRackauckas ; I'd like to use event detection in LSODA.jl; I assume that this will require some additions to liblsoda in order to support returning from lsoda every timestep?

@rveltz
Copy link
Owner

rveltz commented Apr 20, 2017

I guess so but you checked that it is not saved in lsoda_common_t

@sdwfrost
Copy link
Collaborator Author

One can always do event detection after running a system between [0,t], but for efficiency, it's probably best to check the condition each time step, then interpolate only between two consecutive timesteps.

@rveltz
Copy link
Owner

rveltz commented Apr 20, 2017

Yes. I am not very keen on event detection but one can probably hack it. Did yu check lsoda_common_t?

@sdwfrost
Copy link
Collaborator Author

Yes, but one should probably have an interface to the one-step solver stoda in order to facilitate the common interface for event handling.

@ChrisRackauckas
Copy link
Collaborator

Yes, but one should probably have an interface to the one-step solver stoda in order to facilitate the common interface for event handling.

Well, what we have here is currently enough since it's already controlled a stepwise level and I believe the GC works now? What stopped Sundials is that, in order for the GC to register the size, it needs a custom allocator, and so setting up the integrator interface is unviable since we cannot rely on the GC there. Here, we can just wrap it all in a type which has the integrator interface, and then the event handling stuff is almost free.

My plan there is to just take what's in the *DiffEq packages and slap that on these interop packages. The reasoning is here:

SciML/Sundials.jl#109 (comment)

The rootfinding algorithm that comes in "the standard timestepping packages" isn't very good... and since we have Julia we can rely on the fact that our native methods are just as fast and put something more robust there which just uses the already existing interval interpolations.

That said... I need to do my advancement right now so I won't be able to do this for awhile.

@ChrisRackauckas
Copy link
Collaborator

Is the call to the intermediate interpolation wrapped?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants