|
numerics 0.1.0
|
num::pde::poisson2d solves the Dirichlet problem
\[ -\Delta u = f,\qquad u|_{\partial\Omega}=0 \]
on an \(N\times N\) interior grid by DST-I diagonalization.
The exact solution in this example is
\[ u(x,y)=\sin(\pi x)\sin(\pi y). \]
Use poisson2d_fd as a direct finite-difference reference for small grids.
The DST implementation uses FFTs of length \(2(N+1)\). The current built-in radix-2 path requires \(N+1\) to be a power of two, for example \(N=7,15,31,63,127\).