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 enum Etype { D1N2, D2N4, D2N6, D3N6, D3N12 };
00052
00053
00054 class Node;
00055 class Channel;
00056 class UniaxialMaterial;
00057 class Response;
00058
00059 class ZeroLength : public Element
00060 {
00061 public:
00062
00063
00064 ZeroLength(int tag,
00065 int dimension,
00066 int Nd1, int Nd2,
00067 const Vector& x,
00068 const Vector& yprime,
00069 UniaxialMaterial& theMaterial,
00070 int direction );
00071
00072
00073 ZeroLength(int tag,
00074 int dimension,
00075 int Nd1, int Nd2,
00076 const Vector& x,
00077 const Vector& yprime,
00078 int n1dMat,
00079 UniaxialMaterial** theMaterial,
00080 const ID& direction );
00081
00082 ZeroLength();
00083 ~ZeroLength();
00084
00085 const char *getClassType(void) const {return "ZeroLength";};
00086
00087
00088 int getNumExternalNodes(void) const;
00089 const ID &getExternalNodes(void);
00090 Node **getNodePtrs(void);
00091
00092 int getNumDOF(void);
00093 void setDomain(Domain *theDomain);
00094
00095
00096 int commitState(void);
00097 int revertToLastCommit(void);
00098 int revertToStart(void);
00099 int update(void);
00100
00101
00102 const Matrix &getTangentStiff(void);
00103 const Matrix &getInitialStiff(void);
00104 const Matrix &getDamp(void);
00105 const Matrix &getMass(void);
00106
00107 void zeroLoad(void);
00108 int addLoad(ElementalLoad *theLoad, double loadFactor);
00109 int addInertiaLoadToUnbalance(const Vector &accel);
00110
00111 const Vector &getResistingForce(void);
00112 const Vector &getResistingForceIncInertia(void);
00113
00114
00115 int sendSelf(int commitTag, Channel &theChannel);
00116 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00117 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00118 void Print(OPS_Stream &s, int flag =0);
00119
00120 Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00121 int getResponse(int responseID, Information &eleInformation);
00122
00123 void updateDir (const Vector& x, const Vector& y);
00124
00125 protected:
00126
00127 private:
00128 Etype elemType;
00129
00130
00131 void setUp ( int Nd1, int Nd2, const Vector& x, const Vector& y);
00132 void checkDirection ( ID& dir ) const;
00133
00134 void setTran1d ( Etype e, int n );
00135 double computeCurrentStrain1d ( int mat, const Vector& diff ) const;
00136
00137
00138 ID connectedExternalNodes;
00139 int dimension;
00140 int numDOF;
00141 Matrix transformation;
00142
00143 Node *theNodes[2];
00144
00145 Matrix *theMatrix;
00146 Vector *theVector;
00147
00148
00149 int numMaterials1d;
00150 UniaxialMaterial **theMaterial1d;
00151 ID *dir1d;
00152 Matrix *t1d;
00153
00154
00155 static Matrix ZeroLengthM2;
00156 static Matrix ZeroLengthM4;
00157 static Matrix ZeroLengthM6;
00158 static Matrix ZeroLengthM12;
00159 static Vector ZeroLengthV2;
00160 static Vector ZeroLengthV4;
00161 static Vector ZeroLengthV6;
00162 static Vector ZeroLengthV12;
00163 };
00164
00165 #endif
00166
00167
00168
00169