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

SplitFunction can not be handled with TaylorIntegration.jl (and probably others that rely on different types) #433

Open
nathanaelbosch opened this issue Apr 12, 2023 · 0 comments

Comments

@nathanaelbosch
Copy link
Contributor

The IIP implementation of SplitFunction in the IIP case evaluates f.f1 and f.f2 separately and then adds the results, but having f.f2 write into du but f.f1 write into some f.cache:

function (f::SplitFunction)(du, u, p, t)
f.f1(f.cache, u, p, t)
f.f2(du, u, p, t)
du .+= f.cache
end

f.cache is not guaranteed to have the same type as du. This then creates errors with packages such as TaylorIntegration.jl, since f.cache::AbstractVector{Float64}, but to work it needs to be the same as du::AbstractVector{TaylorSeries.Taylor1{Float64}}.

This also prevents solvers that rely on Jacobians to compute them with ForwardDiff (at least OrdinaryDiffEq.calc_J! does not work and returns the standard autodiff-not-possible error message).

Are there any improvements to the SplitODEFunction implementation that could be made to enable these cases?

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