Jacobi Code
void Ar1::doWork(int sendersID, int n, double arr[n])
{
maxChange = 0.0;
if (sendersID == thisIndex-1)
{ leftmsg = 1; // set boolean to indicate we received
the left message }
else if (sendersID == thisIndex+1)
{ rightmsg = 1; // set boolean to indicate we
received the right message }
// Rest of the code on the next slide

}