Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ConstantPressureVolumeQuad.h

Go to the documentation of this file.
00001 // Ed "C++" Love
00002 // Do not ask Prashant about this code.  He has no clue. 
00003 //
00004 // Constant Presssure/Volume Four Node Quadrilateral
00005 // Plane Strain (NOT PLANE STRESS)
00006 //
00007 
00008 #include <iostream.h>
00009 #include <stdio.h> 
00010 #include <stdlib.h> 
00011 #include <math.h> 
00012 
00013 #include <ID.h> 
00014 #include <Vector.h>
00015 #include <Matrix.h>
00016 #include <Element.h>
00017 #include <Node.h>
00018 #include <NDMaterial.h>
00019 
00021 class ConstantPressureVolumeQuad : public Element 
00022 {
00023 
00025   public :
00026     
00027     //null constructor
00028     ConstantPressureVolumeQuad( ) ;
00029   
00031     ConstantPressureVolumeQuad( int tag, 
00032            int node1,
00033            int node2,
00034            int node3,
00035            int node4,
00036            NDMaterial &theMaterial ) ;
00037 
00039     virtual ~ConstantPressureVolumeQuad( ) ;
00040 
00042     void setDomain( Domain *theDomain ) ;
00043 
00045     int getNumExternalNodes( ) const ;
00046  
00048     const ID &getExternalNodes( ) ;
00049 
00051     int getNumDOF( ) ;
00052 
00054     int commitState( ) ;
00055     
00057     int revertToLastCommit( ) ;
00058     
00060     int revertToStart( ) ;
00061 
00063     void Print( ostream &s, int flag ) ;
00064  
00066     const Matrix &getTangentStiff( ) ;
00067     
00069     const Matrix &getSecantStiff( ) ;
00070     
00072     const Matrix &getDamp( ) ;
00073     
00075     const Matrix &getMass( ) ;
00076 
00078     void zeroLoad( ) ;
00079  
00081     int addLoad( const Vector &addP ) ;
00082 
00084     const Vector &getResistingForce( ) ;
00085     
00087     const Vector &getResistingForceIncInertia( ) ;
00088 
00090     int sendSelf (int commitTag, Channel &theChannel);
00092     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker 
00093     &theBroker);
00094   
00096   private : 
00097 
00098     //static data
00099     static Matrix stiff ;
00101     static Vector resid ;
00103     static Matrix mass ;
00105     static Matrix damping ;
00106     
00108     static double one3 ;
00110     static double two3 ;
00112     static double four3 ;
00114     static double one9 ;
00115     
00117     static double root3 ;
00119     static double one_over_root3 ;    
00121     static double sg[4] ;
00123     static double tg[4] ;
00125     static double wg[4] ;
00126 
00127     
00129     ID connectedExternalNodes ;  
00130     Node *nodePointers[4] ;      //pointers to four nodes
00131      
00133     NDMaterial *materialPointers[4] ; //pointers to four materials
00134        
00136     double xl[2][4] ; 
00137     
00139     void formResidAndTangent( int tang_flag ) ;
00140 
00142     Matrix transpose( int dim1, int dim2, const Matrix &M ) ;
00143    
00145     void shape2d( double ss, double tt, 
00146     const double x[2][4], 
00147     double shp[3][4], 
00148     double &xsj, 
00149     Matrix &sx ) ;
00150 
00151     
00152 } ; 
00153 ÿ
Copyright Contact Us