Does declaring jacobian and redefining ODEProblem with jacobian accelerate `solve`?

https://diffeq.sciml.ai/dev/features/performance_overloads/#ode_explicit_jac

following from this example,…
Does explicitly declaring jacobian for an ODEproblem like this accelerate the solution using solve()

It can, if you write a better version that autodiff would build.

1 Like

@ChrisRackauckas

Like in case of symbolic generated Jacobian using MTK? that is better than AutoDiff, right?

In case of Reactionsystem converted to ODESystem, we do not have generic function f used for creating odeproblem with Jacobian right?? In such case, how do we assign this Jacobian to converted ODESystem?

Not necessarily. Depends on whether you can get simplifications or exploit sparsity.

You do.

You just generate it with jac=true at problem construction time.

You just generate it with jac=true at problem construction time.

Like a kwarg as follows ?

oprob = ODEProblem(odesys, x₀map, tspan, pmap;jac=true);

Yup, just as the docstring describes.

https://mtk.sciml.ai/dev/systems/ODESystem/#SciMLBase.ODEProblem