xc
ResponseQuantities.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 //ResponseQuantities.h
29 
30 #ifndef ResponseQuantities_h
31 #define ResponseQuantities_h
32 
33 
34 #include "utility/actor/actor/MovableObject.h"
35 #include "utility/matrix/Vector.h"
36 
37 namespace XC {
38 
40 //
43  {
44  private:
45  Vector R, Rdot, Rdotdot;
46  protected:
47  int sendData(Communicator &);
48  int recvData(const Communicator &);
49  public:
50  ResponseQuantities(const int &size= 0);
51 
52  inline size_t size(void) const
53  { return R.Size(); }
54  inline const Vector &get(void) const
55  { return R; }
56  inline const Vector &getDot(void) const
57  { return Rdot; }
58  inline const Vector &getDotDot(void) const
59  { return Rdotdot; }
60  inline Vector &get(void)
61  { return R; }
62  inline Vector &getDot(void)
63  { return Rdot; }
64  inline Vector &getDotDot(void)
65  { return Rdotdot; }
66  inline void set(const Vector &v)
67  { R= v; }
68  inline void setDot(const Vector &v)
69  { Rdot= v; }
70  inline void setDotDot(const Vector &v)
71  { Rdotdot= v; }
72 
73  void setDisp(const ID &,const Vector &);
74  void setVel(const ID &,const Vector &);
75  void setAccel(const ID &,const Vector &);
76 
77  inline const Vector &getDisp(void) const
78  { return R; }
79  inline const Vector &getVel(void) const
80  { return Rdot; }
81  inline const Vector &getAccel(void) const
82  { return Rdotdot; }
83 
84  void resize(const int &size);
85  void Zero(void);
86 
87  virtual int sendSelf(Communicator &);
88  virtual int recvSelf(const Communicator &);
89 
90  void Print(std::ostream &s) const;
91  };
92 } // end of XC namespace
93 
94 #endif
95 
virtual int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ResponseQuantities.cc:119
Float vector abstraction.
Definition: Vector.h:94
Communication parameters between processes.
Definition: Communicator.h:66
Object that can move between processes.
Definition: MovableObject.h:100
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: ResponseQuantities.cc:85
Vector of integers.
Definition: ID.h:95
virtual int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ResponseQuantities.cc:105
int Size(void) const
Returns the size of the Vector.
Definition: Vector.h:235
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Response quantities.
Definition: ResponseQuantities.h:42
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: ResponseQuantities.cc:95