XC Open source finite element analysis program
CrdTransf2d.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 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.3 $
48 // $Date: 2005/12/15 00:30:38 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/CrdTransf2d.h,v $
50 
51 
52 // File: ~/CrdTransf/CrdTransf2d.h
53 //
54 // Written: Remo Magalhaes de Souza (rmsouza@ce.berkeley.edu)
55 // Created: 04/2000
56 // Revision: A
57 //
58 // Description: This file contains the class definition for
59 // CrdTransf2d. CrdTransf2d provides the abstraction of spatial
60 // coordinate transformation for a 2d frame.
61 
62 //
63 // What: "@(#) CrdTransf2d.h, revA"
64 
65 #ifndef CrdTransf2d_h
66 #define CrdTransf2d_h
67 
68 #include "CrdTransf.h"
69 
70 class Pos2d;
71 class Ref2d2d;
72 
73 namespace XC {
75 //
77 class CrdTransf2d: public CrdTransf
78  {
79  protected:
80  mutable double cosTheta, sinTheta;
81  void set_rigid_joint_offsetI(const Vector &rigJntOffsetI);
82  void set_rigid_joint_offsetJ(const Vector &rigJntOffsetJ);
83  inline double T02(void) const
84  { return -cosTheta*nodeIOffset(1)+sinTheta*nodeIOffset(0); }
85  inline double T12(void) const
86  { return sinTheta*nodeIOffset(1)+cosTheta*nodeIOffset(0); }
87  inline double T35(void) const
88  { return -cosTheta*nodeJOffset(1)+sinTheta*nodeJOffset(0); }
89  inline double T45(void) const
90  { return sinTheta*nodeJOffset(1)+cosTheta*nodeJOffset(0); }
91 
92  void nodes_init_disp(void);
93  int computeElemtLengthAndOrient(void) const;
94 
95  int sendData(CommParameters &cp);
96  int recvData(const CommParameters &cp);
97  public:
98  CrdTransf2d(int tag, int classTag);
99 
100  int initialize(Node *node1Pointer, Node *node2Pointer);
101  virtual CrdTransf2d *getCopy(void) const= 0;
103  inline double getInitialLength(void) const
104  { return L; }
106  inline double getDeformedLength(void) const
107  { return L; }
108  const Vector &getBasicTrialDisp(void) const;
109  const Vector &getBasicIncrDisp(void) const;
110  const Vector &getBasicIncrDeltaDisp(void) const;
111  const Vector &getBasicTrialVel(void) const;
112  const Vector &getBasicTrialAccel(void) const;
113 
114  const Vector &getInitialI(void) const;
115  const Vector &getI(void) const;
116  const Vector &getInitialJ(void) const;
117  const Vector &getJ(void) const;
118  int getInitialLocalAxes(Vector &xAxis, Vector &yAxis) const;
119  int getLocalAxes(Vector &xAxis, Vector &yAxis) const;
120  Matrix getLocalAxes(bool) const;
121  Pos2d getPosNodeI(void) const;
122  Pos2d getPosNodeJ(void) const;
123  Ref2d2d getLocalReference(void) const;
124  Vector getPointLocalCoordFromGlobal(const Vector &xg) const;
125  const Vector &getPointGlobalCoordFromBasic(const double &xi) const;
126  const Matrix &getPointsGlobalCoordFromBasic(const Vector &) const;
127  const Vector &getVectorGlobalCoordFromLocal(const Vector &localCoords) const;
128  const Matrix &getVectorGlobalCoordFromLocal(const Matrix &localCoords) const;
129  const Vector &getVectorLocalCoordFromGlobal(const Vector &globalCoords) const;
130 
131  const Matrix &getCooNodos(void) const;
132  const Matrix &getCooPuntos(const size_t &ndiv) const;
133  const Vector &getCooPunto(const double &xrel) const;
134  };
135 } // end of XC namespace
136 
137 #endif
CrdTransf provides the abstraction of a frame coordinate transformation. It is an abstract base class...
Definition: CrdTransf.h:87
const Vector & getI(void) const
Returns the ${i}$ unit vector of the local axis expressed in global coordinates for the current geome...
Definition: CrdTransf2d.cpp:450
int recvData(const CommParameters &cp)
Receives object members through the channel being passed as parameter.
Definition: CrdTransf2d.cpp:654
const Matrix & getCooNodos(void) const
Returns the coordinates of the nodes.
Definition: CrdTransf2d.cpp:598
const Vector & getInitialI(void) const
Returns the ${i}$ unit vector of the local axis expressed in global coordinates for the initial (unde...
Definition: CrdTransf2d.cpp:439
int computeElemtLengthAndOrient(void) const
Computes the length and the orientation of the associated element.
Definition: CrdTransf2d.cpp:180
const Vector & getVectorGlobalCoordFromLocal(const Vector &localCoords) const
Returns the vector expresado en global coordinates.
Definition: CrdTransf2d.cpp:564
Definition: Vector.h:82
int initialize(Node *node1Pointer, Node *node2Pointer)
Calculates initial displecements from those of the nodes.
Definition: CrdTransf2d.cpp:142
void set_rigid_joint_offsetI(const Vector &rigJntOffsetI)
direction cosines of undeformed element wrt to global system
Definition: CrdTransf2d.cpp:77
Mesh node.
Definition: Node.h:99
virtual CrdTransf2d * getCopy(void) const =0
Virtual constructor.
const Vector & getBasicIncrDisp(void) const
Returns the incrementos de desplazamiento expresados en el sistema básico.
Definition: CrdTransf2d.cpp:288
const Matrix & getPointsGlobalCoordFromBasic(const Vector &) const
Returns the puntos expresados en global coordinates.
Definition: CrdTransf2d.cpp:548
const Matrix & getCooPuntos(const size_t &ndiv) const
Returns puntos distribuidos entre los nodos extremos.
Definition: CrdTransf2d.cpp:613
int sendData(CommParameters &cp)
Sends object members through the channel being passed as parameter.
Definition: CrdTransf2d.cpp:644
double getInitialLength(void) const
Return the longitud inicial of the element.
Definition: CrdTransf2d.h:103
const Vector & getInitialJ(void) const
Returns the ${j}$ unit vector of the local axis expressed in global coordinates for the initial (unde...
Definition: CrdTransf2d.cpp:456
const Vector & getBasicTrialDisp(void) const
Returns the desplazamientos expresados en el sistema básico.
Definition: CrdTransf2d.cpp:235
const Vector & getJ(void) const
Returns the ${j}$ unit vector of the local axis expressed in global coordinates for the current geome...
Definition: CrdTransf2d.cpp:467
Pos2d getPosNodeI(void) const
Return the position of the node I.
Definition: CrdTransf2d.cpp:511
Definition: Matrix.h:82
Ref2d2d getLocalReference(void) const
Returns the local reference system.
Definition: CrdTransf2d.cpp:531
void nodes_init_disp(void)
Checks for initial displacements on nodes and, if they exist,.
Definition: CrdTransf2d.cpp:111
double getDeformedLength(void) const
Return the longitud of the element deformado.
Definition: CrdTransf2d.h:106
void set_rigid_joint_offsetJ(const Vector &rigJntOffsetJ)
check rigid joint offset for node J
Definition: CrdTransf2d.cpp:93
CrdTransf2d(int tag, int classTag)
constructor:
Definition: CrdTransf2d.cpp:73
int getInitialLocalAxes(Vector &xAxis, Vector &yAxis) const
axis for the initial (undeformed) geometry.
Definition: CrdTransf2d.cpp:472
double L
element length
Definition: CrdTransf.h:91
const Vector & getPointGlobalCoordFromBasic(const double &xi) const
Returns the punto expresado en global coordinates.
Definition: CrdTransf2d.cpp:501
Vector getPointLocalCoordFromGlobal(const Vector &xg) const
Returns the local coordinates del punto a partir de las globales.
Definition: CrdTransf2d.cpp:538
Communication parameters between processes.
Definition: CommParameters.h:65
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:77
================================================================================
Definition: ContinuaReprComponent.h:34
int getLocalAxes(Vector &xAxis, Vector &yAxis) const
current position.
Definition: CrdTransf2d.cpp:481
Vector nodeJOffset
rigid joint offsets
Definition: CrdTransf.h:92
Pos2d getPosNodeJ(void) const
Return the position of the node J.
Definition: CrdTransf2d.cpp:521
const Vector & getCooPunto(const double &xrel) const
Returns the punto correspondiente a la coordenada 0<=xrel<=1.
Definition: CrdTransf2d.cpp:631
const Vector & getVectorLocalCoordFromGlobal(const Vector &globalCoords) const
Returns the vector expresado en local coordinates.
Definition: CrdTransf2d.cpp:589