xc
TrussSection.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 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.9 $
49 // $Date: 2003/03/17 19:33:47 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/truss/TrussSection.h,v $
51 
52 
53 #ifndef TrussSection_h
54 #define TrussSection_h
55 
56 // File: ~/element/truss/TrussSection.h
57 //
58 // Written: fmk
59 // Created: 07/98
60 // Revision: A
61 //
62 // Description: This file contains the class definition for Truss. A Truss
63 // object provides the abstraction of the small deformation bar element.
64 // Each truss object is associated with a section object. This Truss element
65 // will work in 1d, 2d or 3d problems.
66 //
67 // What: "@(#) Truss.h, revA"
68 
69 #include "TrussBase.h"
70 #include <utility/matrix/Matrix.h>
71 #include "domain/mesh/element/utils/physical_properties/SectionFDPhysicalProperties.h"
72 
73 namespace XC {
74 
76 //
78 class TrussSection: public TrussBase
79  {
80  private:
81  SectionFDPhysicalProperties physicalProperties;
82 
83  double persistentInitialDeformation;
84 
85  double computeCurrentStrain(void) const;
86  protected:
87  DbTagData &getDbTagData(void) const;
88  int sendData(Communicator &comm);
89  int recvData(const Communicator &comm);
90  public:
91  TrussSection(int tag, int dimension, int Nd1, int Nd2, SectionForceDeformation &);
92  TrussSection(int tag,int dimension,const Material *ptr_mat);
93  TrussSection(void);
94  Element *getCopy(void) const;
95  inline virtual ~TrussSection(void) {}
96 
97  // public methods to obtain information about dof & connectivity
98  void setDomain(Domain *theDomain);
99 
100  // Element birth and death stuff.
101  const double &getPersistentInitialSectionDeformation(void) const;
103 
104  // public methods to set the state of the element
105  int commitState(void);
106  int revertToLastCommit(void);
107  int revertToStart(void);
108  int update(void);
109 
110  const Material *getMaterial(void) const;
111  Material *getMaterial(void);
112  virtual double getRho(void) const;
113  double getLinearRho(void) const;
114 
115  // public methods to obtain stiffness, mass, damping and residual information
116  const Matrix &getTangentStiff(void) const;
117  const Matrix &getInitialStiff(void) const;
118  const Matrix &getMass(void) const;
119 
120  void alive(void);
121  void zeroLoad(void);
122  int addLoad(ElementalLoad *, double loadFactor);
123  int addInertiaLoadToUnbalance(const Vector &accel);
124 
125  double getAxialForce(void) const;
126  const Vector &getResistingForce(void) const;
127  const Vector &getResistingForceIncInertia(void) const;
128  double getInitialStrain(void) const;
129 
130  // public methods for element output
131  int sendSelf(Communicator &);
132  int recvSelf(const Communicator &);
133  void Print(std::ostream &s, int flag =0) const;
134 
135  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
136  int getResponse(int responseID, Information &eleInformation);
137 
138  int setParameter(const std::vector<std::string> &argv, Parameter &param);
139  int updateParameter (int parameterID, Information &info);
140  };
141 } // end of XC namespace
142 
143 #endif
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: TrussSection.cpp:576
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: TrussSection.cpp:609
Float vector abstraction.
Definition: Vector.h:94
Element * getCopy(void) const
Virtual constructor.
Definition: TrussSection.cpp:120
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: TrussSection.cpp:722
Base class response objects.
Definition: Response.h:81
const double & getPersistentInitialSectionDeformation(void) const
Returns the value of the persistent (does not get wiped out by zeroLoad) initial deformation of the s...
Definition: TrussSection.cpp:125
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: TrussSection.cpp:530
TrussSection(void)
Default constructor.
Definition: TrussSection.cpp:112
const Material * getMaterial(void) const
Return the element material.
Definition: TrussSection.cpp:342
Base class for materials.
Definition: Material.h:93
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
double getLinearRho(void) const
Returns the element mass per unit length.
Definition: TrussSection.cpp:354
int revertToLastCommit(void)
Reverts the element to its last committed state.
Definition: TrussSection.cpp:216
int update(void)
Updates the element state.
Definition: TrussSection.cpp:233
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: TrussSection.cpp:259
virtual double getRho(void) const
Return the density of the section.
Definition: TrussSection.cpp:350
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: TrussSection.cpp:568
Base class for the finite elements.
Definition: Element.h:112
int revertToStart(void)
Reverts the element to its initial state.
Definition: TrussSection.cpp:226
void incrementPersistentInitialDeformationWithCurrentDeformation(void)
Increments the persistent (does not get wiped out by zeroLoad) initial deformation of the section...
Definition: TrussSection.cpp:132
Base class for truss elements.
Definition: TrussBase.h:42
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: TrussSection.cpp:141
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: TrussSection.cpp:561
void zeroLoad(void)
Make loads zero.
Definition: TrussSection.cpp:396
void alive(void)
Reactivates the element.
Definition: TrussSection.cpp:385
int recvSelf(const Communicator &)
Receive the object.
Definition: TrussSection.cpp:596
int commitState(void)
Commit the current element state.
Definition: TrussSection.cpp:202
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: TrussSection.cpp:791
Response * setResponse(const std::vector< std::string > &argv, Information &eleInformation)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: TrussSection.cpp:698
const Vector & getResistingForce(void) const
Return the element resisting force.
Definition: TrussSection.cpp:508
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
double getAxialForce(void) const
Return the axial internal force.
Definition: TrussSection.cpp:470
Physical properties for shells.
Definition: SectionFDPhysicalProperties.h:41
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: TrussSection.cpp:775
Matrix of floats.
Definition: Matrix.h:111
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
const Matrix & getMass(void) const
Return the element mass matrix.
Definition: TrussSection.cpp:358
double getInitialStrain(void) const
Return the element initial strain.
Definition: TrussSection.cpp:492
Truss element with SectionForceDeformation material.
Definition: TrussSection.h:78
int sendSelf(Communicator &)
Send the object.
Definition: TrussSection.cpp:583