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 #ifndef TrussSection_h
00027 #define TrussSection_h
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include <Element.h>
00043 #include <Matrix.h>
00044
00045 #include <Node.h>
00046 #include <Channel.h>
00047 #include <SectionForceDeformation.h>
00048
00050 class TrussSection : public Element
00051 {
00052 public:
00054 TrussSection(int tag,
00055 int dimension,
00056 int Nd1, int Nd2,
00057 SectionForceDeformation &theSection,
00058 double rho=0.0);
00059
00061 TrussSection();
00063 ~TrussSection();
00064
00066 int getNumExternalNodes(void) const;
00068 const ID &getExternalNodes(void);
00070 int getNumDOF(void);
00072 void setDomain(Domain *theDomain);
00073
00075 int commitState(void);
00077 int revertToLastCommit(void);
00079 int revertToStart(void);
00081 int update(void);
00082
00084 const Matrix &getTangentStiff(void);
00086 const Matrix &getSecantStiff(void);
00088 const Matrix &getDamp(void);
00090 const Matrix &getMass(void);
00091
00093 void zeroLoad(void);
00095 int addLoad(const Vector &addP);
00097 int addInertiaLoadToUnbalance(const Vector &accel);
00099 const Vector &getResistingForce(void);
00101 const Vector &getResistingForceIncInertia(void);
00102
00104 int sendSelf(int commitTag, Channel &theChannel);
00106 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00108 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00110 void Print(ostream &s, int flag =0);
00111
00113 Response *setResponse(char **argv, int argc, Information &eleInformation);
00115 int getResponse(int responseID, Information &eleInformation);
00116
00118 int setParameter (char **argv, int argc, Information &info);
00120 int updateParameter (int parameterID, Information &info);
00121
00122 protected:
00123
00124 private:
00126 double computeCurrentStrain(void) const;
00127
00129 ID connectedExternalNodes;
00130 int dimension;
00131 int numDOF;
00132
00133 Vector *theLoad;
00134 Matrix *theMatrix;
00135 Vector *theVector;
00136
00137 Matrix *t;
00138
00139 double L;
00140 double M;
00141
00142 Node *end1Ptr;
00143 Node *end2Ptr;
00144
00145 SectionForceDeformation *theSection;
00146
00148 static Matrix trussM2;
00149 static Matrix trussM3;
00150 static Matrix trussM4;
00151 static Matrix trussM6;
00152 static Matrix trussM12;
00153 static Vector trussV2;
00154 static Vector trussV3;
00155 static Vector trussV4;
00156 static Vector trussV6;
00157 static Vector trussV12;
00158 };
00159
00160 #endif
00161
00162
00163
00164
00165 ÿ