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

Draft: ImplicitDiscreteSolve #534

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Conversation

@vyudu vyudu marked this pull request as draft February 20, 2025 01:38
@vyudu
Copy link
Member Author

vyudu commented Feb 20, 2025

@ChrisRackauckas This is barebones but working. Any important features I'm missing here? Also should this actually go in OrdinaryDiffEq?

@ChrisRackauckas
Copy link
Member

Can this to use SimpleNonlinearSolve.jl's Newton and make this be SimpleImplicitDiscreteSolve.jl? I think the complete version will want to use the Jacobian reuse aspect and such, so for now having a static version would be a good way to handle this.

@vyudu
Copy link
Member Author

vyudu commented Feb 26, 2025

Did that refactor, just needs more tests now I think

@vyudu
Copy link
Member Author

vyudu commented Mar 13, 2025

@ChrisRackauckas I think this is basically ready, initialization for problems without initializationproblems needs work but I think it's fine for the MTK purposes. How do I register it?

@vyudu vyudu marked this pull request as ready for review March 13, 2025 01:44
@vyudu
Copy link
Member Author

vyudu commented Mar 14, 2025

Fixed these

@ChrisRackauckas
Copy link
Member

Okay so this implementation finds itself in a somewhat odd spot. It's not a "Simple" alg because it's not statically compile-able, which is a property that all others have. It would need to avoid the OrdinaryDiffEqCore part. But it's not a fully complete version either? But it's a rough start towards it. I guess seeing it at this stage, how about moving this to OrdinaryDiffEq and making this be ImplicitDiscreteSolve.jl, and we can use this as a base to do the required optimizations to make the full version. We can do the SimpleImplicitDiscreteSolve.jl as a somewhat separate version for static support.

@vyudu
Copy link
Member Author

vyudu commented Mar 14, 2025

I see, didn't realize I couldn't use OrdinaryDiffEqCore, will move. I'll keep this open too to keep iterating it toward a SimpleImplicitDiscreteSolve.

@ChrisRackauckas
Copy link
Member

See for example https://github.com/SciML/SimpleDiffEq.jl/blob/master/src/rk4/looprk4.jl which is the most basic RK4 implementation. For IDS, it would just be a loop over nonlinear solve calls. With SimpleNonlinearSolve being similar, the whole thing would statically compile since no mutable structs would be in the middle.

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

Successfully merging this pull request may close these issues.

2 participants