
#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;
  CellData *data;
  void sendToNeighbors(void);

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