XC Open source finite element analysis program
BodyForces.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 //BodyForces.h
28 
29 #ifndef BodyForces_h
30 #define BodyForces_h
31 
32 #include "utility/actor/actor/MovableObject.h"
33 #include "utility/matrix/Vector.h"
34 
35 namespace XC {
36 
38 //
41  {
42  protected:
44 
45  DbTagData &getDbTagData(void) const;
46  int sendData(CommParameters &);
47  int recvData(const CommParameters &);
48 
49  public:
50  BodyForces(const size_t &sz);
51 
52  inline size_t size(void) const
53  { return forces.Size(); }
54 
55  inline double &operator[](const size_t &i)
56  { return forces[i]; }
57  inline const double &operator[](const size_t &i) const
58  { return forces[i]; }
59  inline double &operator()(const size_t &i)
60  { return forces(i); }
61  inline const double &operator()(const size_t &i) const
62  { return forces(i); }
63 
64  int sendSelf(CommParameters &);
65  int recvSelf(const CommParameters &);
66 
67  virtual void Print(std::ostream &s) const;
68  };
69 
70 inline std::ostream &operator<<(std::ostream &os,const BodyForces &bf)
71  {
72  bf.Print(os);
73  return os;
74  }
75 } //end of XC namespace
76 
77 #endif
Body forces over an element.
Definition: BodyForces.h:40
Vector forces
Body force components.
Definition: BodyForces.h:43
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: BodyForces.cc:50
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: BodyForces.cc:43
int sendSelf(CommParameters &)
Sends object.
Definition: BodyForces.cc:57
Definition: Vector.h:82
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
Object that can move between processes.
Definition: MovableObject.h:91
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: BodyForces.cc:36
virtual void Print(std::ostream &s) const
Sends object.
Definition: BodyForces.cc:85
int recvSelf(const CommParameters &)
Receives object.
Definition: BodyForces.cc:71
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34