xc
SectRegion.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 //SectRegion.h
29 // Written by Remo M. de Souza
30 // December 1998
31 
32 #ifndef SectRegion_h
33 #define SectRegion_h
34 
35 
36 #include <iostream>
37 #include "material/section/repres/DiscretBase.h"
38 #include <material/section/repres/cell/VectorCells.h>
39 
40 class Polygon2d;
41 class HalfPlane2d;
42 class Pos2d;
43 
44 namespace XC {
45 class Cell;
46 class VectorCells;
47 class Vector;
48 class Matrix;
49 class PolygonSectRegion;
50 
54 //
56 //
58 class SectRegion: public DiscretBase
59  {
60  protected:
61  mutable VectorCells cells;
62 
63  public:
65  virtual ~SectRegion(void) {}
66 
67  // inquiring functions
69  virtual int getNumCells(void) const= 0;
71  virtual const VectorCells &getCells(void) const= 0;
73  virtual SectRegion *getCopy(void) const= 0;
74 
75  virtual Polygon2d getPolygon(void) const;
77  const Vector &getCenterOfMass(void) const;
78  double getLength(void) const;
79  double getArea(void) const;
80  double Iy(void) const;
81  double Iz(void) const;
82  double Pyz(void) const;
83  double Ix(void) const;
84  double Theta_p(void) const;
85  const Vector &IAxisDir_a(void) const;
86  const Vector &IAxisDir_b(void) const;
87  double getI1(void) const;
88  double getI2(void) const;
89  double getI(const unsigned short int &i,const unsigned short int &j) const;
90  double getI(const unsigned short int i,const unsigned short int j,const Pos2d &o) const;
91  double getI(const Pos2d &O,const Vector &e) const;
92  double getIO(const Pos2d &o);
93  Matrix &getI(void) const;
94  Matrix &getI(const Pos2d &o) const;
95 
96 
97 
98  virtual void Print(std::ostream &s, int flag= 0) const =0;
99  friend std::ostream &operator<<(std::ostream &, const SectRegion &);
100  };
101 
102 std::ostream &operator<<(std::ostream &, const SectRegion &);
103 } // end of XC namespace
104 
105 
106 #endif
107 
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:94
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:44
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.
Posición en dos dimensiones.
Definition: Pos2d.h:41
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:93
double getLength(void) const
Return the region contour length.
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
Polígono en dos dimensiones.
Definition: Polygon2d.h:38
double Iz(void) const
Return the moment of inertia with respect to the axis parallel to z axis through the 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:58
const Vector & getCenterOfMass(void) const
Return the centroid coordinates.
Definition: SectRegion.cc:68
Cells vector.
Definition: VectorCells.h:42
Half plane in a two-dimensional space.
Definition: HalfPlane2d.h:38
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
double Iy(void) const
Return the moment of inertia with respect to the axis parallel to y axis through the centroid...
Definition: SectRegion.cc:86
Matrix of floats.
Definition: Matrix.h:111
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:46
double getI2(void) const
Return the principal minor axis of inertia.
Definition: SectRegion.cc:143