1

I'm working on this question:

$(2)$ Solve the two-dimensional Poisson problem $$\Delta u+\lambda u=f\quad\text{in}\quad\Omega=(0,1)^2$$ subject to homogeneous Dirichlet boundary conditions using a fast Poisson solver. You will have to adjust the code $\mathtt{fastpoissonD2d.m}$ and you have to turn in a hardcopy of your code. In addition, apply your code to the specific problem $\lambda=100$ and $f(x,y)=-2x+3y$, and include images of the solution $u$ for discretization sizes $N=128$ and $N=256$.

I've worked through most of the problem. The issue I'm having is that the code we're given is for u'' = -1. I have no idea how to incorporate the u and the eigenvalue into the solver, although I have incorporated the given function.

My question is there is this bit of code: Leig = (((2*cos(pi*(1:N-1)'/N))-2)ones(1,N-1)) + ... (ones(N-1,1)((2*cos(pi*(1:N-1)/N))-2)); I have no what this does, perhaps it would answer my question. If someone could join me in http://collabedit.com/qt5c8 and we could converse about the code together?

robjohn
  • 345,667
  • 1
    Hi, Bob, maybe this question will get better answer at [scicomp.SE]. – Shuhao Cao Jun 18 '13 at 20:21
  • Where can we see $\mathtt{fastpoissonD2d.m}$? – robjohn Jun 18 '13 at 21:37
  • @ShuhaoCao: after we make the question into a good question, we can think about migrating it. – robjohn Jun 18 '13 at 21:38
  • @robjohn Makes sense. Now I am inclining not migrating it. For this is apparently a numerical pde class project which is supposed to be done by the student himself. Provided you have the code $\mathtt{fastpoissonD2d.m}$. – Shuhao Cao Jun 18 '13 at 21:41
  • @ShuhaoCao: I believe you are correct. This is part of the reason it is best to have all of a question local; we know what it asks without having to look elsewhere. – robjohn Jun 18 '13 at 21:50

0 Answers0