aux_FISCH: Generate a 2-dimensional discrete Poisson matrix

Description Usage Arguments Value References Examples

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

1
aux.fisch(N, sparse = FALSE)

Arguments

N

the number of grid points for each direction.

sparse

a logical; TRUE for returning sparse matrix, FALSE otherwise.

Value

an (N^2-by-N^2) matrix having block banded structure.

References

Golub, G. H. and Van Loan, C. F. (1996) Matrix Computations, 3rd Ed., pages 177–180.

Examples

1
2
3
4
## 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.

SolveLS documentation built on Feb. 12, 2018, 5:03 p.m.

Related to aux_FISCH in SolveLS...