ODEs using Element-wise vector multiplication

function f2!(du, u, p, t)
    du .= u.*w;
end

Mutate, don’t make a new vector if you’re using the mutating syntax.

1 Like