Boundary conditions in the resolution of a PDE with the FFT method

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
accdd
Messages
95
Reaction score
20
How to impose boundary conditions when solving a PDE with fft? For example here:
If I copy this code I get periodic boundary conditions. Thank you
 
Physics news on Phys.org
Well, yes. Discrete Fourier transforms are for periodic domains. If you have a non-periodic domain then depending on the boundary conditions you might be able to use a discrete sine or cosine transform, but in the general case you should use a discrete Chebyshev transform if you want access to an FFT based algorithm.