XC Open source finite element analysis program
TrussBase.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 //TrussBase.h
28 
29 #ifndef TrussBase_h
30 #define TrussBase_h
31 
32 #include "ProtoTruss.h"
33 
34 namespace XC {
35 class Channel;
36 class UniaxialMaterial;
37 
39 //
41 class TrussBase : public ProtoTruss
42  {
43  protected:
44  double L;
45  double cosX[3];
46 
47  int sendData(CommParameters &cp);
48  int recvData(const CommParameters &cp);
49  void inicializa(void);
50  void setup_L_cos_dir(void);
51  void set_load(const Vector &);
52  void alloc_load(const size_t &);
53 
54  public:
55  TrussBase(int classTag,int tag,int dimension, int Nd1, int Nd2);
56  TrussBase(int classTag,int tag,int dimension);
57  TrussBase(int classTag);
58  TrussBase(const TrussBase &);
59  TrussBase &operator=(const TrussBase &);
60 
61  const Vector *getLoad(void) const
62  { return &load; }
63  Vector *getLoad(void)
64  { return &load; }
65  const double &getL(void) const;
66 
67 
68  };
69 } // end of XC namespace
70 
71 #endif
72 
73 
74 
75 
Vector load
vector for applying loads
Definition: Element.h:129
void inicializa(void)
Pone a cero los pointers to node, los cosenos directores y los sensibility parameters.
Definition: TrussBase.cc:36
Definition: Vector.h:82
TrussBase & operator=(const TrussBase &)
Assignment operator.
Definition: TrussBase.cc:82
const double & getL(void) const
Return the longitud of the element.
Definition: TrussBase.cc:143
double cosX[3]
Cosenos directores.
Definition: TrussBase.h:45
Base class for truss elements.
Definition: ProtoTruss.h:44
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: TrussBase.cc:155
TrussBase(int classTag, int tag, int dimension, int Nd1, int Nd2)
constructor: responsible for allocating the necessary space needed by each object and storing the tag...
Definition: TrussBase.cc:58
void setup_L_cos_dir(void)
Determine the length, cosines and fill in the transformation.
Definition: TrussBase.cc:93
Communication parameters between processes.
Definition: CommParameters.h:65
double L
length of truss based on undeformed configuration.
Definition: TrussBase.h:44
================================================================================
Definition: ContinuaReprComponent.h:34
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: TrussBase.cc:147
Base class for truss elements.
Definition: TrussBase.h:41