xc
Shadow.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.3 $
49 // $Date: 2005/11/23 18:25:17 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/actor/shadow/Shadow.h,v $
51 
52 
53 // Written: fmk
54 // Revision: A
55 //
56 // Purpose: This file contains the class definition for Shadow.
57 // Shadow is meant to be an abstract base class and thus no objects of it's type
58 // can be instantiated.
59 //
60 // What: "@(#) Shadow.h, revA"
61 
62 #ifndef Shadow_h
63 #define Shadow_h
64 
65 #include "utility/actor/ShadowActorBase.h"
66 
67 
68 namespace XC {
69 class MachineBroker;
70 class Message;
71 class Channel;
72 class ChannelAddress;
73 class MovableObject;
74 class Matrix;
75 class Vector;
76 class ID;
77 
78 class FEM_ObjectBroker;
79 
91 class Shadow: public ShadowActorBase
92  {
93  private:
94  ChannelAddress *theRemoteActorsAddress;
95  public:
97 
98  Shadow(Channel &theChannel, FEM_ObjectBroker &, ChannelAddress &theAddress);
99 
100  Shadow(int actorType, FEM_ObjectBroker &, MachineBroker &, int compDemand);
101 
102  virtual int sendObject(MovableObject &theObject);
103  virtual int recvObject(MovableObject &theObject);
104  virtual int sendMessage(const Message &theMessage);
105  virtual int recvMessage(Message &theMessage);
106  virtual int sendMatrix(const Matrix &theMatrix);
107  virtual int recvMatrix(Matrix &theMatrix);
108  virtual int sendVector(const Vector &theVector);
109  virtual int recvVector(Vector &theVector);
110  virtual int sendID(const ID &theID);
111  virtual int recvID(ID &theID);
112 
113  ChannelAddress *getActorAddressPtr(void) const;
114  };
115 } // end of XC namespace
116 
117 #endif
Float vector abstraction.
Definition: Vector.h:94
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:100
Channel * theChannel
Communication channel to use.
Definition: ShadowActorBase.h:52
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:151
Vector of integers.
Definition: ID.h:95
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:47
virtual int recvMessage(Message &theMessage)
Send message.
Definition: Shadow.cpp:127
Local object associated with an remote actor.
Definition: Shadow.h:91
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:92
Message between processes.
Definition: Message.h:77
A MachineBroker is responsible for getting an actor process running on the parallel machine...
Definition: MachineBroker.h:77
virtual int recvID(ID &theID)
Receive integer vector.
Definition: Shadow.cpp:204
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Base class for classes that encapsulate channel addresses.
Definition: ChannelAddress.h:78
Matrix of floats.
Definition: Matrix.h:111