
#include "jacobi.decl.h"

class DataMsg : public CMessage_DataMsg, public ArrayMessage {
public:
  int fromLeft;
  int size;
  double b[200]; // border up to 200 elements can be sent. use varsize later.
};


class main : public Chare
{
private:
  CkAID A;

public:
  main(CkArgMsg *m);
  void allDone(CkQdMsg *);
};

class jacobi: public ArrayElement 

{
private:
  int count; 
  int iterations;
  char data[50];
  void sendToNeighbors();

public:
   jacobi(ArrayElementCreateMessage *m);
   jacobi(ArrayElementMigrateMessage *m);
   void borderValues(DataMsg *m); 
};
