Kronecker sum of discrete Laplacians
From Wikipedia, the free encyclopedia
In mathematics, the Kronecker sum of discrete Laplacians, named after Leopold Kronecker, is a discrete version of the separation of variables for the continuous Laplacian in a rectangular cuboid domain.
Example: 2D discrete Laplacian on a regular grid with the homogeneous Dirichlet boundary condition
In a general situation of the separation of variables in the discrete case, the multidimensional discrete Laplacian is a Kronecker sum of 1D discrete Laplacians.
Mathematically, using the Kronecker sum:
where and are 1D discrete Laplacians in the x- and y-directions, correspondingly, and are the identities of appropriate sizes. Both and must correspond to the case of the homogeneous Dirichlet boundary condition at end points of the x- and y-intervals, in order to generate the 2D discrete Laplacian L corresponding to the homogeneous Dirichlet boundary condition everywhere on the boundary of the rectangular domain.
Here is a sample OCTAVE/MATLAB code to compute L on the regular 10×15 2D grid:
nx = 10; % number of grid points in the x-direction
ny = 15; % number of grid points in the y-direction
ex = ones(nx, 1);
Dxx = spdiags([ex -2*ex ex], [-1 0 1], nx, nx); %1D discrete Laplacian in the x-direction
ey = ones(ny, 1);
Dyy = spdiags([ey, -2*ey ey], [-1 0 1], ny, ny); %1D discrete Laplacian in the y-direction
L = kron(Dyy, speye(nx)) + kron(speye(ny), Dxx);