CorotCrdTransf3d.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.9 $                                                              
00022 // $Date: 2006/01/13 01:07:48 $                                                                  
00023 // $Source: /usr/local/cvs/OpenSees/SRC/coordTransformation/CorotCrdTransf3d.h,v $      
00024 
00025 
00026 // Written: Remo Magalhaes de Souza (rmsouza@ce.berkeley.edu)
00027 // Created: 04/2000
00028 // Revision: A
00029 //
00030 // Description: This file contains the class definition for
00031 // CorotCrdTransf3d.h. CorotCrdTransf3d provides the
00032 // abstraction of a corotation transformation for a spatial frame element
00033 
00034 // What: "@(#) CorotCrdTransf3d.h, revA"
00035 
00036 #ifndef CorotCrdTransf3d_h
00037 #define CorotCrdTransf3d_h
00038 
00039 #include <CrdTransf3d.h>
00040 #include <Vector.h>
00041 #include <Matrix.h>
00042 
00043 class CorotCrdTransf3d: public CrdTransf3d
00044 {
00045 public:
00046     CorotCrdTransf3d(int tag, const Vector &vecInLocXZPlane,
00047         const Vector &rigJntOffsetI, const Vector &rigJntOffsetJ);
00048     
00049     CorotCrdTransf3d();
00050     ~CorotCrdTransf3d();
00051     
00052     int initialize(Node *nodeIPointer, Node *nodeJPointer);
00053     int update(void);
00054     double getInitialLength(void);
00055     double getDeformedLength(void);
00056     
00057     int commitState(void);
00058     int revertToLastCommit(void);        
00059     int revertToStart(void);
00060     
00061     const Vector &getBasicTrialDisp(void);
00062     const Vector &getBasicIncrDisp(void);
00063     const Vector &getBasicIncrDeltaDisp(void);
00064         const Vector &getBasicTrialVel(void);
00065         const Vector &getBasicTrialAccel(void);
00066     
00067     const Vector &getGlobalResistingForce(const Vector &basicForce, const Vector &uniformLoad);
00068     const Matrix &getGlobalStiffMatrix(const Matrix &basicStiff, const Vector &basicForce);
00069     const Matrix &getInitialGlobalStiffMatrix(const Matrix &basicStiff);
00070     
00071     CrdTransf3d *getCopy(void);
00072     
00073     int sendSelf(int cTag, Channel &theChannel);
00074     int recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00075     
00076     void Print(OPS_Stream &s, int flag = 0);
00077     
00078     // functions used in post-processing only    
00079     const Vector &getPointGlobalCoordFromLocal(const Vector &localCoords);
00080     const Vector &getPointGlobalDisplFromBasic(double xi, const Vector &basicDisps);
00081     
00082     int  getLocalAxes(Vector &xAxis, Vector &yAxis, Vector &zAxis);
00083     
00084 private:
00085     void compTransfMatrixBasicGlobal(void);
00086     void compTransfMatrixBasicGlobalNew(void);
00087     const Vector &getQuaternionFromRotMatrix(const Matrix &RotMatrix) const;
00088     const Vector &getQuaternionFromPseudoRotVector(const Vector &theta) const;
00089     const Vector &getTangScaledPseudoVectorFromQuaternion(const Vector &theta) const;
00090     const Vector &quaternionProduct(const Vector &q1, const Vector &q2) const;
00091     const Matrix &getRotationMatrixFromQuaternion(const Vector &q) const;
00092     const Matrix &getRotMatrixFromTangScaledPseudoVector(const Vector &w) const;
00093     const Matrix &getSkewSymMatrix(const Vector &theta) const;
00094     const Matrix &getLMatrix(const Vector &ri) const;
00095     const Matrix &getKs2Matrix(const Vector &ri, const Vector &z) const;
00096     
00097     // internal data
00098     Node *nodeIPtr, *nodeJPtr;  // pointers to the element two endnodes
00099     
00100     Vector vAxis;               // Vector that lies in local plane xz
00101     Vector nodeIOffset, nodeJOffset;    // rigid joint offsets
00102     
00103     Vector xAxis;               // local x axis
00104     double L;                   // undeformed element length
00105     double Ln;                  // deformed element length
00106     
00107     Matrix R0;                  // rotation matrix from local to global coordinates
00108                                 // (the columns of which are the element local axes)
00109     Vector alphaIq;             // quaternion for node I
00110     Vector alphaJq;             // quaternion for node I
00111     
00112     Vector alphaIqcommit;       // commited quaternion for node I
00113     Vector alphaJqcommit;       // commited quaternion for node J
00114     Vector alphaI;              // last trial rotations end i
00115     Vector alphaJ;              // last trial rotatations end j
00116     
00117     Vector ul;                  // local displacements
00118     Vector ulcommit;            // commited local displacements
00119     Vector ulpr;                // previous local displacements
00120     
00121     static Matrix RI;           // nodal triad for node 1
00122     static Matrix RJ;           // nodal triad for node 2
00123     static Matrix Rbar;         // mean nodal triad 
00124     static Matrix e;            // base vectors
00125     static Matrix Tp;           // transformation matrix to renumber dofs
00126     static Matrix T;            // transformation matrix from basic to global system
00127     static Matrix Lr2, Lr3, A;  // auxiliary matrices   
00128     
00129     double *nodeIInitialDisp, *nodeJInitialDisp;
00130     bool initialDispChecked;
00131 };
00132 #endif

Generated on Mon Oct 23 15:04:59 2006 for OpenSees by doxygen 1.5.0