XC Open source finite element analysis program
TrussSection.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.9 $
48 // $Date: 2003/03/17 19:33:47 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/truss/TrussSection.h,v $
50 
51 
52 #ifndef TrussSection_h
53 #define TrussSection_h
54 
55 // File: ~/element/truss/TrussSection.h
56 //
57 // Written: fmk
58 // Created: 07/98
59 // Revision: A
60 //
61 // Description: This file contains the class definition for Truss. A Truss
62 // object provides the abstraction of the small deformation bar element.
63 // Each truss object is assocaited with a section object. This Truss element
64 // will work in 1d, 2d or 3d problems.
65 //
66 // What: "@(#) Truss.h, revA"
67 
68 #include "TrussBase.h"
69 #include <utility/matrix/Matrix.h>
70 
71 namespace XC {
72 class Channel;
73 class SectionForceDeformation;
74 
76 //
78 class TrussSection : public TrussBase
79  {
80  private:
81  SectionForceDeformation *theSection;
82  double computeCurrentStrain(void) const;
83  protected:
84  int sendData(CommParameters &cp);
85  int recvData(const CommParameters &cp);
86  public:
87  TrussSection(int tag, int dimension, int Nd1, int Nd2, SectionForceDeformation &theSection);
88  TrussSection(int tag,int dimension,const Material *ptr_mat);
89  TrussSection(void);
90  Element *getCopy(void) const;
91  ~TrussSection(void);
92 
93  // public methods to obtain inforrmation about dof & connectivity
94  void setDomain(Domain *theDomain);
95 
96  // public methods to set the state of the element
97  int commitState(void);
98  int revertToLastCommit(void);
99  int revertToStart(void);
100  int update(void);
101 
102  const Material *getMaterial(void) const;
103  Material *getMaterial(void);
104  virtual double getRho(void) const;
105 
106  // public methods to obtain stiffness, mass, damping and residual information
107  const Matrix &getTangentStiff(void) const;
108  const Matrix &getInitialStiff(void) const;
109  const Matrix &getMass(void) const;
110 
111  int addLoad(ElementalLoad *theLoad, double loadFactor);
112  int addInertiaLoadToUnbalance(const Vector &accel);
113 
114  const Vector &getResistingForce(void) const;
115  const Vector &getResistingForceIncInertia(void) const;
116 
117  // public methods for element output
118  int sendSelf(CommParameters &);
119  int recvSelf(const CommParameters &);
120  void Print(std::ostream &s, int flag =0);
121 
122  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
123  int getResponse(int responseID, Information &eleInformation);
124 
125  int setParameter(const std::vector<std::string> &argv, Parameter &param);
126  int updateParameter (int parameterID, Information &info);
127  };
128 } // end of XC namespace
129 
130 #endif
Truss element with SectionForceDeformation material.
Definition: TrussSection.h:78
int update(void)
Actualiza el estado of the element.
Definition: TrussSection.cpp:216
Base class for materials.
Definition: Material.h:85
int commitState(void)
Consuma el estado of the element.
Definition: TrussSection.cpp:196
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
Definition: Vector.h:82
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: TrussSection.cpp:477
Information about an element.
Definition: Information.h:80
Element * getCopy(void) const
Virtual constructor.
Definition: TrussSection.cpp:118
Base calass for the finite elements.
Definition: Element.h:104
Base class for loads over elements.
Definition: ElementalLoad.h:73
Definition: Matrix.h:82
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: TrussSection.cpp:135
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: TrussSection.cpp:469
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: TrussSection.cpp:508
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: TrussSection.cpp:328
Definition: Parameter.h:65
virtual double getRho(void) const
Return the densidad of the section.
Definition: TrussSection.cpp:324
Base class for force deformation section models. Constitutive equations of the section.
Definition: SectionForceDeformation.h:86
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: TrussSection.cpp:439
Definition: Response.h:71
Base class for truss elements.
Definition: TrussBase.h:41