xc
Axis.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 //Axis.h
29 
30 #ifndef AXIS_H
31 #define AXIS_H
32 
33 #include "SectionGeometryWrapper.h"
34 #include <set>
35 
36 class BND2d;
37 
38 namespace XC {
39 class Spot;
40 
42 //
45  {
46  //friend class CmbAxis;
47  protected:
48  size_t ndiv;
49 
50  friend class SectionGeometry;
51  Axis(SectionGeometry *sr,const size_t &nd= 4);
52  Axis(const std::string &name= "",SectionGeometry *m= nullptr,const size_t &nd= 4);
53  public:
54  ~Axis(void);
56  inline virtual unsigned short int GetDimension(void) const
57  { return 1; }
58 
59  virtual Spot *P1(void);
60  virtual const Spot *P1(void) const;
61  virtual Spot *P2(void);
62  virtual const Spot *P2(void) const;
64  virtual size_t getNumberOfVertices(void) const= 0;
65 
66  virtual const Spot *getVertex(const size_t &i) const= 0;
67  virtual Spot *getVertex(const size_t &i)= 0;
68  virtual void SetVertice(const size_t &,Spot *)= 0;
69 
70  virtual void setNDiv(const size_t &nd)
71  { ndiv= nd; }
72  virtual size_t NDiv(void) const
73  { return ndiv; }
74  void update_topology(void);
75 
76  virtual BND2d Bnd(void) const= 0;
77 
78 
79  };
80 
81 std::set<const Axis *> getConnectedLines(const Spot &p);
82 
83 } //end of XC namespace
84 #endif
"boundary" en dos dimensiones.
Definition: BND2d.h:38
virtual Spot * P1(void)
Returns a pointer to start point.
Definition: Axis.cc:63
Axis(SectionGeometry *sr, const size_t &nd=4)
Constructor.
Definition: Axis.cc:38
virtual unsigned short int GetDimension(void) const
Returns the object dimension (0, 1, 2 or 3).
Definition: Axis.h:56
Base class of section geometry representation classes.
Definition: SectionGeometryWrapper.h:48
Base class for 1D entities in section definition.
Definition: Axis.h:44
~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:44
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
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Cross section geometry.
Definition: SectionGeometry.h:65
size_t ndiv
Number of divisions.
Definition: Axis.h:48