XC Open source finite element analysis program
Information.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.6 $
48 // $Date: 2003/02/25 23:32:43 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/Information.h,v $
50 
51 
52 // Written: fmk
53 // Created: 10/99
54 // Revision: A
55 //
56 // Description: This file contains the class definition for Information.
57 // Information is a class in which all data members are public, i.e. basically
58 // a struct.
59 //
60 // What: "@(#) Information.h, revA"
61 
62 #ifndef Information_h
63 #define Information_h
64 
65 #include "utility/actor/actor/MovableObject.h"
66 #include <fstream>
67 
68 namespace XC {
69 class Matrix;
70 class Vector;
71 class BJtensor;
72 class ID;
73 
74 enum InfoType {UnknownType, IntType, DoubleType,
75  IdType, VectorType, MatrixType, TensorType};
76 
78 //
81  {
82  public:
83  // data that is stored in the information object
84  InfoType theType; // information about data type
85  int theInt; // an integer value
86  double theDouble; // a double value
87  ID *theID; // pointer to an ID object, created elsewhere
88  Vector *theVector;// pointer to a Vector object, created elsewhere
89  Matrix *theMatrix;// pointer to a Matrix object, created elsewhere
90  BJtensor *theTensor;// pointer to a Tensor object, created elsewhere
91 
92  int sendData(CommParameters &);
93  int recvData(const CommParameters &);
94 
95  Information(void);
96  Information(int val);
97  Information(double val);
98  Information(const ID &val);
99  Information(const Vector &val);
100  Information(const Matrix &val);
101  Information(const BJtensor &val);
102 
103  virtual ~Information();
104 
105  virtual int setInt(int newInt);
106  virtual int setDouble(double newDouble);
107  virtual int setID(const ID &newID);
108  virtual int setVector(const Vector &newVector);
109  virtual int setMatrix(const Matrix &newMatrix);
110  virtual int setTensor(const BJtensor &newTensor);
111 
112  int sendSelf(CommParameters &);
113  int recvSelf(const CommParameters &);
114 
115  virtual void Print(std::ostream &s, int flag = 0);
116  virtual void Print(std::ofstream &s, int flag = 0);
117  virtual const Vector &getData(void);
118  };
119 } // end of XC namespace
120 
121 #endif
122 
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: Information.cpp:227
Definition: BJtensor.h:110
Definition: Vector.h:82
Information about an element.
Definition: Information.h:80
Object that can move between processes.
Definition: MovableObject.h:91
Definition: ID.h:77
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: Information.cpp:184
Definition: Matrix.h:82
Communication parameters between processes.
Definition: CommParameters.h:65
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: Information.cpp:213
================================================================================
Definition: ContinuaReprComponent.h:34
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: Information.cpp:198