Sequential Programming with Guard Rings
The concept of guard rings/points/”halos” is well known in sequential case where one has for a trivial example in one dimension (shown above) 16 points.
The end points are fixed boundary values
One could save space and dimension PHI(14) and use boundary values by statements for I=1,14 like
- IF( I.EQ.1) Valueonleft = BOUNDARYLEFT
- ELSE Valueonleft = PHI(I-1) etc.
But this is slower and clumsy to program due to conditionals INSIDE Loop and one dimensions instead PHI(16) storing boundary values in PHI(1) and PHI(16)
- Updates are performed as DO I =2,15
- and without any test Valueonleft = PHI(I-1)