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 #ifndef ElasticBeam2d_h
00033 #define ElasticBeam2d_h
00034
00035 #include <Element.h>
00036 #include <Node.h>
00037 #include <Matrix.h>
00038 #include <Vector.h>
00039
00040 class Channel;
00041 class Information;
00042 class CrdTransf2d;
00043 class Response;
00044 class Renderer;
00045
00046 class ElasticBeam2d : public Element
00047 {
00048 public:
00049 ElasticBeam2d();
00050 ElasticBeam2d(int tag, double A, double E, double I,
00051 int Nd1, int Nd2, CrdTransf2d &theTransf,
00052 double alpha = 0.0, double d = 0.0, double rho = 0.0);
00053 ~ElasticBeam2d();
00054
00055 const char *getClassType(void) const {return "ElasticBeam2d";};
00056
00057 int getNumExternalNodes(void) const;
00058 const ID &getExternalNodes(void);
00059 Node **getNodePtrs(void);
00060
00061 int getNumDOF(void);
00062 void setDomain(Domain *theDomain);
00063
00064 int commitState(void);
00065 int revertToLastCommit(void);
00066 int revertToStart(void);
00067
00068 int update(void);
00069 const Matrix &getTangentStiff(void);
00070 const Matrix &getInitialStiff(void);
00071 const Matrix &getMass(void);
00072
00073 void zeroLoad(void);
00074 int addLoad(ElementalLoad *theLoad, double loadFactor);
00075 int addInertiaLoadToUnbalance(const Vector &accel);
00076
00077 const Vector &getResistingForce(void);
00078 const Vector &getResistingForceIncInertia(void);
00079
00080 int sendSelf(int commitTag, Channel &theChannel);
00081 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00082
00083 void Print(OPS_Stream &s, int flag = 0);
00084 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00085
00086 Response *setResponse (const char **argv, int argc, Information &info, OPS_Stream &s);
00087 int getResponse (int responseID, Information &info);
00088
00089 int setParameter (const char **argv, int argc, Parameter ¶m);
00090 int updateParameter (int parameterID, Information &info);
00091
00092 private:
00093 double A,E,I;
00094 double alpha, d;
00095
00096 double rho;
00097
00098 static Matrix K;
00099 static Vector P;
00100 Vector Q;
00101
00102 static Matrix kb;
00103 Vector q;
00104 double q0[3];
00105 double p0[3];
00106
00107 Node *theNodes[2];
00108
00109 ID connectedExternalNodes;
00110
00111 CrdTransf2d *theCoordTransf;
00112 };
00113
00114 #endif
00115
00116