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 BbarBrick : public Element {
00042
00043 public :
00044
00045
00046 BbarBrick( ) ;
00047
00048
00049 BbarBrick( int tag,
00050 int node1,
00051 int node2,
00052 int node3,
00053 int node4,
00054 int node5,
00055 int node6,
00056 int node7,
00057 int node8,
00058 NDMaterial &theMaterial,
00059 double b1 = 0.0, double b2 = 0.0, double b3 = 0.0 ) ;
00060
00061
00062 virtual ~BbarBrick( ) ;
00063
00064 const char *getClassType(void) const {return "BbarBrick";};
00065
00066
00067 void setDomain( Domain *theDomain ) ;
00068
00069
00070 int getNumExternalNodes( ) const ;
00071
00072
00073 const ID &getExternalNodes( ) ;
00074 Node **getNodePtrs(void);
00075
00076
00077 int getNumDOF( ) ;
00078
00079
00080 int commitState( ) ;
00081
00082
00083 int revertToLastCommit( ) ;
00084
00085
00086 int revertToStart( ) ;
00087
00088
00089 void Print( OPS_Stream &s, int flag ) ;
00090
00091
00092 const Matrix &getTangentStiff( ) ;
00093 const Matrix &getInitialStiff( ) ;
00094 const Matrix &getMass( ) ;
00095
00096 void zeroLoad( ) ;
00097 int addLoad(ElementalLoad *theLoad, double loadFactor);
00098 int addInertiaLoadToUnbalance(const Vector &accel);
00099
00100
00101 const Vector &getResistingForce( ) ;
00102
00103
00104 const Vector &getResistingForceIncInertia( ) ;
00105
00106
00107 int sendSelf (int commitTag, Channel &theChannel);
00108 int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00109 &theBroker);
00110
00111 Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00112 int getResponse(int responseID, Information &eleInformation);
00113
00114
00115 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00116
00117 private :
00118
00119
00120 static Matrix stiff ;
00121 static Vector resid ;
00122 static Matrix mass ;
00123 static Matrix damping ;
00124
00125
00126 static const double root3 ;
00127 static const double one_over_root3 ;
00128 static const double sg[2] ;
00129 static const double wg[8] ;
00130
00131
00132
00133 ID connectedExternalNodes ;
00134 Node *nodePointers[8] ;
00135
00136
00137
00138 NDMaterial *materialPointers[8] ;
00139
00140
00141
00142 static double xl[][8] ;
00143
00144 double b[3];
00145
00146
00147 void formInertiaTerms( int tangFlag ) ;
00148
00149
00150 void formResidAndTangent( int tang_flag ) ;
00151
00152
00153 void computeBasis( ) ;
00154
00155
00156 const Matrix& computeBbar( int node,
00157 const double shp[4][8],
00158 const double shpBar[4][8] ) ;
00159
00160
00161 Matrix transpose( int dim1, int dim2, const Matrix &M ) ;
00162
00163 Vector *load;
00164 Matrix *Ki;
00165 } ;
00166
00167
00168
00169
00170
00171
00172