XC Open source finite element analysis program
VectorReinfBar.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //VectorReinfBars.h
28 
29 #ifndef VectorReinfBar_h
30 #define VectorReinfBar_h
31 
32 #include <vector>
33 #include <iostream>
34 #include "material/section/repres/SeccionInerte.h"
35 
36 class Pos2d;
37 
38 namespace XC {
39 
40 class ReinfBar;
41 class Vector;
42 class Matrix;
43 
45 //
47 class VectorReinfBar: public std::vector<ReinfBar *>, public SeccionInerte
48  {
49  public:
50  typedef std::vector<ReinfBar *> v_rfBar;
51  typedef v_rfBar::reference reference;
52  typedef v_rfBar::const_reference const_reference;
53  typedef v_rfBar::iterator iterator;
54  typedef v_rfBar::const_iterator const_iterator;
55  private:
56  void libera(void);
57  void libera(const size_t i);
58  void alloc(const size_t i,const ReinfBar &c);
59  inline reference operator[](const size_t i)
60  { return v_rfBar::operator[](i); }
61  public:
62  VectorReinfBar(const size_t &sz= 0);
63  VectorReinfBar(const VectorReinfBar &otro);
65  ~VectorReinfBar(void);
66 
67  inline size_t size(void) const
68  { return v_rfBar::size(); }
69  inline size_t empty(void) const
70  { return v_rfBar::empty(); }
71  inline iterator begin(void)
72  { return v_rfBar::begin(); }
73  inline iterator end(void)
74  { return v_rfBar::end(); }
75  inline const_iterator begin(void) const
76  { return v_rfBar::begin(); }
77  inline const_iterator end(void) const
78  { return v_rfBar::end(); }
79 
80  double getAreaGrossSection(void) const;
81  Vector getCdgGrossSection(void) const;
82  double getIyGrossSection(void) const;
83  double getIzGrossSection(void) const;
84  double getPyzGrossSection(void) const;
85 
86  double getAreaHomogenizedSection(const double &E0) const;
87  Vector getCdgHomogenizedSection(const double &E0) const;
88  double getIyHomogenizedSection(const double &E0) const;
89  double getIzHomogenizedSection(const double &E0) const;
90  double getPyzHomogenizedSection(const double &E0) const;
91 
92  void resize(const size_t sz);
93 
94  void put(const size_t i,const ReinfBar &c);
95  inline const_reference operator[](const size_t i) const
96  { return v_rfBar::operator[](i); }
97 
98  void Print(std::ostream &s) const;
99 
100  };
101 
102 } // end of XC namespace
103 
104 
105 #endif
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:148
Vector de barras de armadura.
Definition: VectorReinfBar.h:47
double getPyzGrossSection(void) const
Product of inertia of the gross section about y and z axis through his center of gravity.
Definition: VectorReinfBar.cc:271
Definition: Vector.h:82
VectorReinfBar(const size_t &sz=0)
Constructor.
Definition: VectorReinfBar.cc:66
Reinforcing bar.
Definition: ReinfBar.h:76
double getIyGrossSection(void) const
Inertia of the gross section about an axis parallel to y through his center of gravity.
Definition: VectorReinfBar.cc:243
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:171
double getIzGrossSection(void) const
Inertia of the gross section about an axis parallel to z through his center of gravity.
Definition: VectorReinfBar.cc:257
~VectorReinfBar(void)
Destructor.
Definition: VectorReinfBar.cc:97
Cross-section representation able to return mechanical propertis a area, moments of inertia...
Definition: SeccionInerte.h:49
double getAreaHomogenizedSection(const double &E0) const
Returns the homogenized area de las regiones.
Definition: VectorReinfBar.cc:101
void resize(const size_t sz)
Resizes vector.
Definition: VectorReinfBar.cc:287
VectorReinfBar & operator=(const VectorReinfBar &otro)
Assignment operator.
Definition: VectorReinfBar.cc:83
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:194
================================================================================
Definition: ContinuaReprComponent.h:34
Vector getCdgGrossSection(void) const
Returns gross section centroid.
Definition: VectorReinfBar.cc:227
double getAreaGrossSection(void) const
Return gross area of rebars.
Definition: VectorReinfBar.cc:218