XC Open source finite element analysis program
CorotCrdTransf3d.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.9 $
48 // $Date: 2006/01/13 01:07:48 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/CorotCrdTransf3d.h,v $
50 
51 
52 // Written: Remo Magalhaes de Souza (rmsouza@ce.berkeley.edu)
53 // Created: 04/2000
54 // Revision: A
55 //
56 // Description: This file contains the class definition for
57 // CorotCrdTransf3d.h. CorotCrdTransf3d provides the
58 // abstraction of a corotation transformation for a spatial frame element
59 
60 // What: "@(#) CorotCrdTransf3d.h, revA"
61 
62 #ifndef CorotCrdTransf3d_h
63 #define CorotCrdTransf3d_h
64 
65 #include "CrdTransf3d.h"
66 #include <utility/matrix/Vector.h>
67 #include <utility/matrix/Matrix.h>
68 
69 namespace XC {
71 //
74  {
75  private:
76  Vector vAxis;
77 
78  mutable Vector xAxis;
79  mutable double Ln;
80 
81  mutable Vector alphaIq;
82  mutable Vector alphaJq;
83 
84  Vector alphaIqcommit;
85  Vector alphaJqcommit;
86  mutable Vector alphaI;
87  mutable Vector alphaJ;
88 
89  Vector ul;
90  Vector ulcommit;
91  Vector ulpr;
92 
93  static Matrix RI;
94  static Matrix RJ;
95  static Matrix Rbar;
96  static Matrix e;
97  static Matrix Tp;
98  static Matrix T;
99  static Matrix Lr2, Lr3, A;
100 
101  inline int computeElemtLengthAndOrient(void) const
102  {
103  std::cerr << "CorotCrdTransf3d::computeElemtLengthAndOrient; not implemented."
104  << std::endl;
105  return 0;
106  }
107  void compTransfMatrixBasicGlobal(void);
108  void compTransfMatrixBasicGlobalNew(void);
109  const Vector &getQuaternionFromRotMatrix(const Matrix &RotMatrix) const;
110  const Vector &getQuaternionFromPseudoRotVector(const Vector &theta) const;
111  const Vector &getTangScaledPseudoVectorFromQuaternion(const Vector &theta) const;
112  const Vector &quaternionProduct(const Vector &q1, const Vector &q2) const;
113  const Matrix &getRotationMatrixFromQuaternion(const Vector &q) const;
114  const Matrix &getRotMatrixFromTangScaledPseudoVector(const Vector &w) const;
115  const Matrix &getSkewSymMatrix(const Vector &theta) const;
116  const Matrix &getLMatrix(const Vector &ri) const;
117  const Matrix &getKs2Matrix(const Vector &ri, const Vector &z) const;
118 
119 
120 
121  Vector &basic_to_local_element_force(const Vector &p0) const;
122  const Vector &local_to_global_element_force(const Vector &) const;
123  protected:
124  int sendData(CommParameters &);
125  int recvData(const CommParameters &);
126  virtual int calculaEjesLocales(void) const;
127  public:
128  CorotCrdTransf3d(int tag= 0);
129  CorotCrdTransf3d(int tag, const Vector &vecInLocXZPlane,const Vector &rigJntOffsetI, const Vector &rigJntOffsetJ);
130 
131  int initialize(Node *nodeIPointer, Node *nodeJPointer);
132  int update(void);
133  double getInitialLength(void) const;
134  double getDeformedLength(void) const;
135 
136  virtual void set_xz_vector(const Vector &vecInLocXZPlane);
137 
138  int commitState(void);
139  int revertToLastCommit(void);
140  int revertToStart(void);
141 
142  const Vector &getBasicTrialDisp(void) const;
143  const Vector &getBasicIncrDisp(void) const;
144  const Vector &getBasicIncrDeltaDisp(void) const;
145  const Vector &getBasicTrialVel(void) const;
146  const Vector &getBasicTrialAccel(void) const;
147 
148  const Vector &getGlobalResistingForce(const Vector &basicForce, const Vector &uniformLoad) const;
149  const Matrix &getGlobalStiffMatrix(const Matrix &basicStiff, const Vector &basicForce) const;
150  const Matrix &getInitialGlobalStiffMatrix(const Matrix &basicStiff) const;
151 
152  CrdTransf3d *getCopy(void) const;
153 
154  int sendSelf(CommParameters &);
155  int recvSelf(const CommParameters &);
156 
157  void Print(std::ostream &s, int flag = 0);
158 
159  // functions used in post-processing only
160  const Vector &getPointGlobalCoordFromLocal(const Vector &) const;
161  const Vector &getPointGlobalDisplFromBasic(double xi, const Vector &basicDisps) const;
162  const Vector &getVectorGlobalCoordFromLocal(const Vector &localCoords) const;
163  const Matrix &getVectorGlobalCoordFromLocal(const Matrix &localCoords) const;
164  const Vector &getVectorLocalCoordFromGlobal(const Vector &globalCoords) const;
165  };
166 } // end of XC namespace
167 #endif
Definition: Vector.h:82
Mesh node.
Definition: Node.h:99
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: CorotCrdTransf3d.cpp:1947
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:80
virtual void set_xz_vector(const Vector &vecInLocXZPlane)
Asigna el valor del vector contenido en el plano XZ local.
Definition: CorotCrdTransf3d.cpp:193
Definition: Matrix.h:82
Coordinate transformation corrotacional en 3d.
Definition: CorotCrdTransf3d.h:73
const Vector & getVectorGlobalCoordFromLocal(const Vector &localCoords) const
Returns the vector expresado en coordenadas globales.
Definition: CorotCrdTransf3d.cpp:1484
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: CorotCrdTransf3d.cpp:2010
const Vector & getVectorLocalCoordFromGlobal(const Vector &globalCoords) const
Returns the vector expresado en coordenadas locales.
Definition: CorotCrdTransf3d.cpp:1508
Communication parameters between processes.
Definition: CommParameters.h:65
CrdTransf3d * getCopy(void) const
Virtual constructor.
Definition: CorotCrdTransf3d.cpp:1921
================================================================================
Definition: ContinuaReprComponent.h:34
int sendData(CommParameters &)
Sends object members through the channel being passed as parameter.
Definition: CorotCrdTransf3d.cpp:1925