Basic HTML version of Foils prepared 2 September 1997

Foil 32 Programming with Guard Rings - Sequential

From CPS615 Laplace Example -- Programming Models and Performance CPS615 Basic Simulation Track for Computational Science -- Fall Semester 97. by Geoffrey C. Fox


1 In sequential case, one could dimension array PHI(F) to PHI(14,14) to hold updated points only. However then points on the edge would need special treatment so that one uses boundary values in update
2 Rather dimension PHI(16,16) to include internal and boundary points
  • Run loops over x(I) and y(J) from 2 to 15 to only cover internal points
  • Preload boundary values in PHI(1, . ), PHI( . , 16),PHI( . ,1),
  • PHI( . ,16)
  • This is easier and faster as no conditionals (IF statements) in inner loops

in Table To:


© on Tue Oct 7 1997