00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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 ConstantPressureVolumeQuad : public Element
00042 {
00043
00044 public :
00045
00046 ConstantPressureVolumeQuad( ) ;
00047 ConstantPressureVolumeQuad( int tag,
00048 int node1,
00049 int node2,
00050 int node3,
00051 int node4,
00052 NDMaterial &theMaterial ) ;
00053 virtual ~ConstantPressureVolumeQuad( ) ;
00054
00055 const char *getClassType(void) const {return "ConstantPressureVolumeQuad";};
00056
00057 int getNumExternalNodes( ) const ;
00058 const ID &getExternalNodes( ) ;
00059 Node **getNodePtrs(void);
00060
00061 int getNumDOF( ) ;
00062 void setDomain( Domain *theDomain ) ;
00063
00064
00065 int commitState( ) ;
00066 int revertToLastCommit( ) ;
00067 int revertToStart( ) ;
00068 int update(void);
00069
00070
00071 const Matrix &getTangentStiff();
00072 const Matrix &getInitialStiff();
00073 const Matrix &getMass();
00074
00075
00076 void zeroLoad( ) ;
00077 int addLoad(ElementalLoad *theLoad, double loadFactor);
00078 int addInertiaLoadToUnbalance(const Vector &accel);
00079
00080 const Vector &getResistingForce( ) ;
00081 const Vector &getResistingForceIncInertia( ) ;
00082
00083
00084 Response *setResponse(const char **argv, int argc,
00085 Information &eleInformation, OPS_Stream &s);
00086
00087 int getResponse(int responseID, Information &eleInformation);
00088 int sendSelf (int commitTag, Channel &theChannel);
00089 int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00090 &theBroker);
00091 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00092 void Print( OPS_Stream &s, int flag ) ;
00093
00094
00095 private :
00096
00097
00098 static double matrixData[64];
00099 static Matrix stiff ;
00100 static Vector resid ;
00101 static Matrix mass ;
00102 static Matrix damping ;
00103
00104
00105 static double one3 ;
00106 static double two3 ;
00107 static double four3 ;
00108 static double one9 ;
00109
00110
00111 static double root3 ;
00112 static double one_over_root3 ;
00113 static double sg[4] ;
00114 static double tg[4] ;
00115 static double wg[4] ;
00116
00117
00118 ID connectedExternalNodes ;
00119 Node *nodePointers[4] ;
00120
00121
00122 NDMaterial *materialPointers[4] ;
00123
00124
00125 double xl[2][4] ;
00126
00127
00128 void formResidAndTangent( int tang_flag ) ;
00129
00130
00131 void formInertiaTerms( int tangFlag ) ;
00132
00133
00134 void shape2d( double ss, double tt,
00135 const double x[2][4],
00136 double shp[3][4],
00137 double &xsj,
00138 Matrix &sx ) ;
00139
00140 Vector *load;
00141 } ;