xc
SectRegion.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 //SectRegion.h
28 // Written by Remo M. de Souza
29 // December 1998
30 
31 #ifndef SectRegion_h
32 #define SectRegion_h
33 
34 
35 #include <iostream>
36 #include "material/section/repres/DiscretBase.h"
37 #include <material/section/repres/cell/VectorCells.h>
38 
39 class Polygon2d;
40 class HalfPlane2d;
41 class Pos2d;
42 
43 namespace XC {
44 class Cell;
45 class VectorCells;
46 class Vector;
47 class Matrix;
48 class PolygonSectRegion;
49 
53 //
55 //
57 class SectRegion: public DiscretBase
58  {
59  protected:
60  mutable VectorCells cells;
61 
62  public:
64  virtual ~SectRegion(void) {}
65 
66  // inquiring functions
68  virtual int getNumCells(void) const= 0;
70  virtual const VectorCells &getCells(void) const= 0;
72  virtual SectRegion *getCopy(void) const= 0;
73 
74  virtual Polygon2d getPolygon(void) const;
75  PolygonSectRegion Intersection(const HalfPlane2d &sp) const;
76  const Vector &getCenterOfMass(void) const;
77  double getLength(void) const;
78  double getArea(void) const;
79  double Iy(void) const;
80  double Iz(void) const;
81  double Pyz(void) const;
82  double Ix(void) const;
83  double Theta_p(void) const;
84  const Vector &IAxisDir_a(void) const;
85  const Vector &IAxisDir_b(void) const;
86  double getI1(void) const;
87  double getI2(void) const;
88  double getI(const unsigned short int &i,const unsigned short int &j) const;
89  double getI(const unsigned short int i,const unsigned short int j,const Pos2d &o) const;
90  double getI(const Pos2d &O,const Vector &e) const;
91  double getIO(const Pos2d &o);
92  Matrix &getI(void) const;
93  Matrix &getI(const Pos2d &o) const;
94 
95 
96 
97  virtual void Print(std::ostream &s, int flag= 0) const =0;
98  friend std::ostream &operator<<(std::ostream &, const SectRegion &);
99  };
100 
101 std::ostream &operator<<(std::ostream &, const SectRegion &);
102 } // end of XC namespace
103 
104 
105 #endif
106 
virtual Polygon2d getPolygon(void) const
Return the region contour.
Definition: SectRegion.cc:45
virtual int getNumCells(void) const =0
Returns the number of cells of the region.
Float vector abstraction.
Definition: Vector.h:93
double Ix(void) const
Return the moment of inertia polar with respect to centroid in local coordinates. ...
Definition: SectRegion.cc:99
double getIO(const Pos2d &o)
Return the polar moment of inertia with respect to the point o.
Definition: SectRegion.cc:166
Definition: PolygonSectRegion.h:43
PolygonSectRegion Intersection(const HalfPlane2d &sp) const
Return the intersection of the region with the half-plane.
Definition: SectRegion.cc:56
virtual SectRegion * getCopy(void) const =0
Returns a copy of the region.
double getI1(void) const
Return the principal major axis of inertia.
Definition: SectRegion.cc:139
virtual const VectorCells & getCells(void) const =0
Returns the cell container.
Base class for materials.
Definition: Material.h:91
double getLength(void) const
Return the region contour lenght.
Definition: SectRegion.cc:78
Matrix & getI(void) const
Return the tensor of inertia computed with respect to the object centroid.
Definition: SectRegion.cc:170
const Vector & IAxisDir_a(void) const
Return the direction of a principal axis of inertia (we don&#39;t know yet if it&#39;s the major one or the m...
Definition: SectRegion.cc:108
SectRegion(Material *)
Constructor.
Definition: SectRegion.cc:41
double Pyz(void) const
Return the product of inertia respecto a the parallel axes por el centroid.
Definition: SectRegion.cc:94
double Iz(void) const
Return the moment of inertia with respect to the axis paralelo al z por el centroid.
Definition: SectRegion.cc:90
double getArea(void) const
Return the region area.
Definition: SectRegion.cc:82
const Vector & IAxisDir_b(void) const
Return the direction of the other (with respect to IAxisDir_a) principal axis of inertia (we don&#39;t kn...
Definition: SectRegion.cc:120
Region of a section that corresponds with a material.
Definition: SectRegion.h:57
const Vector & getCenterOfMass(void) const
Return the centroid coordinates.
Definition: SectRegion.cc:68
Cells vector.
Definition: VectorCells.h:42
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
double Iy(void) const
Return the moment of inertia with respect to the axis paralelo al y por el centroid.
Definition: SectRegion.cc:86
Matrix of floats.
Definition: Matrix.h:108
double Theta_p(void) const
Return the angle that defines a principal axis of inertia.
Definition: SectRegion.cc:103
Base class for cross-section discretization.
Definition: DiscretBase.h:45
double getI2(void) const
Return the principal minor axis of inertia.
Definition: SectRegion.cc:143