xc
CrdTransf2d.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/CrdTransf2d.h,v $
51 
52 
53 // File: ~/CrdTransf/CrdTransf2d.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 // CrdTransf2d. CrdTransf2d provides the abstraction of spatial
61 // coordinate transformation for a 2d frame.
62 
63 //
64 // What: "@(#) CrdTransf2d.h, revA"
65 
66 #ifndef CrdTransf2d_h
67 #define CrdTransf2d_h
68 
69 #include "CrdTransf.h"
70 
71 class Pos2d;
72 class Ref2d2d;
73 
74 namespace XC {
76 //
78 class CrdTransf2d: public CrdTransf
79  {
80  protected:
81  mutable double cosTheta, sinTheta;
82  void set_rigid_joint_offsetI(const Vector &rigJntOffsetI);
83  void set_rigid_joint_offsetJ(const Vector &rigJntOffsetJ);
84  inline double T02(void) const
85  { return -cosTheta*nodeIOffset(1)+sinTheta*nodeIOffset(0); }
86  inline double T12(void) const
87  { return sinTheta*nodeIOffset(1)+cosTheta*nodeIOffset(0); }
88  inline double T35(void) const
89  { return -cosTheta*nodeJOffset(1)+sinTheta*nodeJOffset(0); }
90  inline double T45(void) const
91  { return sinTheta*nodeJOffset(1)+cosTheta*nodeJOffset(0); }
92 
93  void nodes_init_disp(void);
94  int computeElemtLengthAndOrient(void) const;
95 
96  int sendData(Communicator &comm);
97  int recvData(const Communicator &comm);
98  public:
99  CrdTransf2d(int tag, int classTag);
100  inline virtual int getDimension(void) const
101  { return 2; }
102 
103  int initialize(Node *node1Pointer, Node *node2Pointer);
104  virtual CrdTransf2d *getCopy(void) const= 0;
106  inline double getInitialLength(void) const
107  { return L; }
109  inline double getDeformedLength(void) const
110  { return L; }
111  const Vector &getBasicTrialDisp(void) const;
112  const Vector &getBasicIncrDisp(void) const;
113  const Vector &getBasicIncrDeltaDisp(void) const;
114  const Vector &getBasicTrialVel(void) const;
115  const Vector &getBasicTrialAccel(void) const;
116 
117  const Vector &getInitialI(void) const;
118  const Vector &getI(void) const;
119  const Vector &getInitialJ(void) const;
120  const Vector &getJ(void) const;
121  int getInitialLocalAxes(Vector &xAxis, Vector &yAxis) const;
122  int getLocalAxes(Vector &xAxis, Vector &yAxis) const;
123  Matrix getLocalAxes(bool) const;
124  Pos2d getPosNodeI(void) const;
125  Pos2d getPosNodeJ(void) const;
126  Ref2d2d getLocalReference(void) const;
127  Vector getPointLocalCoordFromGlobal(const Vector &xg) const;
128  const Vector &getPointGlobalCoordFromBasic(const double &xi) const;
129  const Matrix &getPointsGlobalCoordFromBasic(const Vector &) const;
130  const Vector &getVectorGlobalCoordFromLocal(const Vector &localCoords) const;
131  const Matrix &getVectorGlobalCoordFromLocal(const Matrix &localCoords) const;
132  const Vector &getVectorLocalCoordFromGlobal(const Vector &globalCoords) const;
133 
134  const Matrix &getCooNodes(void) const;
135  const Matrix &getCooPoints(const size_t &ndiv) const;
136  const Vector &getCooPoint(const double &xrel) const;
137  };
138 } // end of XC namespace
139 
140 #endif
const Matrix & getCooNodes(void) const
Return the coordinates of the nodes as rows of the returned matrix.
Definition: CrdTransf2d.cpp:604
Float vector abstraction.
Definition: Vector.h:94
void set_rigid_joint_offsetI(const Vector &rigJntOffsetI)
check rigid joint offset for node I
Definition: CrdTransf2d.cpp:77
Communication parameters between processes.
Definition: Communicator.h:66
int getInitialLocalAxes(Vector &xAxis, Vector &yAxis) const
axis for the initial (undeformed) geometry.
Definition: CrdTransf2d.cpp:478
Pos2d getPosNodeJ(void) const
Return the position of the node J.
Definition: CrdTransf2d.cpp:527
Posición en dos dimensiones.
Definition: Pos2d.h:41
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
double sinTheta
direction cosines of undeformed element wrt to global system
Definition: CrdTransf2d.h:81
Pos2d getPosNodeI(void) const
Return the position of the node I.
Definition: CrdTransf2d.cpp:517
const Matrix & getPointsGlobalCoordFromBasic(const Vector &) const
Return the global coordinates of the points.
Definition: CrdTransf2d.cpp:554
const Vector & getBasicTrialDisp(void) const
Return the displacements expresados on the basic system.
Definition: CrdTransf2d.cpp:241
int computeElemtLengthAndOrient(void) const
Computes the length and the orientation of the associated element.
Definition: CrdTransf2d.cpp:182
void nodes_init_disp(void)
Checks for initial displacements on nodes and, if they exist,.
Definition: CrdTransf2d.cpp:113
const Vector & getBasicIncrDisp(void) const
Return the incrementos de displacement expresados on the basic system.
Definition: CrdTransf2d.cpp:294
int getLocalAxes(Vector &xAxis, Vector &yAxis) const
current position.
Definition: CrdTransf2d.cpp:487
const Vector & getCooPoint(const double &xrel) const
Return the point that correspond to the relative coordinate 0<=xrel<=1.
Definition: CrdTransf2d.cpp:637
const Matrix & getCooPoints(const size_t &ndiv) const
Return points distributed between the nodes as a matrix with the coordinates as rows.
Definition: CrdTransf2d.cpp:619
int initialize(Node *node1Pointer, Node *node2Pointer)
Calculates initial displecements from those of the nodes.
Definition: CrdTransf2d.cpp:144
const Vector & getI(void) const
Return the ${i}$ unit vector of the local axis expressed in global coordinates for the current geomet...
Definition: CrdTransf2d.cpp:456
Two-dimensional reference system defined in a two-dimensional space.
Definition: Ref2d2d.h:39
const Vector & getVectorLocalCoordFromGlobal(const Vector &globalCoords) const
Return the vector expressed in local coordinates.
Definition: CrdTransf2d.cpp:595
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:78
const Vector & getInitialJ(void) const
Return the ${j}$ unit vector of the local axis expressed in global coordinates for the initial (undef...
Definition: CrdTransf2d.cpp:462
double getInitialLength(void) const
Return the initial length of the element.
Definition: CrdTransf2d.h:106
double L
element length
Definition: CrdTransf.h:92
double getDeformedLength(void) const
Return the length of the deformed element.
Definition: CrdTransf2d.h:109
const Vector & getInitialI(void) const
Return the ${i}$ unit vector of the local axis expressed in global coordinates for the initial (undef...
Definition: CrdTransf2d.cpp:445
CrdTransf2d(int tag, int classTag)
constructor:
Definition: CrdTransf2d.cpp:73
Vector getPointLocalCoordFromGlobal(const Vector &xg) const
Return the local coordinates of the point from the local ones.
Definition: CrdTransf2d.cpp:544
const Vector & getPointGlobalCoordFromBasic(const double &xi) const
Return the global coordinates of the point.
Definition: CrdTransf2d.cpp:507
int recvData(const Communicator &comm)
Receives object members through the communicator argument.
Definition: CrdTransf2d.cpp:660
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void set_rigid_joint_offsetJ(const Vector &rigJntOffsetJ)
check rigid joint offset for node J
Definition: CrdTransf2d.cpp:94
Matrix of floats.
Definition: Matrix.h:111
const Vector & getVectorGlobalCoordFromLocal(const Vector &localCoords) const
Return the vector expressed in global coordinates.
Definition: CrdTransf2d.cpp:570
int sendData(Communicator &comm)
Sends object members through the communicator argument.
Definition: CrdTransf2d.cpp:650
virtual CrdTransf2d * getCopy(void) const =0
Virtual constructor.
Mesh node.
Definition: Node.h:111
Ref2d2d getLocalReference(void) const
Return the local reference system.
Definition: CrdTransf2d.cpp:537
Vector nodeJOffset
rigid joint offsets
Definition: CrdTransf.h:93
const Vector & getJ(void) const
Return the ${j}$ unit vector of the local axis expressed in global coordinates for the current geomet...
Definition: CrdTransf2d.cpp:473