XC Open source finite element analysis program
LineaBase.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 //LineaBase.h
28 
29 #ifndef LINEABASE_H
30 #define LINEABASE_H
31 
32 #include "Edge.h"
33 
34 
35 namespace XC {
36 
40 class LineaBase: public Edge
41  {
42  protected:
43  Pnt *p1;
44  Pnt *p2;
45 
46  inline Pnt *P1(void)
47  { return p1; }
48  virtual Pnt *P2(void)
49  { return p2; }
50  virtual bool check_points(void) const;
51  public:
52  LineaBase(Preprocessor *m,const size_t &ndiv= 4);
53  LineaBase(const std::string &nombre,Preprocessor *m,const size_t &ndiv= 4);
54  const Pnt *P1(void) const;
55  const Pnt *P2(void) const;
56 
57  virtual double getLambda(const Pos3d &) const= 0;
58 
59  virtual const Pnt *GetVertice(const size_t &i) const;
60  virtual void SetVertice(const size_t &,Pnt *);
61  void SetVertice(const size_t &,const size_t &);
62  void SetVertices(Pnt *,Pnt *);
63 
64 
65  };
66 
67 } //end of XC namespace
68 #endif
Base class for one-dimensional geometry objects.
Definition: Edge.h:46
void SetVertices(Pnt *, Pnt *)
Assigns line ends.
Definition: LineaBase.cc:103
Base class for 1D entities.
Definition: LineaBase.h:40
virtual bool check_points(void) const
Checks that the points are defined.
Definition: LineaBase.cc:65
LineaBase(Preprocessor *m, const size_t &ndiv=4)
Constructor.
Definition: LineaBase.cc:41
Finite element model generation tools.
Definition: Preprocessor.h:58
Pnt * P1(void)
Return a pointer to the edge&#39;s start point.
Definition: LineaBase.h:46
Punto (KPoint).
Definition: Pnt.h:49
virtual void SetVertice(const size_t &, Pnt *)
Sets the i-th vertex.
Definition: LineaBase.cc:78
virtual Pnt * P2(void)
Return a pointer to the edge&#39;s start point.
Definition: LineaBase.h:48
Pnt * p1
Extremo dorsal.
Definition: LineaBase.h:43
================================================================================
Definition: ContinuaReprComponent.h:34
virtual const Pnt * GetVertice(const size_t &i) const
Returns the i-th vertex.
Definition: LineaBase.cc:56
Pnt * p2
Extremo frontal.
Definition: LineaBase.h:44