xc
TrussPrestressLoad.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 //TrussPrestressLoad.h
29 
30 #ifndef TrussPrestressLoad_h
31 #define TrussPrestressLoad_h
32 
33 #include "domain/load/ElementBodyLoad.h"
34 
35 namespace XC {
37 //
40  {
41  private:
42  double sg1;
43  double sg2;
44  protected:
45  DbTagData &getDbTagData(void) const;
46  int sendData(Communicator &comm);
47  int recvData(const Communicator &comm);
48  public:
49  // Constructors based on 2 temperature changes given
50  TrussPrestressLoad(int tag, const double &sg1, const double &sg2, const ID &theElementTags);
51  TrussPrestressLoad(int tag, const double &e_uniform, const ID &theElementTags);
52  TrussPrestressLoad(int tag, const ID &theElementTags);
53  TrussPrestressLoad(int tag);
54  TrussPrestressLoad(void);
55 
56  std::string Category(void) const;
57 
58  inline const double &getSigma1(void) const
59  { return sg1; }
60  inline void setSigma1(const double &d)
61  { sg1= d; }
62  inline const double &getSigma2(void) const
63  { return sg2; }
64  inline void setSigma2(const double &d)
65  { sg2= d; }
66  const Vector &getData(int &type, const double &loadFactor) const;
67  std::vector<XC::Vector> getStresses(void) const;
69 
70  int sendSelf(Communicator &);
71  int recvSelf(const Communicator &);
72  void Print(std::ostream &s, int flag =0) const;
73 
74  };
75 } // end of XC namespace
76 
77 #endif
78 
Float vector abstraction.
Definition: Vector.h:94
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: TrussPrestressLoad.cc:105
Base class for body loads over elements.
Definition: ElementBodyLoad.h:44
Communication parameters between processes.
Definition: Communicator.h:66
int sendSelf(Communicator &)
Send the object.
Definition: TrussPrestressLoad.cc:127
std::string Category(void) const
Return the category of this kind of loads.
Definition: TrussPrestressLoad.cc:57
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: TrussPrestressLoad.cc:152
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
Vector of integers.
Definition: ID.h:95
TrussPrestressLoad(void)
Default constructor.
Definition: TrussPrestressLoad.cc:53
Base class for the finite elements.
Definition: Element.h:112
Load due to presstressing.
Definition: TrussPrestressLoad.h:39
Matrix getElementStressesMatrix(const Element &) const
Return the axial strains at both ends of the given truss element.
Definition: TrussPrestressLoad.cc:73
std::vector< XC::Vector > getStresses(void) const
Return the axial strains at both ends of the truss element.
Definition: TrussPrestressLoad.cc:61
int recvSelf(const Communicator &)
Receive the object.
Definition: TrussPrestressLoad.cc:139
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
int sendData(Communicator &comm)
Send data through the communicator argument.
Definition: TrussPrestressLoad.cc:112
int recvData(const Communicator &comm)
Receive data through the communicator argument.
Definition: TrussPrestressLoad.cc:120