NineNodeMixedQuad.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.6 $
00022 // $Date: 2006/08/04 19:07:15 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/fourNodeQuad/NineNodeMixedQuad.h,v $
00024 
00025 // Ed "C++" Love
00026 //
00027 // Constant Presssure/Volume Four Node Quadrilateral
00028 // Plane Strain (NOT PLANE STRESS)
00029 //
00030 
00031 #include <stdio.h> 
00032 #include <stdlib.h> 
00033 #include <math.h> 
00034 
00035 #include <ID.h> 
00036 #include <Vector.h>
00037 #include <Matrix.h>
00038 #include <Element.h>
00039 #include <Node.h>
00040 #include <NDMaterial.h>
00041 
00042 class NineNodeMixedQuad : public Element {
00043 
00044   public :
00045     
00046     //null constructor
00047     NineNodeMixedQuad( ) ;
00048   
00049     //full constructor
00050     NineNodeMixedQuad( int tag, 
00051                        int node1,
00052                        int node2,
00053                        int node3,
00054                        int node4,
00055                        int node5,
00056                        int node6,
00057                        int node7,
00058                        int node8,
00059                        int node9,
00060                        NDMaterial &theMaterial ) ;
00061 
00062     //destructor 
00063     ~NineNodeMixedQuad( ) ;
00064 
00065     const char *getClassType(void) const {return "NineNodeMixedQuad";};
00066 
00067     //set domain 
00068     void setDomain( Domain *theDomain ) ;
00069 
00070     //get the number of external nodes
00071     int getNumExternalNodes( ) const ;
00072  
00073     //return connected external nodes
00074     const ID &getExternalNodes( ) ;
00075     Node **getNodePtrs(void);
00076 
00077     //return number of dofs
00078     int getNumDOF( ) ;
00079 
00080     //commit state
00081     int commitState( ) ;
00082     
00083     //revert to last commit 
00084     int revertToLastCommit( ) ;
00085     
00086     //revert to start 
00087     int revertToStart( ) ;
00088 
00089     //print out element data
00090     void Print( OPS_Stream &s, int flag ) ;
00091         
00092     //return stiffness matrix 
00093     const Matrix &getTangentStiff();
00094     const Matrix &getInitialStiff();     
00095     const Matrix &getMass();
00096 
00097     void zeroLoad( ) ;
00098     int addLoad(ElementalLoad *theLoad, double loadFactor);
00099     int addInertiaLoadToUnbalance(const Vector &accel);
00100 
00101     //get residual
00102     const Vector &getResistingForce( ) ;
00103     
00104     //get residual with inertia terms
00105     const Vector &getResistingForceIncInertia( ) ;
00106 
00107     // public methods for element output
00108     Response *setResponse(const char **argv, int argc, 
00109                           Information &eleInformation, OPS_Stream &s);
00110 
00111     int getResponse(int responseID, Information &eleInformation);
00112 
00113     int sendSelf (int commitTag, Channel &theChannel);
00114     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker 
00115                   &theBroker);
00116 
00117     //plotting 
00118     int displaySelf(Renderer &theViewer, int displayMode, float fact);
00119   
00120   private : 
00121 
00122     //static data
00123     static Matrix stiff ;
00124     static Vector resid ;
00125     static Matrix mass ;
00126     static Matrix damping ;
00127     
00128     
00129     //quadrature data
00130     static double root06;
00131     static double sg[3] ;
00132     static double wg[3] ;
00133 
00134     //node information
00135     ID connectedExternalNodes ;  //nine node numbers
00136     Node *nodePointers[9] ;      //pointers to nine nodes
00137                                         
00138     //material information
00139     NDMaterial *materialPointers[9] ; //pointers to nine materials
00140                                           
00141     //nodal coordinates, two coordinates for each of nine nodes
00142     static double xl[][9] ; 
00143     
00144     //form residual and tangent                                   
00145     void formResidAndTangent( int tang_flag ) ;
00146 
00147     //inertia terms
00148     void formInertiaTerms( int tangFlag ) ;
00149 
00150     const Matrix& computeBbar( int node, 
00151                                const double natCoor[2], 
00152                                const double shp[3][9], 
00153                                double shpBar[3][9][3] ) ;
00154 
00155     //shape function routine for four node quads
00156     void shape2dNine( double coor[2], 
00157                   const double x[2][9], 
00158                   double shp[3][9], 
00159                   double &xsj ) ;
00160 
00161     //nodal coordinates
00162     void computeBasis( ) ;
00163 
00164     //1d quadratic shape functions
00165     double shape1d( int code, int node, double xi ) ;
00166 
00167     Vector *load;
00168     Matrix *Ki;
00169 } ; 

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