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 #ifndef CorotTruss_h
00026 #define CorotTruss_h
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #include <Element.h>
00037 #include <Matrix.h>
00038 #include <Vector.h>
00039
00040 class Node;
00041 class Channel;
00042 class UniaxialMaterial;
00043
00044 class CorotTruss : public Element
00045 {
00046 public:
00047 CorotTruss(int tag, int dim,
00048 int Nd1, int Nd2,
00049 UniaxialMaterial &theMaterial,
00050 double A, double rho=0.0);
00051
00052 CorotTruss();
00053 ~CorotTruss();
00054
00055 const char *getClassType(void) const {return "CorotTruss";};
00056
00057
00058 int getNumExternalNodes(void) const;
00059 const ID &getExternalNodes(void);
00060 Node **getNodePtrs(void);
00061
00062 int getNumDOF(void);
00063 void setDomain(Domain *theDomain);
00064
00065
00066 int commitState(void);
00067 int revertToLastCommit(void);
00068 int revertToStart(void);
00069 int update(void);
00070
00071
00072 const Matrix &getTangentStiff(void);
00073 const Matrix &getInitialStiff(void);
00074 const Matrix &getMass(void);
00075
00076 void zeroLoad(void);
00077 int addLoad(ElementalLoad *theLoad, double loadFactor);
00078 int addInertiaLoadToUnbalance(const Vector &accel);
00079
00080 const Vector &getResistingForce(void);
00081 const Vector &getResistingForceIncInertia(void);
00082
00083
00084 int sendSelf(int commitTag, Channel &theChannel);
00085 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00086 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00087 void Print(OPS_Stream &s, int flag =0);
00088
00089 Response *setResponse(const char **argv, int argc, Information &eleInfo, OPS_Stream &s);
00090 int getResponse(int responseID, Information &eleInformation);
00091
00092 protected:
00093
00094 private:
00095
00096
00097 UniaxialMaterial *theMaterial;
00098 ID connectedExternalNodes;
00099 int numDOF;
00100 int numDIM;
00101
00102 double Lo;
00103 double Ln;
00104 double d21[3];
00105 double A;
00106 double rho;
00107
00108 Node *theNodes[2];
00109
00110 Matrix R;
00111
00112 Matrix *theMatrix;
00113
00114 static Matrix M2;
00115 static Matrix M4;
00116 static Matrix M6;
00117 static Matrix M12;
00118
00119 Vector *theVector;
00120
00121 static Vector V2;
00122 static Vector V4;
00123 static Vector V6;
00124 static Vector V12;
00125 };
00126
00127 #endif
00128
00129
00130
00131