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

Support time derivative (by supplying a tgrad function) for SciML Rosenbrock solvers #56

Open
sjdaines opened this issue Jul 24, 2023 · 0 comments

Comments

@sjdaines
Copy link
Member

SciML Rosenbrock solvers require a time derivative (supplied by tgrad keyword in ODEfunction). Without this, they will attempt to calculate this using autodifferentiation and hence will fail with PALEO models.

Example of what is needed (see SciML/OrdinaryDiffEq.jl#1587) for the case where there is no time dependence PALEOmodel/src/ODE.jl L78:

f = SciMLBase.ODEFunction{true}(m; jac, jac_prototype, mass_matrix=M, tgrad = (dT, u, p, t) -> fill!(dT, 0),)

The more general approach with time dependence would need to calculate this by autodifferentiation (cf how Jacobians are calculated in PALEO).

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

1 participant