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 #ifndef ZeroLength_h
00027 #define ZeroLength_h
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #include <Element.h>
00044 #include <Matrix.h>
00045
00046
00047 #define LENTOL 1.0e-6
00048
00049
00050
00051
00052
00053
00054 #include <Node.h>
00055 #include <Channel.h>
00056 #include <UniaxialMaterial.h>
00057 #include <Response.h>
00058
00077 class ZeroLength : public Element
00078 {
00079 public:
00080
00082 ZeroLength(int tag,
00083 int dimension,
00084 int Nd1, int Nd2,
00085 const Vector& x,
00086 const Vector& yprime,
00087 UniaxialMaterial& theMaterial,
00088 int direction );
00089
00091 ZeroLength(int tag,
00092 int dimension,
00093 int Nd1, int Nd2,
00094 const Vector& x,
00095 const Vector& yprime,
00096 int n1dMat,
00097 UniaxialMaterial** theMaterial,
00098 const ID& direction );
00099
00108 ZeroLength();
00109
00120 ~ZeroLength();
00121
00122
00124 int getNumExternalNodes(void) const;
00129 const ID &getExternalNodes(void);
00130
00136 int getNumDOF(void);
00137
00142 void setDomain(Domain *theDomain);
00143
00144
00146 int commitState(void);
00152 int revertToLastCommit(void);
00153
00159 int revertToStart(void);
00160
00161
00163 const Matrix &getTangentStiff(void);
00169 const Matrix &getSecantStiff(void);
00170
00175 const Matrix &getDamp(void);
00176
00181 const Matrix &getMass(void);
00182
00183
00188 void zeroLoad(void);
00189
00194 int addLoad(const Vector &addP);
00195
00200 int addInertiaLoadToUnbalance(const Vector &accel);
00201
00206 const Vector &getResistingForce(void);
00207
00212 const Vector &getResistingForceIncInertia(void);
00213
00214
00216 int sendSelf(int commitTag, Channel &theChannel);
00221 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00222
00227 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00228
00233 void Print(ostream &s, int flag =0);
00234
00235
00237 Response *setResponse(char **argv, int argc, Information &eleInformation);
00238
00240 int getResponse(int responseID, Information &eleInformation);
00241
00242 protected:
00243
00244 private:
00246 void setUp ( int Nd1, int Nd2, const Vector& x, const Vector& y);
00248 void checkDirection ( ID& dir ) const;
00249
00251 void setTran1d ( Etype e, int n );
00253 double computeCurrentStrain1d ( int mat, const Vector& diff ) const;
00254
00256 ID connectedExternalNodes;
00257 int dimension;
00258 int numDOF;
00259 Matrix transformation;
00260
00261 Node *end1Ptr;
00262 Node *end2Ptr;
00263
00264 Matrix *theMatrix;
00265 Vector *theVector;
00266
00268 int numMaterials1d;
00269 UniaxialMaterial **theMaterial1d;
00270 ID *dir1d;
00271 Matrix *t1d;
00272
00274 static Matrix ZeroLengthM2;
00275 static Matrix ZeroLengthM4;
00276 static Matrix ZeroLengthM6;
00277 static Matrix ZeroLengthM12;
00278 static Vector ZeroLengthV2;
00279 static Vector ZeroLengthV4;
00280 static Vector ZeroLengthV6;
00281 static Vector ZeroLengthV12;
00282 };
00283
00284 #endif
00285
00286
00287
00288