BoundaryValueDiffEq.jl icon indicating copy to clipboard operation
BoundaryValueDiffEq.jl copied to clipboard

BVP Solvers do not accept certain MTK kwargs (:jac, etc.)

Open vyudu opened this issue 11 months ago • 2 comments

With codegen to BVProblem being added to MTK soon it'd be nice if the BVP solvers could work with the Jacobian, W matrix, etc. that can be generated from it. Currently doing something like

bvp = SciMLBase.BVProblem(lksys, u0map, tspan; guesses, constraints, jac = true)
solve(bvp, MIRK4(), dt = 0.01)

will result in a Unrecognized keyword arguments: [:jac]

vyudu avatar Jan 16 '25 17:01 vyudu

In ModelingToolkit.jl the similar usage for ODESystem(sys::ODESystem, ..., jac=true) is implemented as a dispatch in https://github.com/SciML/ModelingToolkit.jl/blob/2ca9ecfdee95f3026bfbc6b484f9403331615ed7/src/systems/diffeqs/abstractodesystem.jl#L786, so I think this feature need to be implemented in MTK as well.

ErikQQY avatar Jan 16 '25 18:01 ErikQQY

Right, that part should be coming with https://github.com/SciML/ModelingToolkit.jl/pull/3323

vyudu avatar Jan 16 '25 21:01 vyudu