xc
Shadow.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.3 $
48 // $Date: 2005/11/23 18:25:17 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/actor/shadow/Shadow.h,v $
50 
51 
52 // Written: fmk
53 // Revision: A
54 //
55 // Purpose: This file contains the class definition for Shadow.
56 // Shadow is meant to be an abstract base class and thus no objects of it's type
57 // can be instantiated.
58 //
59 // What: "@(#) Shadow.h, revA"
60 
61 #ifndef Shadow_h
62 #define Shadow_h
63 
64 #include "utility/actor/ShadowActorBase.h"
65 
66 
67 namespace XC {
68 class MachineBroker;
69 class Message;
70 class Channel;
71 class ChannelAddress;
72 class MovableObject;
73 class Matrix;
74 class Vector;
75 class ID;
76 
77 class FEM_ObjectBroker;
78 
90 class Shadow: public ShadowActorBase
91  {
92  private:
93  ChannelAddress *theRemoteActorsAddress;
94  public:
96 
97  Shadow(Channel &theChannel, FEM_ObjectBroker &, ChannelAddress &theAddress);
98 
99  Shadow(int actorType, FEM_ObjectBroker &, MachineBroker &, int compDemand);
100 
101  virtual int sendObject(MovableObject &theObject);
102  virtual int recvObject(MovableObject &theObject);
103  virtual int sendMessage(const Message &theMessage);
104  virtual int recvMessage(Message &theMessage);
105  virtual int sendMatrix(const Matrix &theMatrix);
106  virtual int recvMatrix(Matrix &theMatrix);
107  virtual int sendVector(const Vector &theVector);
108  virtual int recvVector(Vector &theVector);
109  virtual int sendID(const ID &theID);
110  virtual int recvID(ID &theID);
111 
112  ChannelAddress *getActorAddressPtr(void) const;
113  };
114 } // end of XC namespace
115 
116 #endif
Float vector abstraction.
Definition: Vector.h:93
virtual int sendMessage(const Message &theMessage)
Receive message.
Definition: Shadow.cpp:138
virtual int recvObject(MovableObject &theObject)
Receive object.
Definition: Shadow.cpp:115
Shadow(Channel &theChannel, FEM_ObjectBroker &)
Constructor.
Definition: Shadow.cpp:76
Object that can move between processes.
Definition: MovableObject.h:99
Channel * theChannel
Communication channel to use.
Definition: ShadowActorBase.h:51
ChannelAddress * getActorAddressPtr(void) const
Return a pointer to the channel in the actors address space.
Definition: Shadow.cpp:210
virtual int recvVector(Vector &theVector)
Receive vector.
Definition: Shadow.cpp:182
virtual int sendMatrix(const Matrix &theMatrix)
Send matrix.
Definition: Shadow.cpp:149
FEM_ObjectBroker is is an object broker class for the finite element method.
Definition: FEM_ObjectBroker.h:145
Vector of integers.
Definition: ID.h:93
virtual int sendVector(const Vector &theVector)
Send vector.
Definition: Shadow.cpp:171
virtual int sendObject(MovableObject &theObject)
Send object.
Definition: Shadow.cpp:106
virtual int sendID(const ID &theID)
Send integer vector.
Definition: Shadow.cpp:193
Base class for Actor and Shadow objects.
Definition: ShadowActorBase.h:46
virtual int recvMessage(Message &theMessage)
Send message.
Definition: Shadow.cpp:127
Local object associated with an actor.
Definition: Shadow.h:90
virtual int recvMatrix(Matrix &theMatrix)
Receive matrix.
Definition: Shadow.cpp:160
Channel is an abstract base class which defines the channel interface.
Definition: Channel.h:91
Message between processes.
Definition: Message.h:76
A MachineBroker is responsible for getting an actor process running on the parallel machine...
Definition: MachineBroker.h:76
virtual int recvID(ID &theID)
Receive integer vector.
Definition: Shadow.cpp:204
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Definition: ChannelAddress.h:69
Matrix of floats.
Definition: Matrix.h:108