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

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