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
00034 #ifndef ElasticBeam2d_h
00035 #define ElasticBeam2d_h
00036
00037 #include <Element.h>
00038 #include <Node.h>
00039 #include <Matrix.h>
00040 #include <Vector.h>
00041
00042 #include <Channel.h>
00043 #include <Information.h>
00044 #include <CrdTransf2d.h>
00045 #include <Response.h>
00046 #include <Renderer.h>
00047
00049 class ElasticBeam2d : public Element
00050 {
00051 public:
00053 ElasticBeam2d();
00055 ElasticBeam2d(int tag, double A, double E, double I,
00056 int Nd1, int Nd2, CrdTransf2d &theTransf, double rho = 0.0);
00058 ~ElasticBeam2d();
00059
00061 int getNumExternalNodes(void) const;
00063 const ID &getExternalNodes(void);
00065 int getNumDOF(void);
00067 void setDomain(Domain *theDomain);
00068
00070 int commitState(void);
00072 int revertToLastCommit(void);
00074 int revertToStart(void);
00075
00077 const Matrix &getTangentStiff(void);
00079 const Matrix &getSecantStiff(void);
00081 const Matrix &getDamp(void);
00083 const Matrix &getMass(void);
00084
00086 void zeroLoad(void);
00088 int addLoad(const Vector &load);
00090 int addInertiaLoadToUnbalance(const Vector &accel);
00091
00093 const Vector &getResistingForce(void);
00095 const Vector &getResistingForceIncInertia(void);
00096
00098 int sendSelf(int commitTag, Channel &theChannel);
00100 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00101
00103 void Print(ostream &s, int flag = 0);
00105 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00106
00108 Response *setResponse (char **argv, int argc, Information &info);
00110 int getResponse (int responseID, Information &info);
00111
00113 int setParameter (char **argv, int argc, Information &info);
00115 int updateParameter (int parameterID, Information &info);
00116
00117 private:
00119 double A,E,I;
00121 double L;
00122
00123
00125 double EAoverL;
00127 double EIoverL4;
00129 double EIoverL2;
00130
00132 double rho;
00133
00135 static Matrix K;
00137 static Vector P;
00139 Vector Q;
00140
00142 static Matrix kb;
00144 Vector q;
00145
00147 Node *node1Ptr, *node2Ptr;
00148
00150 ID connectedExternalNodes;
00151
00153 CrdTransf2d *theCoordTransf;
00154 };
00155
00156 #endif
00157
00158
00159 ÿ