XC Open source finite element analysis program
ShellCrdTransf3dBase.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 //ShellCrdTransf3dBase.h
28 
29 #ifndef ShellCrdTransf3dBase_h
30 #define ShellCrdTransf3dBase_h
31 
32 #include "xc_utils/src/nucleo/EntCmd.h"
33 #include "utility/actor/actor/MovableObject.h"
34 #include "utility/matrix/Vector.h"
35 #include "domain/mesh/element/utils/ParticlePos3d.h"
36 
37 class Plano3d;
38 class Ref2d3d;
39 
40 namespace XC {
41 
42 class Matrix;
43 class NodePtrs;
44 
46 //
48 class ShellCrdTransf3dBase: public EntCmd, public MovableObject
49  {
50  protected:
51  const NodePtrs *theNodes;
56  DbTagData &getDbTagData(void) const;
57  int sendData(CommParameters &);
58  int recvData(const CommParameters &);
59 
60  Vector local_to_global(const Matrix &,const Vector &) const;
61  Matrix local_to_global(const Matrix &,const Matrix &) const;
62 
63  public:
65  inline virtual ~ShellCrdTransf3dBase(void)
66  {}
67  ShellCrdTransf3dBase(const Vector &,const Vector &,const Vector &);
68  virtual ShellCrdTransf3dBase *getCopy(void) const= 0;
69 
71  Matrix getTrfMatrix(void) const;
73  inline const Vector &G1(void) const
74  { return g1; }
76  inline const Vector &G2(void) const
77  { return g2; }
79  inline const Vector &G3(void) const
80  { return g3; }
82  inline const Vector &getVPosCentroide(void) const
83  { return vpos_centroide; }
84  Plano3d getPlane(void) const;
85  Pos3d getProj(const Pos3d &);
86 
87  virtual int initialize(const NodePtrs &)= 0;
88  virtual int setup_nodal_local_coordinates(double xl[2][4]) const;
89  virtual int update(void)= 0;
90 
91  virtual int commitState(void) = 0;
92  virtual int revertToLastCommit(void) = 0;
93  virtual int revertToStart(void) = 0;
94 
95  virtual Vector getBasicTrialDisp(const int &) const= 0;
96  virtual Vector getBasicTrialVel(const int &) const= 0;
97  virtual Vector getBasicTrialAccel(const int &) const= 0;
98 
99  virtual void getGlobalTangent(Matrix &stiff) const;
100  virtual void getGlobalResidAndTangent(Vector &resid,Matrix &stiff) const;
101  virtual const Vector &getGlobalResistingForce(const Vector &p0) const= 0;
102 
103  const Vector &getVectorGlobalCoordFromLocal(const Vector &localCoords) const;
104  const Matrix &getVectorGlobalCoordFromLocal(const Matrix &localCoords) const;
105  const Vector &getVectorLocalCoordFromGlobal(const Vector &globalCoords) const;
106 
107  virtual Matrix getLocalAxes(bool initialGeometry= true) const;
108  Ref2d3d getLocalReference(bool initialGeometry= true) const;
109  Pos2d getLocalCoordinates(const Pos3d &) const;
110  ParticlePos3d getNaturalCoordinates(const Pos3d &,double xl[2][4]) const;
111 
112 
113  };
114 
115 } // end of XC namespace
116 
117 #endif
const Vector & G2(void) const
Returns the eje 2 local (contained in the plane of the element)
Definition: ShellCrdTransf3dBase.h:76
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: ShellCrdTransf3dBase.cc:350
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: ShellCrdTransf3dBase.cc:366
Natural coordinates of an element&#39;s particle.
Definition: ParticlePos3d.h:40
Pos3d getProj(const Pos3d &)
Returns point&#39;s projection over element&#39;s plane.
Definition: ShellCrdTransf3dBase.cc:93
Definition: Vector.h:82
const Vector & getVPosCentroide(void) const
Returns the element centroid.
Definition: ShellCrdTransf3dBase.h:82
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
virtual void getGlobalTangent(Matrix &stiff) const
Return the tangent stiffness matrix expressed in the global coordinate sistem.
Definition: ShellCrdTransf3dBase.cc:298
Vector vpos_centroide
Element centroid position.
Definition: ShellCrdTransf3dBase.h:52
const Vector & G1(void) const
Returns the eje 1 local (contained in the plane of the element)
Definition: ShellCrdTransf3dBase.h:73
ParticlePos3d getNaturalCoordinates(const Pos3d &, double xl[2][4]) const
Return natural coordinates for point xyz (in cartesian coord.) based on $ 23.6 from Felippa book:"Int...
Definition: ShellCrdTransf3dBase.cc:131
virtual void getGlobalResidAndTangent(Vector &resid, Matrix &stiff) const
Returns the residual vector and tangent stiffness matrix expressed in the global coordinate sistem...
Definition: ShellCrdTransf3dBase.cc:304
Object that can move between processes.
Definition: MovableObject.h:91
Plano3d getPlane(void) const
Returns element&#39;s plane.
Definition: ShellCrdTransf3dBase.cc:84
virtual Matrix getLocalAxes(bool initialGeometry=true) const
Returs a matrix with the axes of the element as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: ShellCrdTransf3dBase.cc:98
Pointers to nodes.
Definition: NodePtrs.h:54
Vector local_to_global(const Matrix &, const Vector &) const
Returns the vector in global coordinates.
Definition: ShellCrdTransf3dBase.cc:173
virtual int setup_nodal_local_coordinates(double xl[2][4]) const
actualiza las local coordinates of the nodes.
Definition: ShellCrdTransf3dBase.cc:71
Definition: Matrix.h:82
Matrix getTrfMatrix(void) const
Returns the transformation matrix.
Definition: ShellCrdTransf3dBase.cc:162
const Vector & getVectorLocalCoordFromGlobal(const Vector &globalCoords) const
Returns the vector expresado en local coordinates.
Definition: ShellCrdTransf3dBase.cc:338
int sendData(CommParameters &)
Sends object members through the channel being passed as parameter.
Definition: ShellCrdTransf3dBase.cc:357
Vector g3
Vector 3 of the reference trihedron.
Definition: ShellCrdTransf3dBase.h:55
ShellCrdTransf3dBase(void)
Default constructor.
Definition: ShellCrdTransf3dBase.cc:48
Pos2d getLocalCoordinates(const Pos3d &) const
Returns point&#39;s local coordinates.
Definition: ShellCrdTransf3dBase.cc:120
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
const Vector & G3(void) const
Returns the eje 3 local (normal al plano of the element)
Definition: ShellCrdTransf3dBase.h:79
Base class for 3D coordinate transformations.
Definition: ShellCrdTransf3dBase.h:48
const Vector & getVectorGlobalCoordFromLocal(const Vector &localCoords) const
Returns the vector expressed in global coordinates.
Definition: ShellCrdTransf3dBase.cc:309
Vector g2
Vector 2 of the reference trihedron.
Definition: ShellCrdTransf3dBase.h:54
Ref2d3d getLocalReference(bool initialGeometry=true) const
Returns element&#39;s reference.
Definition: ShellCrdTransf3dBase.cc:107
Vector g1
Vector 1 of the reference trihedron.
Definition: ShellCrdTransf3dBase.h:53