I am defining the gradient operator as follows:
Dx = F \ Dxh * F
Dy = F \ Dyh * F
grad = [Dx, Dy]
where F is the Fourier transform wrapped in a FunctionOperator, and Dx, Dy are DiagonalOperators. I want to effectively share the work of applying the Fourier transform. The order of operations should be:
function grad(u)
mul!(uh, F, u)
mul!(uxh, Dxh, uh)
mul!(uxh, Dxh, uh)
ldiv!(ux, F, uxh)
ldiv!(uy, F, uyh)
ux, uy
end
So effectively, I want a SciMLOperators that accepts/returns arrays of inputs like F*u, F*u = FF(u). This would be useful for working with coupled equations like the Navier Stokes where you would want to define operators on (component) vectors like (vx, vy, vz, p).
I am defining the gradient operator as follows:
where
Fis the Fourier transform wrapped in aFunctionOperator, andDx, DyareDiagonalOperators. I want to effectively share the work of applying the Fourier transform. The order of operations should be:So effectively, I want a SciMLOperators that accepts/returns arrays of inputs like
F*u, F*u = FF(u). This would be useful for working with coupled equations like the Navier Stokes where you would want to define operators on (component) vectors like(vx, vy, vz, p).