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 Truss_h
00027 #define Truss_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 UniaxialMaterial;
00046
00047 class Truss : public Element
00048 {
00049 public:
00050 Truss(int tag,
00051 int dimension,
00052 int Nd1, int Nd2,
00053 UniaxialMaterial &theMaterial,
00054 double A, double rho=0.0);
00055
00056 Truss();
00057 ~Truss();
00058
00059 const char *getClassType(void) const {return "Truss";};
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 &getKi(void);
00077 const Matrix &getTangentStiff(void);
00078 const Matrix &getInitialStiff(void);
00079 const Matrix &getDamp(void);
00080 const Matrix &getMass(void);
00081
00082 void zeroLoad(void);
00083 int addLoad(ElementalLoad *theLoad, double loadFactor);
00084 int addInertiaLoadToUnbalance(const Vector &accel);
00085
00086 const Vector &getResistingForce(void);
00087 const Vector &getResistingForceIncInertia(void);
00088
00089
00090 int sendSelf(int commitTag, Channel &theChannel);
00091 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00092 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00093 void Print(OPS_Stream &s, int flag =0);
00094
00095 Response *setResponse(const char **argv, int argc, Information &eleInfo, OPS_Stream &s);
00096 int getResponse(int responseID, Information &eleInformation);
00097
00098
00099 int addInertiaLoadSensitivityToUnbalance(const Vector &accel, bool tag);
00100 int setParameter(const char **argv, int argc, Parameter ¶m);
00101 int updateParameter(int parameterID, Information &info);
00102 int activateParameter(int parameterID);
00103 const Vector & getResistingForceSensitivity(int gradNumber);
00104 const Matrix & getKiSensitivity(int gradNumber);
00105 const Matrix & getMassSensitivity(int gradNumber);
00106 int commitSensitivity(int gradNumber, int numGrads);
00107
00108
00109 protected:
00110
00111 private:
00112 double computeCurrentStrain(void) const;
00113 double computeCurrentStrainRate(void) const;
00114
00115
00116 UniaxialMaterial *theMaterial;
00117 ID connectedExternalNodes;
00118 int dimension;
00119 int numDOF;
00120
00121 Vector *theLoad;
00122 Matrix *theMatrix;
00123 Vector *theVector;
00124
00125 double L;
00126 double A;
00127 double rho;
00128
00129 double cosX[3];
00130
00131 Node *theNodes[2];
00132
00133
00134 int parameterID;
00135 Vector *theLoadSens;
00136
00137
00138
00139 static Matrix trussM2;
00140 static Matrix trussM4;
00141 static Matrix trussM6;
00142 static Matrix trussM12;
00143 static Vector trussV2;
00144 static Vector trussV4;
00145 static Vector trussV6;
00146 static Vector trussV12;
00147 };
00148
00149 #endif
00150
00151
00152
00153