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 BeamWithHinges2d_h
00026 #define BeamWithHinges2d_h
00027
00028 #include <Element.h>
00029 #include <Matrix.h>
00030 #include <Vector.h>
00031 #include <ID.h>
00032
00033 class Node;
00034 class Channel;
00035 class FEM_ObjectBroker;
00036
00037 class SectionForceDeformation;
00038
00039 class CrdTransf2d;
00040 class Response;
00041 class Renderer;
00042
00043 class BeamWithHinges2d: public Element
00044 {
00045 public:
00046 BeamWithHinges2d(int tag, int nodeI, int nodeJ,
00047 double E, double A, double I,
00048 SectionForceDeformation §ionRefI, double hingeIlen,
00049 SectionForceDeformation §ionRefJ, double hingeJlen,
00050 CrdTransf2d &coordTrans, double massDensPerUnitLength = 0.0,
00051 int max = 1, double tol = 1.0e-16);
00052 BeamWithHinges2d();
00053 ~BeamWithHinges2d();
00054
00055 int getNumExternalNodes(void) const;
00056 const ID &getExternalNodes(void);
00057 Node **getNodePtrs(void);
00058
00059 int getNumDOF(void);
00060 void setDomain(Domain *theDomain);
00061
00062 int commitState(void);
00063 int revertToLastCommit(void);
00064 int revertToStart(void);
00065
00066 int update(void);
00067 const Matrix &getTangentStiff(void);
00068 const Matrix &getInitialStiff(void);
00069 const Matrix &getMass(void);
00070
00071 void zeroLoad(void);
00072 int addLoad(ElementalLoad *theLoad, double loadFactor);
00073 int addInertiaLoadToUnbalance(const Vector &accel);
00074 const Vector &getResistingForce(void);
00075 const Vector &getResistingForceIncInertia(void);
00076
00077 int sendSelf(int commitTag, Channel &theChannel);
00078 int recvSelf(int commitTag, Channel &theChannel,
00079 FEM_ObjectBroker &theBroker);
00080
00081 Response *setResponse(const char **argv, int argc, Information &info);
00082 int getResponse(int responseID, Information &info);
00083
00084 int setParameter(const char **argv, int argc, Information &info);
00085 int updateParameter(int parameterID, Information &info);
00086
00087 void Print(OPS_Stream &s, int flag = 0);
00088 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00089
00090 protected:
00091
00092 private:
00093
00094 void setNodePtrs(Domain *theDomain);
00095 void setHinges(void);
00096
00097 void getForceInterpMatrix(Matrix &b, double x, const ID &c);
00098 void getDistrLoadInterpMatrix(Matrix &bp, double x, const ID &c);
00099
00100 double E, A, I;
00101 double beta1, beta2;
00102 double rho;
00103 SectionForceDeformation *section[2];
00104 CrdTransf2d *theCoordTransf;
00105
00106 ID connectedExternalNodes;
00107 Node *theNodes[2];
00108
00109 Matrix fs[2];
00110 Vector sr[2];
00111 Vector e[2];
00112
00113 Matrix kb;
00114 Vector q;
00115 Vector load;
00116
00117 Matrix kbCommit;
00118 Vector qCommit;
00119 Vector eCommit[2];
00120
00121 int initialFlag;
00122
00123 int maxIter;
00124 double tolerance;
00125
00126 Matrix *sp;
00127 double p0[3];
00128 double v0[3];
00129
00130 static Matrix theMatrix;
00131 static Vector theVector;
00132 static double workArea[];
00133 };
00134
00135 #endif