I'm trying to solve a 2D poisson equation by finite differences. In the process, I obtain a sparse matrix with only 5 variables in each equation, For example, if the variable were U, then the discretization would yield:
$U_{i-1,j} + U_{i+1,j} -4U_{i,j} + U_{i,j-1} + U_{i,j+1} = f_{i,j}$
I know that I can solve this system by an iterative method, but the thought occurred to me that if I ordered the variables appropriately, I might be able to obtain a banded matrix which could be solved by a direct method (i.e. gaussian elimination w/o pivoting). Is this possible? Are there any strategies for doing this for other, perhaps less structured sparse systems?