EnhancedQuad.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/08/04 19:07:15 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/fourNodeQuad/EnhancedQuad.h,v $
00024                                                                         
00025 #include <stdio.h> 
00026 #include <stdlib.h> 
00027 #include <math.h> 
00028 
00029 #include <ID.h> 
00030 #include <Vector.h>
00031 #include <Matrix.h>
00032 #include <Element.h>
00033 #include <Node.h>
00034 #include <NDMaterial.h>
00035 
00036 class EnhancedQuad : public Element {
00037 
00038   public:
00039 
00040   //full constructor
00041     EnhancedQuad(int tag, 
00042                  int nd1, 
00043                  int nd2, 
00044                  int nd3, 
00045                  int nd4,
00046                  NDMaterial &theMaterial, 
00047                  const char *type ) ;
00048 
00049     //null constructor
00050     EnhancedQuad();
00051 
00052     //destructor
00053     ~EnhancedQuad();
00054 
00055     const char *getClassType(void) const {return "EnhancedQuad";};
00056 
00057     //set domain
00058     void setDomain( Domain *theDomain ) ;
00059 
00060     int getNumExternalNodes( ) const ;
00061     const ID &getExternalNodes( ) ;
00062     Node **getNodePtrs(void);
00063 
00064     //return number of dofs
00065     int getNumDOF( ) ;
00066 
00067     // methods dealing with state updates
00068     int commitState( ) ;
00069     int revertToLastCommit( ) ;
00070     int revertToStart( ) ;
00071     int update(void);
00072 
00073     //print out element data
00074     void Print( OPS_Stream &s, int flag ) ;
00075         
00076     //return stiffness matrix 
00077     const Matrix &getTangentStiff();
00078     const Matrix &getInitialStiff();
00079     const Matrix &getMass();
00080 
00081     //zero the load -- what load?
00082     void zeroLoad( ) ;
00083     int addLoad(ElementalLoad *theLoad, double loadFactor);
00084     int addInertiaLoadToUnbalance(const Vector &accel);
00085 
00086     //get residual
00087     const Vector &getResistingForce( ) ;
00088     
00089     //get residual with inertia terms
00090     const Vector &getResistingForceIncInertia( ) ;
00091 
00092     // public methods for element output
00093     Response *setResponse(const char **argv, int argc, 
00094                           Information &eleInformation, OPS_Stream &s);
00095 
00096     int getResponse(int responseID, Information &eleInformation);
00097     int sendSelf (int commitTag, Channel &theChannel);
00098     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker 
00099                   &theBroker);
00100       
00101     //plotting 
00102     int displaySelf(Renderer &theViewer, int displayMode, float fact);
00103     
00104   private:
00105 
00106     //static data
00107     static Matrix stiff ;
00108     static Vector resid ;
00109     static Matrix mass ;
00110     static Matrix damping ;
00111 
00112     //quadrature data
00113     static const double root3 ;
00114     static const double one_over_root3 ;    
00115     static const double sg[4] ;
00116     static const double tg[4] ;
00117     static const double wg[4] ;
00118 
00119     //stress data
00120     static double stressData[][4] ;
00121 
00122     //tangent data 
00123     static double tangentData[][3][4] ;
00124 
00125     //node information
00126     ID connectedExternalNodes ;  //four node numbers
00127     Node *nodePointers[4] ;      //pointers to four nodes
00128 
00129     //enhanced strain parameters
00130     Vector alpha ;
00131 
00132     //material information
00133     NDMaterial *materialPointers[4] ; //pointers to four materials
00134                                           
00135     //local nodal coordinates, two coordinates for each of four nodes
00136     //    static double xl[2][4] ; 
00137     static double xl[][4] ; 
00138 
00139     //save stress and tangent data
00140     void saveData( int gp, 
00141                    const Vector &stress,
00142                    const Matrix &tangent ) ;
00143 
00144     //recover stress and tangent data
00145     void getData( int gp,
00146                   Vector &stress,
00147                   Matrix &tangent ) ;
00148 
00149     //compute enhanced strain B-matrices
00150     const Matrix& computeBenhanced( int node, 
00151                              double L1,
00152                              double L2,
00153                              double j, 
00154                              const Matrix &Jinv ) ;
00155 
00156                            
00157     //compute local coordinates and basis
00158     void computeBasis( ) ;
00159         
00160     //form residual and tangent                                   
00161     void formResidAndTangent( int tang_flag ) ;
00162 
00163     //inertia terms
00164     void formInertiaTerms( int tangFlag ) ;
00165 
00166 
00167     //compute Jacobian matrix and inverse at point {L1,L2}
00168     void  computeJacobian( double L1, double L2, 
00169                            const double x[2][4], 
00170                            Matrix &JJ, 
00171                            Matrix &JJinv ) ;
00172 
00173     //compute Bbend matrix
00174     const Matrix& computeB( int node, const double shp[3][4] ) ;
00175 
00176     //Matrix transpose of a 3x2 matrix
00177     const Matrix& transpose( const Matrix &M ) ;
00178 
00179     //shape function routine for four node quads
00180     void shape2d( double ss, double tt, 
00181                   const double x[2][4], 
00182                   double shp[3][4], 
00183                   double &xsj ) ;
00184 
00185     Vector *load;
00186     Matrix *Ki;
00187 } ; 
00188 
00189 

Generated on Mon Oct 23 15:05:07 2006 for OpenSees by doxygen 1.5.0