Closed
Description
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
using OrdinaryDiffEq
@parameters p d
@variables X(t)
eqs = [D(X) ~ p - d*X]
@mtkbuild osys = ODESystem(eqs, t)
u0 = [X => 1.0f0]
ps = [p => 1.0f0, d => 2.0f0]
oprob = ODEProblem(osys, u0, 1.0, ps)
sol = solve(oprob)
typeof(oprob[X]) # Float64
eltype(sol[X]) # Float64
This one popped out in the Catalyst tests with the latest MTK release. Among other things it should be a major problem for GPU parallelisation.