Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

MPI_Channel.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.1.1.1 $
00022 // $Date: 2000/09/15 08:23:16 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/actor/channel/MPI_Channel.h,v $
00024                                                                         
00025                                                                         
00026 // File: ~/actor/MPI_Channel.h
00027 //
00028 // Written: fmk 11/95
00029 // Revised:
00030 //
00031 // Purpose: This file contains the class definition for MPI_Channel.
00032 // MPI_Channel is a sub-class of channel. It is implemented with Berkeley
00033 // stream sockets using the TCP protocol. Messages delivery is garaunteed. 
00034 // Communication is full-duplex between a pair of connected sockets.
00035 
00036 #ifndef MPI_Channel_h
00037 #define MPI_Channel_h
00038 
00039 #include <Channel.h>
00040 #include <mpi.h>
00041 
00043 class MPI_Channel : public Channel
00044 {
00045   public:
00047     MPI_Channel(int otherProcess);        
00049     ~MPI_Channel();
00050 
00052     char *addToProgram(void);
00053     
00055     virtual int setUpShadow(void);
00057     virtual int setUpActor(void);
00058 
00060     int setNextAddress(const ChannelAddress &otherChannelAddress);
00062     virtual ChannelAddress *getLastSendersAddress(void);
00063 
00065     int sendObj(int commitTag,
00066   MovableObject &theObject, 
00067   ChannelAddress *theAddress =0);
00068     
00070     int recvObj(int commitTag,
00071   MovableObject &theObject, 
00072   FEM_ObjectBroker &theBroker,
00073   ChannelAddress *theAddress =0);
00074 
00076     int recvMsg(int dbTag, int commitTag, Message &, ChannelAddress *theAddress =0);       
00078     int sendMsg(int dbTag, int commitTag, const Message &, ChannelAddress *theAddress =0);    
00079 
00081     int sendMatrix(int dbTag, int commitTag, const Matrix &theMatrix, ChannelAddress *theAddress =0);
00083     int recvMatrix(int dbTag, int commitTag, Matrix &theMatrix, ChannelAddress *theAddress =0);
00084     
00086     int sendVector(int dbTag, int commitTag, const Vector &theVector, ChannelAddress *theAddress =0);
00088     int recvVector(int dbTag, int commitTag, Vector &theVector, ChannelAddress *theAddress =0);
00089     
00091     int sendID(int dbTag, int commitTag, const ID &theID, ChannelAddress *theAddress =0);
00093     int recvID(int dbTag, int commitTag, ID &theID, ChannelAddress *theAddress =0);    
00094     
00095     
00096   protected:
00097  
00098   private:
00100     int otherTag;
00102     MPI_Comm otherComm;    
00103 };
00104 
00105 
00106 #endif 
00107 
00108 
00109 
00110 
00111 
00112 
00113  
00114 
00115 ÿ
Copyright Contact Us