next up previous contents
Next: Solve for the potential Up: Solving Poisson's equation Previous: Kernel for Poisson's equation

Poisson's equation solver

 

Using your subroutine (2.1) and a code fragment similar to that given for (1.2), write a main program which solves Poisson's equation.

Notes: Be sure to integrate backwards from tex2html_wrap_inline262 (u=1) to r=0 (u=0): you'll have to change the order of the loop and the values of both h and dk! Also, remember the boundary conditions:
tex2html_wrap_inline274 and tex2html_wrap_inline276 .



Tomas Arias
Tue Feb 8 16:02:01 EST 2000