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/Element1D.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 std::string &);
66  virtual void setSection(const PrismaticBarCrossSection *sccModel);
67  bool setSections(const std::vector<PrismaticBarCrossSection *> &sectionPtrs);
68  inline size_t getNumSections(void) const
69  { return theSections.size(); }
70  inline PrismaticBarCrossSectionsVector &getSections(void)
71  { return theSections; }
72 
73  Response *setSectionResponse(PrismaticBarCrossSection *,const std::vector<std::string> &,const size_t &,Information &);
74  int setSectionParameter(PrismaticBarCrossSection *,const std::vector<std::string> &,const size_t &, Parameter &);
75 
76  virtual double getRho(void) const
77  { return rho; }
78  virtual void setRho(const double &r)
79  { rho= r; }
80 
81  // public methods to set the state of the element
82  int commitState(void);
83  int revertToLastCommit(void);
84  int revertToStart(void);
85 
86  void zeroLoad(void);
87  };
88 
89 } //end of XC namespace
90 #endif
Vector of pointers to PrismaticBarCrossSectiones.
Definition: PrismaticBarCrossSectionsVector.h:49
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: BeamColumnWithSectionFD.cc:159
void set_material(const Material *m)
Try to set the element material by downcasting the pointer argument.
Definition: BeamColumnWithSectionFD.cc:95
void setMaterial(const std::string &)
Set the element material.
Definition: BeamColumnWithSectionFD.cc:115
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 cross sections.
Definition: PrismaticBarCrossSection.h:50
Base class for materials.
Definition: Material.h:93
double rho
Density per unit length.
Definition: BeamColumnWithSectionFD.h:50
Base class for one-dimensional elements (beam,truss,...)
Definition: Element1D.h:52
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:131
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:169
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