XC Open source finite element analysis program
Element1D.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 //Element1D.h
28 
29 #ifndef Element1D_h
30 #define Element1D_h
31 
32 #include <domain/mesh/element/ElementBase.h>
33 
34 class Segmento3d;
35 
36 namespace XC {
37 class Node;
38 class Material;
39 class Domain;
40 class CrdTransf;
41 class CrdTransf2d;
42 class CrdTransf3d;
43 class DeformationPlane;
44 
46 //
48 //
51 class Element1D : public ElementBase<2>
52  {
53  void unidimensional_meshing(const TritrizPtrNod &,TritrizPtrElem &) const;
54  protected:
55  mutable std::vector<double> longsTributarias;
56 
57  TritrizPtrElem put_on_mesh(const TritrizPtrNod &,meshing_dir dm) const;
58  TritrizPtrElem cose(const SetEstruct &f1,const SetEstruct &f2) const;
59 
60  int sendCoordTransf(int posFlag,const int &,const int &,CommParameters &);
61  CrdTransf *recvCoordTransf(int posFlag,const int &,const int &,const CommParameters &);
62  CrdTransf2d *recvCoordTransf2d(int posFlag,const int &,const int &,const CommParameters &);
63 
64  CrdTransf3d *recvCoordTransf3d(int posFlag,const int &,const int &,const CommParameters &);
65 
66  public:
67  Element1D(int tag, int classTag);
68  Element1D(int tag, int classTag,int Nd1,int Nd2);
69  void setDomain(Domain *theDomain);
70  Matrix getLocalAxes(bool) const;
71  virtual CrdTransf *getCoordTransf(void);
72  virtual const CrdTransf *getCoordTransf(void) const;
73  virtual CrdTransf *checkCoordTransf(void);
74  virtual const CrdTransf *checkCoordTransf(void) const;
75  virtual const Matrix &getCooPuntos(const size_t &ndiv) const;
76  virtual const Vector &getCooPunto(const double &xrel) const;
77  Segmento3d getSegmento(bool initialGeometry= true) const;
78  double getDist2(const Pos2d &p,bool initialGeometry= true) const;
79  double getDist(const Pos2d &p,bool initialGeometry= true) const;
80  double getDist2(const Pos3d &p,bool initialGeometry= true) const;
81  double getDist(const Pos3d &p,bool initialGeometry= true) const;
82 
83  size_t getDimension(void) const;
84  int getVtkCellType(void) const;
85  int getMEDCellType(void) const;
86 
87  virtual void calculaLongsTributarias(bool initialGeometry= true) const;
88  double getLongTributaria(const Node *) const;
89 
90  void vector2dUniformLoadGlobal(const Vector &);
91  void vector2dUniformLoadLocal(const Vector &);
92  void vector2dPointByRelDistLoadGlobal(const double &,const Vector &);
93  void vector2dPointByRelDistLoadLocal(const double &,const Vector &);
94  void vector2dPointLoadGlobal(const Vector &,const Vector &);
95  void vector2dPointLoadLocal(const Vector &,const Vector &);
96  void vector3dUniformLoadGlobal(const Vector &);
97  void vector3dUniformLoadLocal(const Vector &);
98  void vector3dPointByRelDistLoadGlobal(const double &,const Vector &);
99  void vector3dPointByRelDistLoadLocal(const double &,const Vector &);
100  void vector3dPointLoadGlobal(const Vector &,const Vector &);
101  void vector3dPointLoadLocal(const Vector &,const Vector &);
102  void strainLoad(const DeformationPlane &p1, const DeformationPlane &p2);
103 
104 
105  };
106 
107 } //end of XC namespace
108 #endif
CrdTransf3d * recvCoordTransf3d(int posFlag, const int &, const int &, const CommParameters &)
Recibe una coordinate transformation 3d through the channel being passed as parameter.
Definition: Element1D.cc:632
CrdTransf provides the abstraction of a frame coordinate transformation. It is an abstract base class...
Definition: CrdTransf.h:87
"Tritriz" of pointers to elements.
Definition: TritrizPtrElem.h:43
Matrix getLocalAxes(bool) const
Returs a matrix with the axes of the element as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: Element1D.cc:484
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
"Tritriz" of pointers to elements.
Definition: TritrizPtrNod.h:51
Definition: Vector.h:82
size_t getDimension(void) const
Return the element dimension (0, 1, 2 or 3).
Definition: Element1D.cc:286
int sendCoordTransf(int posFlag, const int &, const int &, CommParameters &)
Envía la coordinate transformation through the channel being passed as parameter. ...
Definition: Element1D.cc:571
Mesh node.
Definition: Node.h:99
virtual const Matrix & getCooPuntos(const size_t &ndiv) const
Returns puntos distribuidos entre los nodos extremos.
Definition: Element1D.cc:490
CrdTransf2d * recvCoordTransf2d(int posFlag, const int &, const int &, const CommParameters &)
Recibe una coordinate transformation 2d through the channel being passed as parameter.
Definition: Element1D.cc:613
virtual CrdTransf * checkCoordTransf(void)
Returns (and checks that it exists) a const pointer to the coordinate transformation.
Definition: Element1D.cc:460
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:80
Element1D(int tag, int classTag)
Constructor.
Definition: Element1D.cc:55
CrdTransf * recvCoordTransf(int posFlag, const int &, const int &, const CommParameters &)
Recibe la coordinate transformation through the channel being passed as parameter.
Definition: Element1D.cc:588
Base class for one-dimensional elements (beam,truss,...)
Definition: Element1D.h:51
double getDist(const Pos2d &p, bool initialGeometry=true) const
Return the the distance from the element to punto que is being passed as parameter.
Definition: Element1D.cc:551
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
Segmento3d getSegmento(bool initialGeometry=true) const
Returns the segment defined by the element.
Definition: Element1D.cc:536
double getDist2(const Pos2d &p, bool initialGeometry=true) const
Returns the squared distance from the element to the point que is being passed as parameter...
Definition: Element1D.cc:546
int getMEDCellType(void) const
Interfaz con el formato MED de Salome.
Definition: Element1D.cc:656
Deformation plane for a cross-section.
Definition: DeformationPlane.h:53
double getLongTributaria(const Node *) const
Return the tributary length corresponding to the node being passed as parameter.
Definition: Element1D.cc:672
Definition: Matrix.h:82
virtual const Vector & getCooPunto(const double &xrel) const
Returns the punto correspondiente a la coordenada 0<=xrel<=1.
Definition: Element1D.cc:515
Base class for finite element with pointer to nodes container.
Definition: ElementBase.h:46
virtual CrdTransf * getCoordTransf(void)
Returns (if possible) a pointer to the coordinate transformation.
Definition: Element1D.cc:452
int getVtkCellType(void) const
Interfaz con VTK.
Definition: Element1D.cc:652
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: Element1D.cc:446
virtual void calculaLongsTributarias(bool initialGeometry=true) const
Calcula the tributary lengths that corresponds to cada nodo of the element.
Definition: Element1D.cc:662
Communication parameters between processes.
Definition: CommParameters.h:65
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:77
================================================================================
Definition: ContinuaReprComponent.h:34
TritrizPtrElem put_on_mesh(const TritrizPtrNod &, meshing_dir dm) const
Places the element on the mesh.
Definition: Element1D.cc:353