aux.fisch: Generate a 2-dimensional discrete Poisson matrix
Description
Poisson equation is one of most well-known elliptic partial differential equations. In order to
give a concrete example, a discrete Poisson matrix is generated, assuming we have N number of
grid points for each dimension under square domain. fisch is a German word for Poisson.
Usage
aux.fisch(N, sparse = FALSE)
Value
an \((N^2 \times N^2)\) matrix having block banded structure.
Arguments
N
the number of grid points for each direction.
sparse
a logical; TRUE for returning sparse matrix, FALSE otherwise.
References
Golub, G. H. and Van Loan, C. F. (1996) Matrix Computations, 3rd Ed., pages 177–180.
## generate dense and sparse Poisson matrix of size 25 by 25.A = aux.fisch(5, sparse=FALSE)
B = aux.fisch(5, sparse=TRUE)
(all(A==B)) # TRUE if two matrices are equal.