00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef MPI_Channel_h
00035 #define MPI_Channel_h
00036
00037 #include <Channel.h>
00038 #include <mpi.h>
00039
00040 class MPI_Channel : public Channel
00041 {
00042 public:
00043 MPI_Channel(int otherProcess);
00044 ~MPI_Channel();
00045
00046 char *addToProgram(void);
00047
00048 virtual int setUpConnection(void);
00049
00050 int setNextAddress(const ChannelAddress &otherChannelAddress);
00051 virtual ChannelAddress *getLastSendersAddress(void);
00052
00053 int sendObj(int commitTag,
00054 MovableObject &theObject,
00055 ChannelAddress *theAddress =0);
00056
00057 int recvObj(int commitTag,
00058 MovableObject &theObject,
00059 FEM_ObjectBroker &theBroker,
00060 ChannelAddress *theAddress =0);
00061
00062 int recvMsg(int dbTag, int commitTag, Message &, ChannelAddress *theAddress =0);
00063 int sendMsg(int dbTag, int commitTag, const Message &, ChannelAddress *theAddress =0);
00064
00065 int sendMatrix(int dbTag, int commitTag, const Matrix &theMatrix, ChannelAddress *theAddress =0);
00066 int recvMatrix(int dbTag, int commitTag, Matrix &theMatrix, ChannelAddress *theAddress =0);
00067
00068 int sendVector(int dbTag, int commitTag, const Vector &theVector, ChannelAddress *theAddress =0);
00069 int recvVector(int dbTag, int commitTag, Vector &theVector, ChannelAddress *theAddress =0);
00070
00071 int sendID(int dbTag, int commitTag, const ID &theID, ChannelAddress *theAddress =0);
00072 int recvID(int dbTag, int commitTag, ID &theID, ChannelAddress *theAddress =0);
00073
00074
00075 protected:
00076
00077 private:
00078 int otherTag;
00079 MPI_Comm otherComm;
00080 };
00081
00082
00083 #endif
00084
00085
00086
00087
00088
00089
00090
00091