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 #include <Element.h>
00041 #include <Matrix.h>
00042
00043 class Node;
00044 class Channel;
00045 class SectionForceDeformation;
00046
00047 class TrussSection : public Element
00048 {
00049 public:
00050 TrussSection(int tag,
00051 int dimension,
00052 int Nd1, int Nd2,
00053 SectionForceDeformation &theSection,
00054 double rho=0.0);
00055
00056 TrussSection();
00057 ~TrussSection();
00058
00059 const char *getClassType(void) const {return "TrussSection";};
00060
00061
00062 int getNumExternalNodes(void) const;
00063 const ID &getExternalNodes(void);
00064 Node **getNodePtrs(void);
00065
00066 int getNumDOF(void);
00067 void setDomain(Domain *theDomain);
00068
00069
00070 int commitState(void);
00071 int revertToLastCommit(void);
00072 int revertToStart(void);
00073 int update(void);
00074
00075
00076 const Matrix &getTangentStiff(void);
00077 const Matrix &getInitialStiff(void);
00078 const Matrix &getMass(void);
00079
00080 void zeroLoad(void);
00081 int addLoad(ElementalLoad *theLoad, double loadFactor);
00082 int addInertiaLoadToUnbalance(const Vector &accel);
00083
00084 const Vector &getResistingForce(void);
00085 const Vector &getResistingForceIncInertia(void);
00086
00087
00088 int sendSelf(int commitTag, Channel &theChannel);
00089 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00090 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00091 void Print(OPS_Stream &s, int flag =0);
00092
00093 Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00094 int getResponse(int responseID, Information &eleInformation);
00095
00096 int setParameter (const char **argv, int argc, Parameter ¶m);
00097
00098 protected:
00099
00100 private:
00101 double computeCurrentStrain(void) const;
00102
00103
00104 ID connectedExternalNodes;
00105 int dimension;
00106 int numDOF;
00107
00108 Vector *theLoad;
00109 Matrix *theMatrix;
00110 Vector *theVector;
00111
00112 double cosX[3];
00113
00114 double L;
00115 double rho;
00116
00117 Node *theNodes[2];
00118
00119 SectionForceDeformation *theSection;
00120
00121
00122 static Matrix trussM2;
00123 static Matrix trussM3;
00124 static Matrix trussM4;
00125 static Matrix trussM6;
00126 static Matrix trussM12;
00127 static Vector trussV2;
00128 static Vector trussV3;
00129 static Vector trussV4;
00130 static Vector trussV6;
00131 static Vector trussV12;
00132 };
00133
00134 #endif