XC Open source finite element analysis program
Eje.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 //Eje.h
28 
29 #ifndef EJE_H
30 #define EJE_H
31 
32 #include "EntGeomSection.h"
33 
34 
35 class BND2d;
36 
37 namespace XC {
38 class Spot;
39 
41 //
43 class Eje: public EntGeomSection
44  {
45  friend class CmbEje;
46  protected:
47  size_t ndiv;
48 
49  friend class GeomSection;
50  Eje(GeomSection *sr,const size_t &nd= 4);
51  Eje(const std::string &nombre= "",GeomSection *m= nullptr,const size_t &nd= 4);
52  public:
53  ~Eje(void);
55  inline virtual unsigned short int GetDimension(void) const
56  { return 1; }
57 
58  virtual Spot *P1(void);
59  virtual const Spot *P1(void) const;
60  virtual Spot *P2(void);
61  virtual const Spot *P2(void) const;
63  virtual size_t NumVertices(void) const= 0;
64 
65  virtual const Spot *GetVertice(const size_t &i) const= 0;
66  virtual Spot *GetVertice(const size_t &i)= 0;
67  virtual void SetVertice(const size_t &,Spot *)= 0;
68 
69  virtual void SetNDiv(const size_t &nd)
70  { ndiv= nd; }
71  virtual size_t NDiv(void) const
72  { return ndiv; }
73  void actualiza_topologia(void);
74 
75  virtual BND2d Bnd(void) const= 0;
76 
77 
78  };
79 
80 std::set<const Eje *> GetLineasTocan(const Spot &p);
81 
82 } //end of XC namespace
83 #endif
virtual size_t NumVertices(void) const =0
Returns the number of vertices.
size_t ndiv
Number of divisions.
Definition: Eje.h:47
~Eje(void)
Destructor.
Definition: Eje.cc:49
Point object for section geometry definition.
Definition: Spot.h:43
virtual Spot * P1(void)
Returns a pointer to start point.
Definition: Eje.cc:63
virtual unsigned short int GetDimension(void) const
Returns the object dimension (0, 1, 2 or 3).
Definition: Eje.h:55
Eje(GeomSection *sr, const size_t &nd=4)
Constructor.
Definition: Eje.cc:38
std::set< const Eje * > GetLineasTocan(const Spot &p)
Returns the set of lines that touch the point being passed as parameter.
Definition: Eje.cc:92
Base class of section geometry representation classes.
Definition: EntGeomSection.h:47
void actualiza_topologia(void)
Updates topology.
Definition: Eje.cc:56
Base class for 1D entities in section definition.
Definition: Eje.h:43
virtual Spot * P2(void)
Returns a pointer to end point.
Definition: Eje.cc:77
================================================================================
Definition: ContinuaReprComponent.h:34
Cross section geometry.
Definition: GeomSection.h:62