CalculustJL / CalculustCore.jl

Ecosystem for writing partial differential equation solvers
MIT License
14 stars 0 forks source link

Advection in Fourier space broken #23

Open vpuri3 opened 2 years ago

vpuri3 commented 2 years ago

https://github.com/vpuri3/PDEInterfaces.jl/blob/940aee9cf3decda3583c03c6fbcfeff649daaaae/src/Spaces/TrigonometricPolynomials/Fourier.jl#L333-L367

product is being formed in modal space. not real space. i think the way to do this is to write a FunctionOperator:

function advect(duh, uh, p, t)
    # get vh from p
    v <- F \ Xh  * vh
    u <- F \ Xh * Dh * uh
    duh <- F \ (v * u)
end
vpuri3 commented 2 years ago

would have to fix https://github.com/SciML/SciMLOperators.jl/issues/56

vpuri3 commented 2 years ago

or just figure out how to do adjoints, dealasing correctly by learning fourier methods properly