Fast solver for Poisson's equation on rectangular grid
u = poicalc(f,h1,h2,n1,n2) u = poicalc(f,h1,h2) u = poicalc(f)
u = poicalc(f,h1,h2,n1,n2) calculates
the solution of Poisson's equation for the interior points of an evenly
spaced rectangular grid. The columns of
the solutions corresponding to the columns of the right-hand side
the spacings in the first and second direction, and
the number of points.
The number of rows in
f must be
n2 are not given,
the square root of the number of rows of
f is assumed.
h2 are not given,
they are assumed to be equal.
The ordering of the rows in
the canonical ordering of interior points, as returned by
The solution is obtained by sine transforms in the first direction
and tridiagonal matrix solution in the second direction.
be 1 less than a power of 2 for best performance.