On A Two-dimensional Rectangular Grid
Using the finite difference numerical method to discretize the 2 dimensional Poisson equation (assuming a uniform spatial discretization, ) on an m × n grid gives the following formula:
where and . The preferred arrangement of the solution vector is to use natural ordering which, prior to removing boundary elements, would look like:
This will result in an mn × mn linear system:
where
is the m × m identity matrix, and, also m × m, is given by:
and is defined by
For each equation, the columns of correspond to the components:
while the columns of to the left and right of correspond to the components:
and
respectively.
From the above, it can be inferred that there are block columns of in . It is important to note that prescribed values of (usually lying on the boundary) would have their corresponding elements removed from and . For the common case that all the nodes on the boundary are set, we have and, and the system would have the dimensions (m − 2)(n − 2) × (m − 2)(n − 2), where and would have dimensions (m − 2) × (m − 2).
Read more about this topic: Discrete Poisson Equation