xc
CrdTransf3d.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 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.3 $
49 // $Date: 2005/12/15 00:30:38 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/CrdTransf3d.h,v $
51 
52 
53 // File: ~/CrdTransf/CrdTransf3d.h
54 //
55 // Written: Remo Magalhaes de Souza (rmsouza@ce.berkeley.edu)
56 // Created: 04/2000
57 // Revision: A
58 //
59 // Description: This file contains the class definition for
60 // CrdTransf3d. CrdTransf3d provides the abstraction of spatial
61 // coordinate transformation for a 3d frame.
62 
63 //
64 // What: "@(#) CrdTransf3d.h, revA"
65 
66 #ifndef CrdTransf3d_h
67 #define CrdTransf3d_h
68 
69 #include "CrdTransf.h"
70 #include "utility/matrix/Matrix.h"
71 
72 class Pos3d;
73 class Ref3d3d;
74 
75 namespace XC {
76 class Vector;
77 
79 //
81 class CrdTransf3d: public CrdTransf
82  {
83  protected:
84  mutable Matrix R;
85 
86  void set_rigid_joint_offsetI(const Vector &rigJntOffsetI);
87  void set_rigid_joint_offsetJ(const Vector &rigJntOffsetJ);
88  static void inic_ug(const Vector &d1,const Vector &d2,double *ug);
89  void modif_ug_init_disp(double *ug) const;
90  void global_to_local(const double *ug,double *ul) const;
91  void calc_Wu(const double *ug,double *ul,double *Wu) const;
92  const Vector &calc_ub(const double *ul,Vector &) const;
93 
94  static Vector vectorI;
95  static Vector vectorJ;
96  static Vector vectorK;
97  static Vector vectorCoo;
98  virtual int computeElemtLengthAndOrient(void) const= 0;
99  virtual int computeLocalAxis(void) const= 0;
100 
101  int sendData(Communicator &comm);
102  int recvData(const Communicator &comm);
103  public:
104  CrdTransf3d(int tag, int classTag);
105  CrdTransf3d(int tag, int classTag, const Vector &vecInLocXZPlane);
106  inline virtual int getDimension(void) const
107  { return 3; }
108 
109  virtual CrdTransf3d *getCopy(void) const= 0;
110  int initialize(Node *node1Pointer, Node *node2Pointer);
111  virtual void set_xz_vector(const Vector &vecInLocXZPlane);
112  Vector get_xz_vector(void) const;
113  const Vector &getI(void) const;
114  const Vector &getJ(void) const;
115  const Vector &getK(void) const;
116  Matrix getLocalAxes(bool) const;
117  int getLocalAxes(Vector &xAxis, Vector &yAxis, Vector &zAxis) const;
118  Pos3d getPosNodeI(void) const;
119  Pos3d getPosNodeJ(void) const;
120  Ref3d3d getLocalReference(void) const;
121  Vector getPointLocalCoordFromGlobal(const Vector &xg) const;
122  const Vector &getPointGlobalCoordFromBasic(const double &xi) const;
123  const Matrix &getPointsGlobalCoordFromBasic(const Vector &) const;
124  const Vector &getVectorGlobalCoordFromLocal(const Vector &localCoords) const;
125  const Matrix &getVectorGlobalCoordFromLocal(const Matrix &localCoords) const;
126  const Vector &getVectorLocalCoordFromGlobal(const Vector &globalCoords) const;
127 
128  const Matrix &getCooNodes(void) const;
129  const Matrix &getCooPoints(const size_t &ndiv) const;
130  const Vector &getCooPoint(const double &xrel) const;
131 
132  void gira(const double &);
133  };
134 } // end of XC namespace
135 
136 #endif
const Vector & getCooPoint(const double &xrel) const
Return the point that correspond to the relative coordinate 0<=xrel<=1.
Definition: CrdTransf3d.cpp:478
const Vector & getI(void) const
Returns the ${i}$ unit vector of the local axis expressed in global coordinates for the current geome...
Definition: CrdTransf3d.cpp:286
void modif_ug_init_disp(double *ug) const
brief Modifical el vector de displacement globales of the nodes de acuerdo con los displacements inic...
Definition: CrdTransf3d.cpp:112
Float vector abstraction.
Definition: Vector.h:94
void set_rigid_joint_offsetJ(const Vector &rigJntOffsetJ)
check rigid joint offset for node J
Definition: CrdTransf3d.cpp:223
void gira(const double &)
Counterclockwise rotate the coordinate transformation by the specified angle.
Definition: CrdTransf3d.cpp:493
const Vector & calc_ub(const double *ul, Vector &) const
Sean dx1,dy1,dz1,gx1,gy1,gz1 los displacements y giros of the node dorsal y dx2,dy2,dz2,gx2,gy2,gz2 los of the node frontal expressed in local coordinates.
Definition: CrdTransf3d.cpp:175
Communication parameters between processes.
Definition: Communicator.h:66
Vector getPointLocalCoordFromGlobal(const Vector &xg) const
Returns the local coordinates del point a partir of the globales.
Definition: CrdTransf3d.cpp:366
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
const Matrix & getPointsGlobalCoordFromBasic(const Vector &) const
Returns the points expressed in global coordinates.
Definition: CrdTransf3d.cpp:386
Pos3d getPosNodeI(void) const
Returns the position of node I.
Definition: CrdTransf3d.cpp:338
const Matrix & getCooNodes(void) const
Returns the coordinates of the nodes.
Definition: CrdTransf3d.cpp:442
int recvData(const Communicator &comm)
Receives object members through the communicator argument.
Definition: CrdTransf3d.cpp:507
Vector get_xz_vector(void) const
Returns the vector that defines the local XZ plane.
Definition: CrdTransf3d.cpp:91
int sendData(Communicator &comm)
Sends object members through the communicator argument.
Definition: CrdTransf3d.cpp:497
Matrix R
Transformation matrix.
Definition: CrdTransf3d.h:84
Ref3d3d getLocalReference(void) const
Returns the local reference system.
Definition: CrdTransf3d.cpp:358
const Vector & getK(void) const
Returns the ${k}$ unit vector of the local axis expressed in global coordinates for the current geome...
Definition: CrdTransf3d.cpp:302
Matrix getLocalAxes(bool) const
Returns a matrix with the axes of the element as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: CrdTransf3d.cpp:323
static void inic_ug(const Vector &d1, const Vector &d2, double *ug)
brief Rellena el vector de displacement globales of the nodes.
Definition: CrdTransf3d.cpp:101
const Matrix & getCooPoints(const size_t &ndiv) const
Return points distributed between the nodes as a matrix with the coordinates as rows.
Definition: CrdTransf3d.cpp:459
const Vector & getVectorLocalCoordFromGlobal(const Vector &globalCoords) const
Returns the vector expresado en local coordinates.
Definition: CrdTransf3d.cpp:432
const Vector & getVectorGlobalCoordFromLocal(const Vector &localCoords) const
Returns the vector expressed in global coordinates.
Definition: CrdTransf3d.cpp:402
void set_rigid_joint_offsetI(const Vector &rigJntOffsetI)
check rigid joint offset for node I
Definition: CrdTransf3d.cpp:205
CrdTransf3d(int tag, int classTag)
Default constructor.
Definition: CrdTransf3d.cpp:191
Posición en tres dimensiones.
Definition: Pos3d.h:44
virtual void set_xz_vector(const Vector &vecInLocXZPlane)
Set the vector that defines the local XZ plane.
Definition: CrdTransf3d.cpp:80
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
const Vector & getJ(void) const
Returns the ${j}$ unit vector of the local axis expressed in global coordinates for the current geome...
Definition: CrdTransf3d.cpp:294
const Vector & getPointGlobalCoordFromBasic(const double &xi) const
Returns the point expresado en global coordinates.
Definition: CrdTransf3d.cpp:376
Matrix of floats.
Definition: Matrix.h:111
Mesh node.
Definition: Node.h:111
virtual CrdTransf3d * getCopy(void) const =0
Virtual constructor.
Pos3d getPosNodeJ(void) const
Return the position of node J.
Definition: CrdTransf3d.cpp:348
void global_to_local(const double *ug, double *ul) const
Returns node displacements expressed in local coordinates.
Definition: CrdTransf3d.cpp:128
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:81
Three-dimensional reference system defined in a three-dimensional space.
Definition: Ref3d3d.h:39