xc
Element0D.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 //Element0D.h
28 
29 #ifndef Element0D_h
30 #define Element0D_h
31 
32 #include <domain/mesh/element/ElementBase.h>
33 #include <utility/matrix/Matrix.h>
34 
35 namespace XC {
36 class Node;
37 class Material;
38 
40 //
43 class Element0D : public ElementBase<2>
44  {
45  protected:
46  static const double LenTol;
47  class Vxy: public CommandEntity
48  {
49  Vector x,y;
50  public:
51  Vxy(void);
52  Vxy(const Vector &,const Vector &);
53  inline const Vector &getX(void)
54  { return x; }
55  inline const Vector &getY(void)
56  { return y; }
57  bool check(void) const;
58  };
59  int dimension;
60  int numDOF;
62 
63  virtual void setUp(int Nd1, int Nd2,const Vector &x,const Vector &y);
64  ElemPtrArray3d cose(const SetEstruct &f1,const SetEstruct &f2) const;
65 
66  int sendData(CommParameters &cp);
67  int recvData(const CommParameters &cp);
68  public:
69  Element0D(int tag, int classTag,int Nd1,int Nd2);
70  Element0D(int tag, int classTag,int Nd1,int Nd2, int dim);
71  Element0D(int tag, int classTag,int Nd1,int Nd2, int dim, const Vector &, const Vector &);
72  int getNumDOF(void) const;
73  size_t getDimension(void) const;
74  int getVtkCellType(void) const;
75  const Vector &getX(void) const;
76  const Vector &getY(void) const;
77  const Vector &getZ(void) const;
78  Matrix getLocalAxes(bool) const;
79  Rect3d3dCooSys getCooSys(bool) const;
80  inline virtual const Matrix &getTransformation(void) const
81  { return transformation; }
82 
83  virtual void setUpVectors(const Vector &, const Vector &);
84  };
85 
86 
87 } //end of XC namespace
88 #endif
Element0D(int tag, int classTag, int Nd1, int Nd2)
Constructor.
Definition: Element0D.cc:91
Float vector abstraction.
Definition: Vector.h:93
const Vector & getZ(void) const
Returns the direction vector of local Z axis (third row of the transformation).
Definition: Element0D.cc:163
Rect3d3dCooSys getCooSys(bool) const
Returns the element coordinate system.
Definition: Element0D.cc:184
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: Element0D.cc:409
Definition: Element0D.h:47
virtual void setUp(int Nd1, int Nd2, const Vector &x, const Vector &y)
Establish the external nodes and set up the transformation matrix for orientation.
Definition: Element0D.cc:242
virtual void setUpVectors(const Vector &, const Vector &)
Set up the transformation matrix for orientation.
Definition: Element0D.cc:200
Three-dimensional array of pointers to elements.
Definition: ElemPtrArray3d.h:43
size_t getDimension(void) const
Return the element dimension (0, 1, 2 o3 3).
Definition: Element0D.cc:131
int dimension
= 2 or 3 dimensions
Definition: Element0D.h:59
Matrix getLocalAxes(bool) const
Returs a matrix with the axes of the element as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: Element0D.cc:174
Matrix transformation
transformation matrix for orientation
Definition: Element0D.h:61
int getNumDOF(void) const
Return the number of degrees of freedom.
Definition: Element0D.cc:139
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: Element0D.cc:400
structured set, i.
Definition: SetEstruct.h:45
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Base class for finite element with pointer to nodes container.
Definition: ElementBase.h:46
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
static const double LenTol
Tolerance for zero length of element.
Definition: Element0D.h:46
bool check(void) const
Checks vectors.
Definition: Element0D.cc:54
int getVtkCellType(void) const
Interfaz con VTK.
Definition: Element0D.cc:418
int numDOF
number of dof for ZeroLengthSection
Definition: Element0D.h:60
Element of dimension 0 (both nodes have the same position).
Definition: Element0D.h:43