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
00031
00032
00033 #ifndef ZeroLengthSection_h
00034 #define ZeroLengthSection_h
00035
00036 #include <Element.h>
00037 #include <Matrix.h>
00038
00039
00040 #define LENTOL 1.0e-6
00041
00042 #include <Node.h>
00043 #include <Channel.h>
00044 #include <SectionForceDeformation.h>
00045 #include <Response.h>
00046
00065 class ZeroLengthSection : public Element
00066 {
00067 public:
00068
00078 ZeroLengthSection(int tag,
00079
00080 int dimension,
00081 int Nd1, int Nd2,
00082 const Vector& x,
00083 const Vector& yprime,
00084 SectionForceDeformation& theSection);
00085
00093 ZeroLengthSection();
00094
00099 ~ZeroLengthSection();
00100
00101
00103 int getNumExternalNodes(void) const;
00108 const ID &getExternalNodes(void);
00109
00115 int getNumDOF(void);
00116
00123 void setDomain(Domain *theDomain);
00124
00125
00127 int commitState(void);
00133 int revertToLastCommit(void);
00134
00140 int revertToStart(void);
00141
00142
00144 const Matrix &getTangentStiff(void);
00150 const Matrix &getSecantStiff(void);
00151
00156 const Matrix &getDamp(void);
00157
00162 const Matrix &getMass(void);
00163
00164
00169 void zeroLoad(void);
00170
00175 int addLoad(const Vector &addP);
00176
00181 int addInertiaLoadToUnbalance(const Vector &accel);
00182
00189 const Vector &getResistingForce(void);
00190
00195 const Vector &getResistingForceIncInertia(void);
00196
00197
00199 int sendSelf(int commitTag, Channel &theChannel);
00204 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00205
00210 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00211
00216 void Print(ostream &s, int flag =0);
00217
00218
00220 Response *setResponse(char **argv, int argc, Information &eleInformation);
00221
00223 int getResponse(int responseID, Information &eleInformation);
00224
00225 protected:
00226
00227 private:
00229 void setUp (int Nd1, int Nd2, const Vector& x, const Vector& y);
00231 void setTransformation(void);
00233 void computeSectionDefs(void);
00234
00236 ID connectedExternalNodes;
00237 int dimension;
00238 int numDOF;
00239 Matrix transformation;
00240
00241 Matrix *A;
00242 Vector *v;
00243
00244 Matrix *K;
00245 Vector *P;
00246
00247 Node *end1Ptr;
00248 Node *end2Ptr;
00249
00250 SectionForceDeformation *theSection;
00251 int order;
00252
00254 static Matrix K6;
00256 static Matrix K12;
00257
00259 static Vector P6;
00261 static Vector P12;
00262 };
00263
00264 #endif
00265
00266
00267
00268