xc
Element0D.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 //Element0D.h
29 
30 #ifndef Element0D_h
31 #define Element0D_h
32 
33 #include <domain/mesh/element/ElementBase.h>
34 #include <utility/matrix/Matrix.h>
35 
36 namespace XC {
37 class Node;
38 class Material;
39 
41 //
44 class Element0D: public ElementBase<2>
45  {
46  protected:
48  static const double LenTol;
49  class Vxy: public CommandEntity
50  {
51  Vector x,y;
52  public:
53  Vxy(void);
54  Vxy(const Vector &,const Vector &);
55  inline const Vector &getX(void)
56  { return x; }
57  inline const Vector &getY(void)
58  { return y; }
59  bool check(void) const;
60  };
61  int dimension;
62  int numDOF;
64 
65  virtual void setUp(int Nd1, int Nd2,const Vector &x,const Vector &y);
66  ElemPtrArray3d sew(const SetEstruct &f1,const SetEstruct &f2) const;
67 
68  int sendData(Communicator &comm);
69  int recvData(const Communicator &comm);
70  public:
71  Element0D(int tag, int classTag,int Nd1,int Nd2);
72  Element0D(int tag, int classTag,int Nd1,int Nd2, int dim);
73  Element0D(int tag, int classTag,int Nd1,int Nd2, int dim, const Vector &, const Vector &);
74 
75  BoolArray3d getNodePattern(void) const;
76  int getNumDOF(void) const;
77  size_t getDimension(void) const;
78  int getVtkCellType(void) const;
79  const Vector &getX(void) const;
80  const Vector &getY(void) const;
81  const Vector &getZ(void) const;
82  Matrix getLocalAxes(bool) const;
83  Rect3d3dCooSys getCooSys(bool) const;
84  inline virtual const Matrix &getTransformation(void) const
85  { return transformation; }
86  Pos2d getProjection(const Pos2d &p,bool initialGeometry= true) const;
87  Pos3d getProjection(const Pos3d &p,bool initialGeometry= true) const;
88 
89  inline virtual const Matrix &getExtrapolationMatrix(void) const
90  { return extrapolation_matrix; }
91 
92  virtual void setUpVectors(const Vector &, const Vector &);
93 
94  boost::python::dict getPyDict(void) const;
95  void setPyDict(const boost::python::dict &);
96  };
97 
98 
99 } //end of XC namespace
100 #endif
Element0D(int tag, int classTag, int Nd1, int Nd2)
Constructor.
Definition: Element0D.cc:104
static Matrix extrapolation_matrix
Extrapolation matrix.
Definition: Element0D.h:47
Float vector abstraction.
Definition: Vector.h:94
const Vector & getZ(void) const
Returns the direction vector of local Z axis (third row of the transformation).
Definition: Element0D.cc:176
boost::python::dict getPyDict(void) const
Return a Python dictionary containing the object members values.
Definition: EntityWithProperties.cc:126
Base class for grids of bool in 3D (used to express if something exists or not in a (layer...
Definition: BoolArray3d.h:34
Rect3d3dCooSys getCooSys(bool) const
Returns the element coordinate system.
Definition: Element0D.cc:197
Communication parameters between processes.
Definition: Communicator.h:66
Posición en dos dimensiones.
Definition: Pos2d.h:41
Three-dimensional coordinate system defined in a three-dimensional space.
Definition: Rect3d3dCooSys.h:33
Definition: Element0D.h:49
BoolArray3d getNodePattern(void) const
Return a grid of booleans, one for each of the element nodes.
Definition: Element0D.cc:277
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:259
virtual void setUpVectors(const Vector &, const Vector &)
Set up the transformation matrix for orientation.
Definition: Element0D.cc:213
Three-dimensional array of pointers to elements.
Definition: ElemPtrArray3d.h:47
size_t getDimension(void) const
Return the element dimension (0, 1, 2 o3 3).
Definition: Element0D.cc:144
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: EntityWithProperties.cc:153
int dimension
= 2 or 3 dimensions
Definition: Element0D.h:61
Matrix getLocalAxes(bool) const
Returns a matrix with the axes of the element as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: Element0D.cc:187
Objet that can execute python scripts.
Definition: CommandEntity.h:40
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: Element0D.cc:487
Matrix transformation
transformation matrix for orientation
Definition: Element0D.h:63
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: Element0D.cc:478
int getNumDOF(void) const
Return the number of degrees of freedom.
Definition: Element0D.cc:152
structured set, i.
Definition: SetEstruct.h:47
Pos2d getProjection(const Pos2d &p, bool initialGeometry=true) const
Return the projection of the argument on the element.
Definition: Element0D.cc:468
Posición en tres dimensiones.
Definition: Pos3d.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Base class for finite element with pointer to nodes container.
Definition: ElementBase.h:47
Matrix of floats.
Definition: Matrix.h:111
static const double LenTol
Tolerance for zero length of element.
Definition: Element0D.h:48
bool check(void) const
Checks vectors.
Definition: Element0D.cc:61
int getVtkCellType(void) const
VTK interface.
Definition: Element0D.cc:496
int numDOF
number of dof for ZeroLengthSection
Definition: Element0D.h:62
Element of dimension 0 (both nodes have the same position).
Definition: Element0D.h:44