xc
CrossSectionProperties1d.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 //CrossSectionProperties2d.h
29 
30 #ifndef CrossSectionProperties1d_h
31 #define CrossSectionProperties1d_h
32 
33 #include "utility/kernel/CommandEntity.h"
34 #include "utility/actor/actor/MovableObject.h"
35 
36 namespace XC {
37 class Channel;
38 class FEM_ObjectBroker;
39 class Information;
40 class Parameter;
41 class Matrix;
42 class Vector;
43 class ID;
44 class SectionForceDeformation;
45 
47 //
52  {
53  private:
54  double e;
55  double a;
56  double rho;
57  double iw; //< Warping constant.
58  static Matrix ks;
59  protected:
60  virtual DbTagData &getDbTagData(void) const;
61  int sendData(Communicator &);
62  int recvData(const Communicator &);
63 
64  public:
65  CrossSectionProperties1d(double E, double A, double rho= 0.0);
69 
70  inline virtual int getDimension(void)
71  { return 1; }
72  bool check_values(void);
73  inline double &E(void)
74  { return e; }
75  inline const double &E(void) const
76  { return e; }
77  inline void setE(const double &ee)
78  { e= ee; }
79  inline double &A(void)
80  { return a; }
81  inline const double &A(void) const
82  { return a; }
83  inline void setA(const double &aa)
84  { a= aa; }
86  inline const double &Iw(void) const
87  { return iw; }
89  inline void setIw(const double &d)
90  { iw= d; }
91  inline double getRho(void) const
92  { return rho; }
93  inline void setRho(const double &r)
94  { rho= r; }
95  inline double getLinearRho(void) const
96  { return rho*a; }
97  void setLinearRho(const double &);
99  inline double EA(void) const
100  { return e*a; }
102  inline double EIw(void) const
103  { return e*iw; }
104 
105  const Matrix &getSectionTangent1x1(void) const;
106  const Matrix &getInitialTangent1x1(void) const;
107  const Matrix &getSectionFlexibility1x1(void) const;
108  const Matrix &getInitialFlexibility1x1(void) const;
109 
110  int sendSelf(Communicator &);
111  int recvSelf(const Communicator &);
112  boost::python::dict getPyDict(void) const;
113  void setPyDict(const boost::python::dict &);
114 
115  int setParameter(const std::vector<std::string> &,Parameter &,SectionForceDeformation *);
116  int updateParameter(int parameterID, Information &info);
117 
118  virtual void Print(std::ostream &s, int flag = 0) const;
119  };
120 
121 std::ostream &operator<<(std::ostream &,const CrossSectionProperties1d &);
122 
123 } // end of XC namespace
124 
125 #endif
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
virtual void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: CrossSectionProperties1d.cc:252
const Matrix & getSectionTangent1x1(void) const
Returns the tangent stiffness matrix.
Definition: CrossSectionProperties1d.cc:105
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: CrossSectionProperties1d.cc:187
int sendData(Communicator &)
Send members through the communicator argument.
Definition: CrossSectionProperties1d.cc:182
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Object that can move between processes.
Definition: MovableObject.h:100
void setIw(const double &d)
Set warping constant.
Definition: CrossSectionProperties1d.h:89
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
const double & Iw(void) const
Return warping constant.
Definition: CrossSectionProperties1d.h:86
void setLinearRho(const double &)
Set the linear density of the element.
Definition: CrossSectionProperties1d.cc:127
const Matrix & getSectionFlexibility1x1(void) const
Returns the flexibility matrix.
Definition: CrossSectionProperties1d.cc:116
CrossSectionProperties1d(void)
Constructor.
Definition: CrossSectionProperties1d.cc:71
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) for a bi-dimensiona...
Definition: CrossSectionProperties1d.h:51
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: CrossSectionProperties1d.cc:205
Objet that can execute python scripts.
Definition: CommandEntity.h:40
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: CrossSectionProperties1d.cc:215
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: CrossSectionProperties1d.cc:230
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: CrossSectionProperties1d.cc:164
Matrix of floats.
Definition: Matrix.h:111
Parameter.
Definition: Parameter.h:68
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: CrossSectionProperties1d.cc:194
const Matrix & getInitialFlexibility1x1(void) const
Returns the initial flexibility matrix.
Definition: CrossSectionProperties1d.cc:123
double EIw(void) const
Return warping stiffness.
Definition: CrossSectionProperties1d.h:102
virtual DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: CrossSectionProperties1d.cc:175
double EA(void) const
Return axial stiffness.
Definition: CrossSectionProperties1d.h:99
const Matrix & getInitialTangent1x1(void) const
Returns the initial tangent stiffness matrix.
Definition: CrossSectionProperties1d.cc:112