Is there something useful for third boundary condition on Poisson equation

69 Views Asked by At

There is a following task for a friend of mine to make:

$$-\Delta u=f,x\in(0,X),y\in(0,Y)\\-u_x+\alpha(y)u\Bigr|_{x=0}=g(y)\\u\Bigr|_{x=X}=c(y)\\u\Bigr|_{y=0}=a(x)\\u\Bigr|_{y=Y}=b(x)$$

She needs to make a program using biconjugate gradient method to solve the problem.She managed to implement the method but I don't know what matrix should she use and how does she need to enter it in Matlab.

I would appreciate you if you helped me with the matrix

1

There are 1 best solutions below

0
On BEST ANSWER

The system of equations will be the same as the one discussed in the Wikipedia article "Discrete Poisson equation". To enter it into Matlab, I would suggest looking into the `spdiags` command. (This function uses the "sparse matrix" format, which will significantly speed up calculations involving large matrices/fine discretizations.)