xc
ShellCrdTransf3dBase.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 //ShellCrdTransf3dBase.h
29 
30 #ifndef ShellCrdTransf3dBase_h
31 #define ShellCrdTransf3dBase_h
32 
33 #include "utility/kernel/CommandEntity.h"
34 #include "utility/actor/actor/MovableObject.h"
35 #include "utility/matrix/Vector.h"
36 #include "domain/mesh/element/utils/ParticlePos3d.h"
37 
38 class Plane;
39 class Ref2d3d;
40 
41 namespace XC {
42 
43 class Matrix;
44 class NodePtrs;
45 
47 //
50  {
51  protected:
52  const NodePtrs *theNodes;
57 
58  DbTagData &getDbTagData(void) const;
59  int sendData(Communicator &);
60  int recvData(const Communicator &);
61 
62  Vector local_to_global(const Vector &) const;
63  Matrix local_to_global(const Matrix &) const;
64  const Vector &local_to_global_resisting_force(const Vector &pl) const;
65  const Matrix &local_to_global_stiff_matrix(const Matrix &kl) const;
66 
67 
68  public:
70  ShellCrdTransf3dBase(const Vector &,const Vector &,const Vector &);
71  inline virtual ~ShellCrdTransf3dBase(void)
72  {}
73  virtual ShellCrdTransf3dBase *getCopy(void) const= 0;
74 
75  void setUnitVectors(const Vector &,const Vector &,const Vector &);
76  void setUnitVectors(const Vector3d &,const Vector3d &,const Vector3d &);
77  void setUnitVectors(const Vector &,const Vector &);
78  void setUnitVectors(const Vector3d &,const Vector3d &);
79 
81  Matrix getTrfMatrix(void) const;
83  inline const Vector &G1(void) const
84  { return g1; }
86  inline const Vector &G2(void) const
87  { return g2; }
89  inline const Vector &G3(void) const
90  { return g3; }
92  inline const Vector &getVPosCentroide(void) const
93  { return vpos_centroide; }
94  Plane getPlane(void) const;
95  Pos3d getProj(const Pos3d &);
96 
97  virtual int initialize(const NodePtrs &)= 0;
98  virtual int setup_nodal_local_coordinates(void) const;
99  virtual int update(void)= 0;
100 
101  virtual int commitState(void) = 0;
102  virtual int revertToLastCommit(void) = 0;
103  virtual int revertToStart(void) = 0;
104 
105  virtual Vector getBasicTrialDisp(const int &) const= 0;
106  virtual Vector getBasicTrialVel(const int &) const= 0;
107  virtual Vector getBasicTrialAccel(const int &) const= 0;
108 
109  virtual void getGlobalTangent(Matrix &stiff) const;
110  virtual void getGlobalResidAndTangent(Vector &resid,Matrix &stiff) const;
111  virtual const Vector &getGlobalResistingForce(const Vector &p0) const;
112 
113  const Vector &getVectorGlobalCoordFromLocal(const Vector &localCoords) const;
114  const Matrix &getVectorGlobalCoordFromLocal(const Matrix &localCoords) const;
115  const Vector &getVectorLocalCoordFromGlobal(const Vector &globalCoords) const;
116 
117  virtual Matrix getLocalAxes(bool initialGeometry= true) const;
118  Ref2d3d getLocalReference(bool initialGeometry= true) const;
119  Pos2d getLocalCoordinates(const Pos3d &) const;
120  ParticlePos3d getNaturalCoordinates(const Pos3d &,double xl[2][4]) const;
121  };
122 
123 } // end of XC namespace
124 
125 #endif
virtual Matrix getLocalAxes(bool initialGeometry=true) const
Returns a matrix with the axes of the element as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: ShellCrdTransf3dBase.cc:136
Matrix getTrfMatrix(void) const
Returns the transformation matrix.
Definition: ShellCrdTransf3dBase.cc:204
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: ShellCrdTransf3dBase.cc:432
Float vector abstraction.
Definition: Vector.h:94
Natural coordinates of an element&#39;s particle.
Definition: ParticlePos3d.h:41
const Vector & getVPosCentroide(void) const
Returns the element centroid.
Definition: ShellCrdTransf3dBase.h:92
void setUnitVectors(const Vector &, const Vector &, const Vector &)
Assigns the unit vectors of the transformation.
Definition: ShellCrdTransf3dBase.cc:59
Communication parameters between processes.
Definition: Communicator.h:66
virtual void getGlobalTangent(Matrix &stiff) const
Return the tangent stiffness matrix expressed in the global coordinate sistem.
Definition: ShellCrdTransf3dBase.cc:360
Pos3d getProj(const Pos3d &)
Returns point&#39;s projection over element&#39;s plane.
Definition: ShellCrdTransf3dBase.cc:131
Vector g3
Vector 3 of the reference trihedron.
Definition: ShellCrdTransf3dBase.h:56
Posición en dos dimensiones.
Definition: Pos2d.h:41
Object that can move between processes.
Definition: MovableObject.h:100
Vector local_to_global(const Vector &) const
Returns the vector in global coordinates.
Definition: ShellCrdTransf3dBase.cc:215
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:173
const Vector & getVectorLocalCoordFromGlobal(const Vector &globalCoords) const
Returns the vector expresado en local coordinates.
Definition: ShellCrdTransf3dBase.cc:404
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
const Vector & G3(void) const
Returns the third local axis (normal to the plane of the element)
Definition: ShellCrdTransf3dBase.h:89
Plane in a three-dimensional space.
Definition: Plane.h:49
Vector g1
Vector 1 of the reference trihedron.
Definition: ShellCrdTransf3dBase.h:54
const Vector & local_to_global_resisting_force(const Vector &pl) const
Returns the load vector in global coordinates.
Definition: ShellCrdTransf3dBase.cc:341
Base class for 3D coordinate transformations.
Definition: ShellCrdTransf3dBase.h:49
ShellCrdTransf3dBase(void)
Default constructor.
Definition: ShellCrdTransf3dBase.cc:49
const Vector & G1(void) const
Returns the first local axis (contained in the plane of the element)
Definition: ShellCrdTransf3dBase.h:83
const Vector & G2(void) const
Returns the second local axis (contained in the plane of the element)
Definition: ShellCrdTransf3dBase.h:86
Element pointers to nodes.
Definition: NodePtrs.h:60
const Vector & getVectorGlobalCoordFromLocal(const Vector &localCoords) const
Returns the vector expressed in global coordinates.
Definition: ShellCrdTransf3dBase.cc:375
Objet that can execute python scripts.
Definition: CommandEntity.h:40
virtual int setup_nodal_local_coordinates(void) const
Update local coordinates of the nodes.
Definition: ShellCrdTransf3dBase.cc:107
Vector g2
Vector 2 of the reference trihedron.
Definition: ShellCrdTransf3dBase.h:55
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:370
Pos2d getLocalCoordinates(const Pos3d &) const
Returns point&#39;s local coordinates.
Definition: ShellCrdTransf3dBase.cc:160
Plane getPlane(void) const
Returns element&#39;s plane.
Definition: ShellCrdTransf3dBase.cc:122
Vector vpos_centroide
Element centroid position.
Definition: ShellCrdTransf3dBase.h:53
Posición en tres dimensiones.
Definition: Pos3d.h:44
const Matrix & local_to_global_stiff_matrix(const Matrix &kl) const
Returns the stiffness matrix in global coordinates.
Definition: ShellCrdTransf3dBase.cc:350
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
virtual const Vector & getGlobalResistingForce(const Vector &p0) const
Returns the load vector expressend in global coordinates.
Definition: ShellCrdTransf3dBase.cc:365
int sendData(Communicator &)
Sends object members through the communicator argument.
Definition: ShellCrdTransf3dBase.cc:423
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: ShellCrdTransf3dBase.cc:416
Vector en tres dimensiones.
Definition: Vector3d.h:39
Two-dimensional reference system defined in a three-dimensional space.
Definition: Ref2d3d.h:41
Ref2d3d getLocalReference(bool initialGeometry=true) const
Returns element&#39;s reference.
Definition: ShellCrdTransf3dBase.cc:146