Can I use user defined data type with ODE function?
mutable struct ud
a::Float64
b::Float64
end
function od!(dx,x,t)
dx.= [1, x.a ];
end
ic = ud(1.0,2.0);
prob=ODEProblem(od!,ic,(0.0,1.2));
sol1=solve(prob1, Tsit5(), reltol=1e-12, abstol=1e-12);
This currently does not work. Is it possible to design something like this? If so how?