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 <stdio.h>
00026 #include <stdlib.h>
00027 #include <math.h>
00028
00029 #include <ID.h>
00030 #include <Vector.h>
00031 #include <Matrix.h>
00032 #include <Element.h>
00033 #include <Node.h>
00034 #include <NDMaterial.h>
00035
00036 class EnhancedQuad : public Element {
00037
00038 public:
00039
00040
00041 EnhancedQuad(int tag,
00042 int nd1,
00043 int nd2,
00044 int nd3,
00045 int nd4,
00046 NDMaterial &theMaterial,
00047 const char *type ) ;
00048
00049
00050 EnhancedQuad();
00051
00052
00053 ~EnhancedQuad();
00054
00055 const char *getClassType(void) const {return "EnhancedQuad";};
00056
00057
00058 void setDomain( Domain *theDomain ) ;
00059
00060 int getNumExternalNodes( ) const ;
00061 const ID &getExternalNodes( ) ;
00062 Node **getNodePtrs(void);
00063
00064
00065 int getNumDOF( ) ;
00066
00067
00068 int commitState( ) ;
00069 int revertToLastCommit( ) ;
00070 int revertToStart( ) ;
00071 int update(void);
00072
00073
00074 void Print( OPS_Stream &s, int flag ) ;
00075
00076
00077 const Matrix &getTangentStiff();
00078 const Matrix &getInitialStiff();
00079 const Matrix &getMass();
00080
00081
00082 void zeroLoad( ) ;
00083 int addLoad(ElementalLoad *theLoad, double loadFactor);
00084 int addInertiaLoadToUnbalance(const Vector &accel);
00085
00086
00087 const Vector &getResistingForce( ) ;
00088
00089
00090 const Vector &getResistingForceIncInertia( ) ;
00091
00092
00093 Response *setResponse(const char **argv, int argc,
00094 Information &eleInformation, OPS_Stream &s);
00095
00096 int getResponse(int responseID, Information &eleInformation);
00097 int sendSelf (int commitTag, Channel &theChannel);
00098 int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00099 &theBroker);
00100
00101
00102 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00103
00104 private:
00105
00106
00107 static Matrix stiff ;
00108 static Vector resid ;
00109 static Matrix mass ;
00110 static Matrix damping ;
00111
00112
00113 static const double root3 ;
00114 static const double one_over_root3 ;
00115 static const double sg[4] ;
00116 static const double tg[4] ;
00117 static const double wg[4] ;
00118
00119
00120 static double stressData[][4] ;
00121
00122
00123 static double tangentData[][3][4] ;
00124
00125
00126 ID connectedExternalNodes ;
00127 Node *nodePointers[4] ;
00128
00129
00130 Vector alpha ;
00131
00132
00133 NDMaterial *materialPointers[4] ;
00134
00135
00136
00137 static double xl[][4] ;
00138
00139
00140 void saveData( int gp,
00141 const Vector &stress,
00142 const Matrix &tangent ) ;
00143
00144
00145 void getData( int gp,
00146 Vector &stress,
00147 Matrix &tangent ) ;
00148
00149
00150 const Matrix& computeBenhanced( int node,
00151 double L1,
00152 double L2,
00153 double j,
00154 const Matrix &Jinv ) ;
00155
00156
00157
00158 void computeBasis( ) ;
00159
00160
00161 void formResidAndTangent( int tang_flag ) ;
00162
00163
00164 void formInertiaTerms( int tangFlag ) ;
00165
00166
00167
00168 void computeJacobian( double L1, double L2,
00169 const double x[2][4],
00170 Matrix &JJ,
00171 Matrix &JJinv ) ;
00172
00173
00174 const Matrix& computeB( int node, const double shp[3][4] ) ;
00175
00176
00177 const Matrix& transpose( const Matrix &M ) ;
00178
00179
00180 void shape2d( double ss, double tt,
00181 const double x[2][4],
00182 double shp[3][4],
00183 double &xsj ) ;
00184
00185 Vector *load;
00186 Matrix *Ki;
00187 } ;
00188
00189