I prefer to construct multidimensional Laplacian matrices from the 1d ones 
via Kronecker products, and the 1d ones from -D'*D where D is a 1d 
first-derivative matrix, to make the structure (symmetric-definite!) and 
origin of the matrices clearer.   I've posted a notebook showing some 
examples from my 18.303 class at MIT:

http://nbviewer.ipython.org/url/math.mit.edu/~stevenj/18.303/lecture-10.ipynb

(It would be nicer to construct the sdiff1 function so that the matrix is 
sparse from the beginning, rather than converting from a dense matrix.  But 
I was lazy and dense matrices on 1d grids are cheap.)

Reply via email to