xc
FiberData.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 //FiberData.h
29 
30 #ifndef FiberData_h
31 #define FiberData_h
32 
33 #include <vector>
34 #include <utility/matrix/Vector.h>
35 #include <utility/matrix/Matrix.h>
36 #include <material/section/repres/section/fiber_list.h>
37 
38 namespace XC {
39 
40 class Material;
41 class VectorCells;
42 class VectorReinfBar;
43 class RegionContainer;
44 class ListReinfLayer;
45  class SectionGeometry;
46 
48 //
50 class FiberData
51  {
52  std::vector<Material *> fibersMaterial;
53  Matrix fibersPosition;
54  Vector fibersArea;
55  size_t put_cells(const size_t &,const VectorCells &,Material *);
56  size_t put_reinf_bars(const size_t &,const VectorReinfBar &,Material *);
57 
58  inline Material *getPtrMaterial(const int &i) const
59  { return fibersMaterial[i]; }
60  inline const double &Position(const int &i,const int &j) const
61  { return fibersPosition(i,j); }
62  inline double &Position(const int &i,const int &j)
63  { return fibersPosition(i,j); }
65  inline const double &Area(const int &i) const
66  { return fibersArea(i); }
68  inline double &Area(const int &i)
69  { return fibersArea(i); }
70 
71  public:
72  FiberData(const int &sz);
73  FiberData(const SectionGeometry &);
74 
75  inline void setPtrMaterial(const int &i,Material *mat)
76  { fibersMaterial[i]= mat; }
77 
78  inline size_t size(void) const
79  { return fibersArea.Size(); }
80 
81  size_t PutCells(const size_t &,const RegionContainer &);
82  size_t putReinforcementLayers(const size_t &,const ListReinfLayer &);
83  void get2DFibers(fiber_list &) const;
84  void get3DFibers(fiber_list &) const;
85  };
86 
87 } // end of XC namespace
88 #endif
89 
Float vector abstraction.
Definition: Vector.h:94
void get3DFibers(fiber_list &) const
Populates the fiber container with UniaxialFiber3d objects.
Definition: FiberData.cc:175
Fiber data.
Definition: FiberData.h:50
Section composed of some regions.
Definition: RegionContainer.h:53
Base class for materials.
Definition: Material.h:93
std::list< Fiber * > fiber_list
fiber list.
Definition: fiber_list.h:37
size_t putReinforcementLayers(const size_t &, const ListReinfLayer &)
Coloca las barras de la lista being passed as parameter.
Definition: FiberData.cc:115
int Size(void) const
Returns the size of the Vector.
Definition: Vector.h:235
Reinforcement bars vector.
Definition: VectorReinfBar.h:48
void get2DFibers(fiber_list &) const
Populates the fiber container with UniaxialFiber2d objects.
Definition: FiberData.cc:130
Reinf layer container (list).
Definition: ListReinfLayer.h:54
FiberData(const int &sz)
Constructor.
Definition: FiberData.cc:45
Cells vector.
Definition: VectorCells.h:42
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
Cross section geometry.
Definition: SectionGeometry.h:65
size_t PutCells(const size_t &, const RegionContainer &)
Put the cells of the regions being passed as parameters.
Definition: FiberData.cc:101