XC Open source finite element analysis program
MPI_Channel.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.2 $
48 // $Date: 2003/10/15 00:26:32 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/actor/channel/MPI_Channel.h,v $
50 
51 
52 // Written: fmk 11/95
53 // Revised:
54 //
55 // Purpose: This file contains the class definition for MPI_Channel.
56 
57 #ifndef MPI_Channel_h
58 #define MPI_Channel_h
59 
60 #include <utility/actor/channel/Channel.h>
61 #include <mpi/mpi.h>
62 
63 namespace XC {
65 //
69 class MPI_Channel: public Channel
70  {
71  private:
72  int otherTag;
73  MPI_Comm otherComm;
74  public:
75  MPI_Channel(int otherProcess);
76 
77  char *addToProgram(void);
78 
79  virtual int setUpConnection(void);
80 
81  int setNextAddress(const ChannelAddress &otherChannelAddress);
82  virtual ChannelAddress *getLastSendersAddress(void);
83 
84  int sendObj(int commitTag,MovableObject &theObject, ChannelAddress *theAddress =0);
85 
86  int recvObj(int commitTag,MovableObject &theObject, FEM_ObjectBroker &theBroker,ChannelAddress *theAddress =0);
87 
88  int recvMsg(int dbTag, int commitTag, Message &, ChannelAddress *theAddress =0);
89  int sendMsg(int dbTag, int commitTag, const Message &, ChannelAddress *theAddress =0);
90 
91  int sendMatrix(int dbTag, int commitTag, const Matrix &, ChannelAddress *theAddress =0);
92  int recvMatrix(int dbTag, int commitTag, Matrix &, ChannelAddress *theAddress =0);
93 
94  int sendVector(int dbTag, int commitTag, const Vector &, ChannelAddress *theAddress =0);
95  int recvVector(int dbTag, int commitTag, Vector &, ChannelAddress *theAddress =0);
96 
97  int sendID(int dbTag, int commitTag, const ID &, ChannelAddress *theAddress =0);
98  int recvID(int dbTag, int commitTag, ID &, ChannelAddress *theAddress =0);
99  };
100 } // end of XC namespace
101 
102 
103 #endif
104 
105 
106 
107 
108 
109 
110 
111 
Definition: Vector.h:82
int sendMatrix(int dbTag, int commitTag, const Matrix &, ChannelAddress *theAddress=0)
Method to send a XC::Matrix to an address given by other_Addr.
Definition: MPI_Channel.cpp:283
int sendVector(int dbTag, int commitTag, const Vector &, ChannelAddress *theAddress=0)
Method to send a Vector to an address given by other_Addr.
Definition: MPI_Channel.cpp:363
MPI_Channel is a sub-class of channel. It is implemented with Berkeley stream sockets using the TCP p...
Definition: MPI_Channel.h:69
FEM_ObjectBroker is is an object broker class for the finite element method. All methods are virtual ...
Definition: FEM_ObjectBroker.h:138
Definition: ChannelAddress.h:69
Object that can move between processes.
Definition: MovableObject.h:91
Definition: ID.h:77
Definition: Matrix.h:82
Channel is an abstract base class which defines the channel interface. A channel is a point of commun...
Definition: Channel.h:85
Message between processes.
Definition: Message.h:67
================================================================================
Definition: ContinuaReprComponent.h:34