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 <iostream.h>
00031 #include <stdio.h>
00032 #include <stdlib.h>
00033 #include <math.h>
00034
00035 #include <ID.h>
00036 #include <Vector.h>
00037 #include <Matrix.h>
00038 #include <Element.h>
00039 #include <Node.h>
00040 #include <NDMaterial.h>
00041
00043 class BbarBrick : public Element {
00044
00046 public :
00047
00048
00049 BbarBrick( ) ;
00050
00052 BbarBrick( int tag,
00053 int node1,
00054 int node2,
00055 int node3,
00056 int node4,
00057 int node5,
00058 int node6,
00059 int node7,
00060 int node8,
00061 NDMaterial &theMaterial ) ;
00062
00064 virtual ~BbarBrick( ) ;
00065
00067 void setDomain( Domain *theDomain ) ;
00068
00070 int getNumExternalNodes( ) const ;
00071
00073 const ID &getExternalNodes( ) ;
00074
00076 int getNumDOF( ) ;
00077
00079 int commitState( ) ;
00080
00082 int revertToLastCommit( ) ;
00083
00085 int revertToStart( ) ;
00086
00088 void Print( ostream &s, int flag ) ;
00089
00091 const Matrix &getTangentStiff( ) ;
00092
00094 const Matrix &getSecantStiff( ) ;
00095
00097 const Matrix &getDamp( ) ;
00098
00100 const Matrix &getMass( ) ;
00101
00103 void zeroLoad( ) ;
00104
00106 int addLoad( const Vector &addP ) ;
00107
00109 const Vector &getResistingForce( ) ;
00110
00112 const Vector &getResistingForceIncInertia( ) ;
00113
00115 int sendSelf (int commitTag, Channel &theChannel);
00117 int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00118 &theBroker);
00119
00121 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00122
00124 private :
00125
00126
00127 static Matrix stiff ;
00129 static Vector resid ;
00131 static Matrix mass ;
00133 static Matrix damping ;
00134
00136 static const double root3 ;
00138 static const double one_over_root3 ;
00140 static const double sg[2] ;
00142 static const double wg[8] ;
00143
00144
00146 ID connectedExternalNodes ;
00147 Node *nodePointers[8] ;
00148
00149
00151 NDMaterial *materialPointers[8] ;
00152
00153
00155
00156
00158 void formInertiaTerms( int tangFlag ) ;
00159
00161 void formResidAndTangent( int tang_flag ) ;
00162
00164 void computeBasis( ) ;
00165
00167 Matrix computeBbar( int node,
00168 const double shp[4][8],
00169 const double shpBar[4][8] ) ;
00170
00172 Matrix transpose( int dim1, int dim2, const Matrix &M ) ;
00173
00174 } ;
00175
00176
00177
00178
00179
00180
00181
00182 ÿ