Symbolic generating of system equations for 2D

regular grid for solving Laplace equation using finite

difference method

 

By Nasser M. Abbasi

Math 228A, UC Davis, Fall 2010

 

Introduction

When solving the above equation using finite difference method on square, in order to make it easy to see the internal structure of the A matrix using the standard 5 points Laplacian scheme, the following is a small function which generates the symbolic format of these equations for a given N, the number of grid points on one edge. At the end of this note, the system equations are generated for N=4,5,6,7,8. One can see the form of the A matrix with the dominant diagonal and the corresponding bands. It is mostly a sparse matrix.

 

HTML

PDF

notebook