Well, from the docs, it seems that both should work and handle correctly what is to be handled. Maybe that is a bug
From: Integrator Interface · DifferentialEquations.jl
-
resize!(integrator,k): Resizes the DE to a sizek. This chops off the end of the array, or adds blank values at the end, depending on whetherk>length(integrator.u). -
resize_non_user_cache!(integrator,k): Resizes the non-user facing caches to be compatible with a DE of sizek. This includes resizing Jacobian caches. Note that in many cases,resize!simple resizesuser_cachevariables and then calls this function. This finer control is required for someAbstractArrayoperations. -
deleteat_non_user_cache!(integrator,idxs):deleteat!s the non-user facing caches at indicesidxs. This includes resizing Jacobian caches. Note that in many cases,deleteat!simpledeleteat!suser_cachevariables and then calls this function. This finer control is required for someAbstractArrayoperations. -
addat_non_user_cache!(integrator,idxs):addat!s the non-user facing caches at indicesidxs. This includes resizing Jacobian caches. Note that in many cases,addat!simpleaddat!suser_cachevariables and then calls this function. This finer control is required for someAbstractArrayoperations. -
deleteat!(integrator,idxs): Shrinks the ODE by deleting theidxscomponents. -
addat!(integrator,idxs): Grows the ODE by adding theidxscomponents. Must be contiguous indices.