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 #ifndef TWENTY_NODE_BRICK_H
00026 #define TWENTY_NODE_BRICK_H
00027
00028 #include <stdio.h>
00029 #include <stdlib.h>
00030 #include <math.h>
00031
00032 #include <ID.h>
00033 #include <Vector.h>
00034 #include <Matrix.h>
00035 #include <Element.h>
00036 #include <Node.h>
00037 #include <NDMaterial.h>
00038
00039 class Twenty_Node_Brick : public Element {
00040
00041 public:
00042
00043 Twenty_Node_Brick( ) ;
00044
00045
00046 Twenty_Node_Brick( int tag,
00047 int node1,
00048 int node2,
00049 int node3,
00050 int node4,
00051 int node5,
00052 int node6,
00053 int node7,
00054 int node8,
00055 int node9,
00056 int node10,
00057 int node11,
00058 int node12,
00059 int node13,
00060 int node14,
00061 int node15,
00062 int node16,
00063 int node17,
00064 int node18,
00065 int node19,
00066 int node20,
00067 NDMaterial &theMaterial,
00068 double b1 = 0.0, double b2 = 0.0, double b3 = 0.0) ;
00069
00070
00071 virtual ~Twenty_Node_Brick( ) ;
00072
00073 const char *getClassType(void) const {return "Twenty_Node_Brick";};
00074
00075
00076 void setDomain( Domain *theDomain ) ;
00077
00078
00079 int getNumExternalNodes( ) const ;
00080
00081
00082 const ID &getExternalNodes( ) ;
00083 Node **getNodePtrs(void);
00084
00085
00086 int getNumDOF( ) ;
00087
00088
00089 int commitState( ) ;
00090
00091
00092 int revertToLastCommit( ) ;
00093
00094
00095 int revertToStart( ) ;
00096
00097
00098 void Print( OPS_Stream &s, int flag ) ;
00099
00100 int update(void);
00101
00102
00103 const Matrix &getTangentStiff( ) ;
00104 const Matrix &getInitialStiff( ) ;
00105 const Matrix &getDamp(void);
00106 const Matrix &getMass( ) ;
00107
00108 void zeroLoad( ) ;
00109 int addLoad(ElementalLoad *theLoad, double loadFactor);
00110 int addInertiaLoadToUnbalance(const Vector &accel);
00111
00112
00113 const Vector &getResistingForce( ) ;
00114
00115
00116 const Vector &getResistingForceIncInertia( ) ;
00117
00118
00119 int sendSelf (int commitTag, Channel &theChannel);
00120 int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00121 &theBroker);
00122
00123 Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00124 int getResponse(int responseID, Information &eleInformation);
00125
00126
00127 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00128
00129 private :
00130
00131
00132 static Matrix stiff ;
00133 static Vector resid ;
00134 static Matrix mass ;
00135 static Matrix damp ;
00136
00137
00138 static const int nintu;
00139 static const int nenu;
00140
00141
00142
00143 ID connectedExternalNodes ;
00144 Node *nodePointers[20] ;
00145
00146
00147
00148 NDMaterial **materialPointers;
00149
00150
00151
00152 static double xl[3][20] ;
00153 double b[3];
00154
00155 static double shgu[4][20][27];
00156 static double shlu[4][20][27];
00157 static double wu[27];
00158 static double dvolu[27];
00159
00160
00161 void formInertiaTerms( int tangFlag ) ;
00162
00163
00164 void formDampingTerms( int tangFlag ) ;
00165
00166
00167 double mixtureRho(int ipt);
00168
00169
00170 void computeBasis( ) ;
00171
00172 Vector *load;
00173 Matrix *Ki;
00174
00175
00176 void compuLocalShapeFunction();
00177 void Jacobian3d(int gaussPoint, double& xsj, int mode);
00178 const Matrix& getStiff( int flag );
00179
00180
00181 } ;
00182
00183 #endif