I'm working on a 2D diffusion equation with a single time derivative on the l.h.s. and x and y derivatives on the r.h.s:
d[ f(x,y,t) ]/dt = H f(x,y,t)
Without using ODE, I solve this with simply as
f(x,y,t+1) = f(x,y,t) + dt H f(x,y,t)
And it is more efficient to write f(x,y,t) as a matrix with x as lines as y as columns. So my function F(f) receives f as a matrix and returns another matrix out=H.f. In F(f) I work out the space derivatives using Fourier transforms.
This is not compatible with the ODE code, right? ODE requires f to be a vector.
Would it be difficult to generalize ODE to accept f(x,y,t) to be a matrix?