xc
BeamColumnWithSectionFD.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 //BeamColumnWithSectionFDs.h
29 
30 #ifndef BeamColumnWithSectionFD_h
31 #define BeamColumnWithSectionFD_h
32 
33 #include "domain/mesh/element/truss_beam_column/BeamColumn.h"
34 #include "material/section/PrismaticBarCrossSectionsVector.h"
35 #include "SectionMatrices.h"
36 
37 
38 namespace XC {
39 
41 //
44  {
45  protected:
47 
48 
49  SectionMatrices section_matrices;
50  double rho;
51 
52  int sendData(Communicator &comm);
53  int recvData(const Communicator &comm);
54  void set_material(const Material *m);
55  public:
56  BeamColumnWithSectionFD(int tag, int classTag,const size_t &numSecc= 1);
57  BeamColumnWithSectionFD(int tag, int classTag,const size_t &numSecc,const Material *m);
58  BeamColumnWithSectionFD(int tag, int classTag,const size_t &numSecc,const PrismaticBarCrossSection *sccModel);
59  BeamColumnWithSectionFD(int tag, int classTag,const size_t &numSecc,const PrismaticBarCrossSection *sccModel,int Nd1,int Nd2);
60 
61  const PrismaticBarCrossSection *getSectionPtr(const size_t &i) const;
62 
63  void setTrialSectionDeformations(const std::vector<Vector> &vs);
64 
65  void setMaterial(const Material &);
66  void setMaterial(const std::string &);
67  virtual void setSection(const PrismaticBarCrossSection *sccModel);
68  bool setSections(const std::vector<PrismaticBarCrossSection *> &sectionPtrs);
69  inline size_t getNumSections(void) const
70  { return theSections.size(); }
71  inline PrismaticBarCrossSectionsVector &getSections(void)
72  { return theSections; }
73 
74  Response *setSectionResponse(PrismaticBarCrossSection *,const std::vector<std::string> &,const size_t &,Information &);
75  int setSectionParameter(PrismaticBarCrossSection *,const std::vector<std::string> &,const size_t &, Parameter &);
76 
77  virtual double getRho(void) const
78  { return rho; }
79  virtual void setRho(const double &r)
80  { rho= r; }
81 
82  // public methods to set the state of the element
83  int commitState(void);
84  int revertToLastCommit(void);
85  int revertToStart(void);
86 
87  void zeroLoad(void);
88  };
89 
90 } //end of XC namespace
91 #endif
Vector of pointers to PrismaticBarCrossSectiones.
Definition: PrismaticBarCrossSectionsVector.h:49
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: BeamColumnWithSectionFD.cc:166
void set_material(const Material *m)
Try to set the element material by downcasting the pointer argument.
Definition: BeamColumnWithSectionFD.cc:95
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
Base class for Beam-column elements with PrismaticBarCrossSection material.
Definition: BeamColumn.h:45
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:53
Base class for materials.
Definition: Material.h:93
double rho
Density per unit length.
Definition: BeamColumnWithSectionFD.h:50
void setMaterial(const Material &)
Set the element material.
Definition: BeamColumnWithSectionFD.cc:116
int revertToLastCommit(void)
Revert the state of element to its last commit.
Definition: BeamColumnWithSectionFD.cc:76
void zeroLoad(void)
Zeroes loads on element.
Definition: BeamColumnWithSectionFD.cc:55
PrismaticBarCrossSectionsVector theSections
pointers to the PrismaticBarCrossSection objects
Definition: BeamColumnWithSectionFD.h:46
const PrismaticBarCrossSection * getSectionPtr(const size_t &i) const
Returns a pointer to the i-th section of the element.
Definition: BeamColumnWithSectionFD.cc:138
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int commitState(void)
Commit the current element state.
Definition: BeamColumnWithSectionFD.cc:61
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: BeamColumnWithSectionFD.cc:176
Parameter.
Definition: Parameter.h:68
int revertToStart(void)
Revert the state of element to initial.
Definition: BeamColumnWithSectionFD.cc:86
Matrices for each section (used in BeamColumnWithSectionFD)
Definition: SectionMatrices.h:42
Beam-column element with PrismaticBarCrossSection material.
Definition: BeamColumnWithSectionFD.h:43