xc
VectorReinfBar.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 //VectorReinfBars.h
29 
30 #ifndef VectorReinfBar_h
31 #define VectorReinfBar_h
32 
33 #include <vector>
34 #include <iostream>
35 #include "material/section/repres/SectionMassProperties.h"
36 
37 class Pos2d;
38 
39 namespace XC {
40 
41 class ReinfBar;
42 class Vector;
43 class Matrix;
44 
46 //
48 class VectorReinfBar: public std::vector<ReinfBar *>, public SectionMassProperties
49  {
50  public:
51  typedef std::vector<ReinfBar *> v_rfBar;
52  typedef v_rfBar::reference reference;
53  typedef v_rfBar::const_reference const_reference;
54  typedef v_rfBar::iterator iterator;
55  typedef v_rfBar::const_iterator const_iterator;
56  private:
57  void free_mem(void);
58  void free_mem(const size_t i);
59  void alloc(const size_t i,const ReinfBar &c);
60  inline reference operator[](const size_t i)
61  { return v_rfBar::operator[](i); }
62  public:
63  VectorReinfBar(const size_t &sz= 0);
66  ~VectorReinfBar(void);
67 
68  inline size_t size(void) const
69  { return v_rfBar::size(); }
70  inline size_t empty(void) const
71  { return v_rfBar::empty(); }
72  inline iterator begin(void)
73  { return v_rfBar::begin(); }
74  inline iterator end(void)
75  { return v_rfBar::end(); }
76  inline const_iterator begin(void) const
77  { return v_rfBar::begin(); }
78  inline const_iterator end(void) const
79  { return v_rfBar::end(); }
80 
81  double getAreaGrossSection(void) const;
83  double getIyGrossSection(void) const;
84  double getIzGrossSection(void) const;
85  double getPyzGrossSection(void) const;
86 
87  double getAreaHomogenizedSection(const double &E0) const;
88  Vector getCenterOfMassHomogenizedSection(const double &E0) const;
89  double getIyHomogenizedSection(const double &E0) const;
90  double getIzHomogenizedSection(const double &E0) const;
91  double getPyzHomogenizedSection(const double &E0) const;
92 
93  void resize(const size_t sz);
94 
95  void put(const size_t i,const ReinfBar &c);
96  inline const_reference operator[](const size_t i) const
97  { return v_rfBar::operator[](i); }
98 
99  void Print(std::ostream &s) const;
100 
101  };
102 
103 } // end of XC namespace
104 
105 
106 #endif
VectorReinfBar & operator=(const VectorReinfBar &)
Assignment operator.
Definition: VectorReinfBar.cc:83
Float vector abstraction.
Definition: Vector.h:94
double getIyHomogenizedSection(const double &E0) const
Returns homogenized moment of inertia of the cross-section with respecto to the axis parallel to y pa...
Definition: VectorReinfBar.cc:158
Posición en dos dimensiones.
Definition: Pos2d.h:41
double getAreaGrossSection(void) const
Return gross area of rebars.
Definition: VectorReinfBar.cc:234
double getPyzGrossSection(void) const
Product of inertia of the gross section about y and z axis through his center of gravity.
Definition: VectorReinfBar.cc:287
void resize(const size_t sz)
Resizes vector.
Definition: VectorReinfBar.cc:303
double getIyGrossSection(void) const
Inertia of the gross section about an axis parallel to y through his center of gravity.
Definition: VectorReinfBar.cc:259
double getIzGrossSection(void) const
Inertia of the gross section about an axis parallel to z through his center of gravity.
Definition: VectorReinfBar.cc:273
VectorReinfBar(const size_t &sz=0)
Constructor.
Definition: VectorReinfBar.cc:66
double getIzHomogenizedSection(const double &E0) const
Returns homogenized moment of inertia of the cross-section with respecto to the axis parallel to z pa...
Definition: VectorReinfBar.cc:183
Reinforcement bars vector.
Definition: VectorReinfBar.h:48
double getAreaHomogenizedSection(const double &E0) const
Returns the homogenized area of the regions.
Definition: VectorReinfBar.cc:101
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Cross-section representation able to return mechanical propertis a area, moments of inertia...
Definition: SectionMassProperties.h:51
double getPyzHomogenizedSection(const double &E0) const
Returns homogenized product of inertia of the cross-section with respecto to the axis parallel to y a...
Definition: VectorReinfBar.cc:208
~VectorReinfBar(void)
Destructor.
Definition: VectorReinfBar.cc:97
Reinforcing bar.
Definition: ReinfBar.h:77
Vector getCenterOfMassGrossSection(void) const
Returns gross section centroid.
Definition: VectorReinfBar.cc:243