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 #include <iostream.h>
00026 #include <stdio.h>
00027 #include <stdlib.h>
00028 #include <math.h>
00029
00030 #include <ID.h>
00031 #include <Vector.h>
00032 #include <Matrix.h>
00033 #include <Element.h>
00034 #include <Node.h>
00035 #include <NDMaterial.h>
00036
00038 class EnhancedQuad : public Element {
00039
00040 public:
00041
00043 EnhancedQuad(int tag,
00044 int nd1,
00045 int nd2,
00046 int nd3,
00047 int nd4,
00048 NDMaterial &theMaterial,
00049 const char *type ) ;
00050
00052 EnhancedQuad();
00053
00055 virtual ~EnhancedQuad();
00056
00057
00059 void setDomain( Domain *theDomain ) ;
00060
00062 int getNumExternalNodes( ) const ;
00063
00065 const ID &getExternalNodes( ) ;
00066
00068 int getNumDOF( ) ;
00069
00071 int commitState( ) ;
00072
00074 int revertToLastCommit( ) ;
00075
00077 int revertToStart( ) ;
00078
00080 void Print( ostream &s, int flag ) ;
00081
00083 const Matrix &getTangentStiff( ) ;
00084
00086 const Matrix &getSecantStiff( ) ;
00087
00089 const Matrix &getDamp( ) ;
00090
00092 const Matrix &getMass( ) ;
00093
00095 void zeroLoad( ) ;
00096
00098 int addLoad( const Vector &addP ) ;
00099
00101 const Vector &getResistingForce( ) ;
00102
00104 const Vector &getResistingForceIncInertia( ) ;
00105
00107 int sendSelf (int commitTag, Channel &theChannel);
00109 int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00110 &theBroker);
00111
00113 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00114
00115 private:
00116
00118 static Matrix stiff ;
00120 static Vector resid ;
00122 static Matrix mass ;
00124 static Matrix damping ;
00125
00127 static const double root3 ;
00129 static const double one_over_root3 ;
00131 static const double sg[4] ;
00133 static const double tg[4] ;
00135 static const double wg[4] ;
00136
00138 static double stressData[][4] ;
00139
00141 static double tangentData[][3][4] ;
00142
00144 ID connectedExternalNodes ;
00145 Node *nodePointers[4] ;
00146
00148 Vector alpha ;
00149
00151 NDMaterial *materialPointers[4] ;
00152
00153
00155
00156
00158 void saveData( int gp,
00159 const Vector &stress,
00160 const Matrix &tangent ) ;
00161
00163 void getData( int gp,
00164 Vector &stress,
00165 Matrix &tangent ) ;
00166
00168 Matrix computeBenhanced( int node,
00169 double L1,
00170 double L2,
00171 double j,
00172 const Matrix &Jinv ) ;
00173
00174
00176 void computeBasis( ) ;
00177
00179 void formResidAndTangent( int tang_flag ) ;
00180
00182 void formInertiaTerms( int tangFlag ) ;
00183
00184
00186 void computeJacobian( double L1, double L2,
00187 const double x[2][4],
00188 Matrix &JJ,
00189 Matrix &JJinv ) ;
00190
00192 Matrix computeB( int node, const double shp[3][4] ) ;
00193
00195 Matrix transpose( int dim1, int dim2, const Matrix &M ) ;
00196
00198 void shape2d( double ss, double tt,
00199 const double x[2][4],
00200 double shp[3][4],
00201 double &xsj ) ;
00202
00203
00204 } ;
00205
00206
00207 ÿ