Finite difference method LU

316 Views Asked by At

If R is the region of the plane (0,1) x (0,2), Let L be the 2-d Laplace operator and consider the Poisson equation Lu = 4 on R. One solution is the function v(x,y) = (x-y)^2. Let g be the restriction of v to the boundary of R. To obtain it, we set $h = k = 1/2$, but how to choose m and n? And to solve it, we have to use matlab? Thanks! enter image description here

1

There are 1 best solutions below

4
On BEST ANSWER

If $h$ is your step size in the x-direction and $k$ is your step size in your y-direction, and your boundary is $[a,b]\times [c,d]$, then the number of nodes in the x-direction is $$ m = \frac{b-a}{h} + 1 $$ and the number of nodes in the y-direction is $$ n = \frac{d-c}{k} + 1. $$

In your case, you have $a = 0$, $b = 1$, $c = 0$, $d = 2$, $h = k = 1/2$, so

$$ m = \frac{1 - 0}{1/2} + 1= 3 $$

$$ n = \frac{2 - 0}{1/2} + 1= 5. $$