Solving semilinear ODE with changing linear operator

I am trying to solve a semilinear ODE whose linear operator depends on the solution: du/dt = A(u) u + f(u,t). The “linear” operator A(u) is diagonal. I am wondering what is the best approach to solve this problem by DifferentialEquations.jl.

Strictly speaking, A(u) u is not a linear term as A depends on u, but SplitODEProblem documented here seems to support u-dependent linear operator, so I gave it a try. Specifically, I define A(u) as DiffEqArrayOperator(Diagonal(...), update_func=...) such that update_func updates the diagonal matrix as a function of u. The performance of this approach is unsatisfactory: using SplitODEProblem is slower than using ODEProblem.

I think the best approach depends a lot on the properties of A(u) and f(u, t), but any general advices will be appreciated!

I don’t know of a solver that would do this very effectively. Semilinear methods usually specialize on A being constant.

Do you know anything about the order of f w.r.t. u?

It’s roughly u.^3, if that’s helpful.