Discrete Poisson equation: Difference between revisions

→‎Example: Had to change sign here to.
(→‎On a two-dimensional rectangular grid: The definition of the laplacian had the wrong sign. Changed sign in all equations)
(→‎Example: Had to change sign here to.)
A =
\begin{bmatrix}
~-4 & -~1 & ~0 & -~1 & ~0 & ~0 & ~0 & ~0 & ~0 \\
-~1 & ~-4 & -~1 & ~0 & -~1 & ~0 & ~0 & ~0 & ~0 \\
~0 & -~1 & ~-4 & ~0 & ~0 & -~1 & ~0 & ~0 & ~0 \\
-~1 & ~0 & ~0 & ~-4 & -~1 & ~0 & -~1 & ~0 & ~0 \\
~0 & -~1 & ~0 & -~1 & ~-4 & -~1 & ~0 & -~1 & ~0 \\
~0 & ~0 & -~1 & ~0 & -~1 & ~-4 & ~0 & ~0 & -~1 \\
~0 & ~0 & ~0 & -~1 & ~0 & ~0 & ~-4 & -~1 & ~0 \\
~0 & ~0 & ~0 & ~0 & -~1 & ~0 & -~1 & ~-4 & -~1 \\
~0 & ~0 & ~0 & ~0 & ~0 & -~1 & ~0 & -~1 & ~-4
\end{bmatrix}
</math>
b =
\begin{bmatrix}
-\Delta x^2 g_{22} +- u_{12} +- u_{21} \\
-\Delta x^2 g_{32} +- u_{31} ~~~~~~~~ \\
-\Delta x^2 g_{42} +- u_{52} +- u_{41} \\
-\Delta x^2 g_{23} +- u_{13} ~~~~~~~~ \\
-\Delta x^2 g_{33} ~~~~~~~~~~~~~~~~ \\
-\Delta x^2 g_{43} +- u_{53} ~~~~~~~~ \\
-\Delta x^2 g_{24} +- u_{14} +- u_{25} \\
-\Delta x^2 g_{34} +- u_{35} ~~~~~~~~ \\
-\Delta x^2 g_{44} +- u_{54} +- u_{45}
\end{bmatrix}.
</math>
D =
\begin{bmatrix}
~-4 & -~1 & ~0 \\
-~1 & ~-4 & -~1 \\
~0 & -~1 & ~-4 \\
\end{bmatrix}
</math>
 
:<math>
-I =
\begin{bmatrix}
-1 & ~0 & ~0 \\
~0 & -1 & ~0 \\
~0 & ~0 & -1
\end{bmatrix}.
</math>