xc
BaseElasticSection.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 //BaseElasticSection.h
29 
30 #ifndef BaseElasticSection_h
31 #define BaseElasticSection_h
32 
33 #include <material/section/PrismaticBarCrossSection.h>
34 #include <utility/matrix/Vector.h>
35 
36 namespace XC {
37 
41 //
43 //
46  {
47  protected:
51 
52  int sendData(Communicator &);
53  int recvData(const Communicator &);
54  bool isEqual(const BaseElasticSection &) const;
55 
56  public:
57  BaseElasticSection(int tag,int classTag,const size_t &dim,MaterialHandler *mat_ldr= nullptr);
58 
59  int commitState(void);
60  int revertToLastCommit (void);
61  int revertToStart (void);
62 
63  virtual void sectionGeometry(const std::string &)= 0;
64 
66  inline Vector &getTrialSectionDeformation(void)
67  { return eTrial; }
69  inline const Vector &getInitialSectionDeformation(void) const
70  { return eInic; }
71  void zeroInitialSectionDeformation(void)
72  { eInic.Zero(); }
73  const Vector &getSectionDeformation(void) const;
74  virtual double getRho(void) const= 0;
75  virtual void setRho(const double &)= 0;
76 
77  boost::python::dict getPyDict(void) const;
78  void setPyDict(const boost::python::dict &);
79  void Print(std::ostream &s, int flag =0) const;
80  };
81 } // end of XC namespace
82 
83 #endif
int revertToStart(void)
Revert to the initial state.
Definition: BaseElasticSection.cc:77
Float vector abstraction.
Definition: Vector.h:94
Vector eInic
section initial deformations
Definition: BaseElasticSection.h:49
bool isEqual(const BaseElasticSection &) const
Return true if both objects are equal.
Definition: BaseElasticSection.cc:46
int commitState(void)
Commits the section state.
Definition: BaseElasticSection.cc:63
int revertToLastCommit(void)
Revert to the last committed state.
Definition: BaseElasticSection.cc:70
Base class for cross sections with linear elastic material.
Definition: BaseElasticSection.h:45
int setInitialSectionDeformation(const Vector &)
Set the initial (generalized) deformation of the section.
Definition: BaseElasticSection.cc:84
Communication parameters between processes.
Definition: Communicator.h:66
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:50
void Zero(void)
Zeros out the Vector, i.e.
Definition: Vector.h:263
Vector eTrial
section trial deformations
Definition: BaseElasticSection.h:48
void Print(std::ostream &s, int flag=0) const
Printing.
Definition: BaseElasticSection.cc:166
virtual double getRho(void) const =0
Returns the density (mass per unit length/area/volume) of the section.
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: BaseElasticSection.cc:144
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: BaseElasticSection.cc:134
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: BaseElasticSection.cc:124
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: BaseElasticSection.cc:154
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
const Vector & getSectionDeformation(void) const
Returns the current value of the (generalized) deformation.
Definition: BaseElasticSection.cc:116
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
BaseElasticSection(int tag, int classTag, const size_t &dim, MaterialHandler *mat_ldr=nullptr)
Constructor.
Definition: BaseElasticSection.cc:42
int setTrialSectionDeformation(const Vector &)
Set the trial (generalized) deformation of the section.
Definition: BaseElasticSection.cc:109
Vector eCommit
section committed deformations
Definition: BaseElasticSection.h:50