This is the precedessor's code the NP 5.04
PRO relax2
   phi = fltarr(11,11)
   itype=intarr(11,11) ; initialized to zero (don't calculate). 
   dphi = 1. 
   niter =20
   string1=''
   itype(1:9,1:9) = 1 ; 1 means calculate for this point. 
   itype(0,*) = 0 ; Start border
   itype(*,0) = 0 ; *
   itype(*,10) = 0 ; *
   itype(10,*) =0 ; End border
   itype(3:7,1:2) = 0 ; Lower polepiece. 
   itype(3:7,8:9) = 0 ; Upper polepiece. 
   itype(3,7)=0 ;add first piece to upper polepiece
   itype(7,7)=0 ;add first piece to upper polepiece
   itype(3,3)=0 ;add first piece to lower polepiece
   itype(7,3)=0 ;add first piece to lower polepiece
   phi(3:7,8:10) = 10.  ; Upper polepiece at 10 StatMagVolts
   phi(0,*) = 0.  ; Left boundary at 0 V. 
   phi(10,*) = 0.  ; Right boundary at 0 V. 
   phi(1,0) = 0.  ; Have to do something here too. 
   phi(1,10) = 0. 
   phi(9,0) = 0. 
   phi(9,10) = 0. 
   phi(2,0) = 0. 
   phi(2,10) = 0. 
   phi(8,0) = 0. 
   phi(8,10) = 0. 
   phi(3,7)=10 ;add first piece to upper polepiece
   phi(7,7)=10 ;add first piece to upper polepiece
   phi(3,3)=0 ;add first piece to lower polepiece
   phi(7,3)=0 ;add first piece to lower polepiece
      FOR iter = 0,niter-1 DO BEGIN
         FOR i=0,10 DO BEGIN
            FOR j=0,10 DO BEGIN
               IF itype(i,j) eq 1 THEN phi(i,j) = $
                  (phi(i-1,j) + phi(i+1,j) + $
                  phi(i,j-1) + phi(i,j+1))/4. 
            ENDFOR
         ENDFOR ;  if (iter mod 10) eq 0 THEN contour,phi,/follow, $ ;try
fill as opposed to follow
         IF (iter mod 1) eq 0 THEN BEGIN
            contour,phi,/follow, $
               levels=[0.001,findgen(10)+1.]
            bycen = phi(5,6)-phi(5,5)
           byside = phi(4,6) - phi(4,5); 
            print,'bycen, byside, non-uniformity = ', $
               bycen,byside, abs(byside-bycen)/bycen
            read,string1
         ENDIF
      ENDFOR
   save 
END