XC Open source finite element analysis program
Linea.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 //Linea.h
28 
29 #ifndef LINEA_H
30 #define LINEA_H
31 
32 #include "LineaBase.h"
33 
34 class Segmento3d;
35 
36 namespace XC {
37 
41 class Linea: public LineaBase
42  {
43  protected:
44 
45  MatrizPos3d get_posiciones(void) const;
46  Edge *split_at(Pnt *,const double &,const double &);
47  public:
48  Linea(Preprocessor *m,const size_t &ndiv= 4);
49  Linea(const std::string &nombre= "",Preprocessor *m= nullptr,const size_t &ndiv= 4);
50  virtual SetEstruct *getCopy(void) const;
51 
52  double getLongitud(void) const;
53  Edge *splitAtPoint(Pnt *p);
54  Edge *splitAtLambda(const double &);
55  Edge *splitAtCooNatural(const double &);
56 
57  double getLambda(const Pos3d &) const;
58 
60  inline virtual size_t NumVertices(void) const
61  { return 2; }
62  virtual BND3d Bnd(void) const;
63  double DistanciaA2(const Pos3d &pt) const;
64 
65  const Vector &getVector(void) const;
66  Segmento3d getSegmento(void) const;
67  virtual const Vector &getTang(const double &) const;
68  int getVtkCellType(void) const;
69  int getMEDCellType(void) const;
70 
71 
72  };
73 
74 } //end of XC namespace
75 #endif
Base class for one-dimensional geometry objects.
Definition: Edge.h:46
virtual const Vector & getTang(const double &) const
Returns a unit vector in the tangent direction in the point defined by s.
Definition: Linea.cc:185
Edge * splitAtPoint(Pnt *p)
Divides the line by the point being passed as parameter.
Definition: Linea.cc:114
Definition: Vector.h:82
double DistanciaA2(const Pos3d &pt) const
Returns the squared distance to the position being passed as parameter.
Definition: Linea.cc:83
Base class for 1D entities.
Definition: LineaBase.h:40
Edge * split_at(Pnt *, const double &, const double &)
Divides the line by the point being passed as parameter.
Definition: Linea.cc:87
Segmento de recta entre dos puntos.
Definition: Linea.h:41
const Vector & getVector(void) const
Returns the vector that goes for back end to front end.
Definition: Linea.cc:174
int getVtkCellType(void) const
Interfaz con VTK.
Definition: Linea.cc:194
Finite element model generation tools.
Definition: Preprocessor.h:58
structured set, i. e. a set that can return a pointer a to a node or an element from its indices i...
Definition: SetEstruct.h:45
Linea(Preprocessor *m, const size_t &ndiv=4)
Constructor.
Definition: Linea.cc:43
double getLambda(const Pos3d &) const
Returns the parameter of the point in the line (distance to the line&#39;s first point measured over the ...
Definition: Linea.cc:64
Punto (KPoint).
Definition: Pnt.h:49
MatrizPos3d get_posiciones(void) const
Returns ndiv+1 positions equally spaced along the line.
Definition: Linea.cc:165
virtual SetEstruct * getCopy(void) const
Virtual constructor.
Definition: Linea.cc:51
Edge * splitAtLambda(const double &)
Divides the line by the point obtained by: p1+lambda*VDir().
Definition: Linea.cc:134
Segmento3d getSegmento(void) const
Returns the segment than links the line ends.
Definition: Linea.cc:73
Edge * splitAtCooNatural(const double &)
Divides the line by the point obtained by: p1+lambda*VDir().
Definition: Linea.cc:146
double getLongitud(void) const
Return the line length.
Definition: Linea.cc:55
================================================================================
Definition: ContinuaReprComponent.h:34
int getMEDCellType(void) const
Interfaz con el formato MED de Salome.
Definition: Linea.cc:199
virtual size_t NumVertices(void) const
Returns the number of vertices.
Definition: Linea.h:60