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