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
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef NLBeamColumn2d_h
00047 #define NLBeamColumn2d_h
00048
00049 #include <Element.h>
00050 #include <Node.h>
00051 #include <Matrix.h>
00052 #include <Vector.h>
00053 #include <Channel.h>
00054 #include <SectionForceDeformation.h>
00055 #include <CrdTransf2d.h>
00056 #include <GaussLobattoQuadRule1d01.h>
00057
00058 class Response;
00059
00060 class NLBeamColumn2d: public Element
00061 {
00062 public:
00063 NLBeamColumn2d ();
00064 NLBeamColumn2d (int tag, int nodeI, int nodeJ,
00065 int numSections, SectionForceDeformation *sectionPtrs[],
00066 CrdTransf2d &coordTransf, double massDensPerUnitLength = 0.0,
00067 int maxNumIters = 10, double tolerance = 1e-12, int maxSub = 10);
00068
00069 ~NLBeamColumn2d();
00070
00071 int getNumExternalNodes(void) const;
00072 const ID &getExternalNodes(void);
00073 Node **getNodePtrs(void);
00074
00075 int getNumDOF(void);
00076 void setDomain(Domain *theDomain);
00077
00078 int commitState(void);
00079 int revertToLastCommit(void);
00080 int revertToStart(void);
00081 int update(void);
00082
00083 const Matrix &getTangentStiff(void);
00084 const Matrix &getInitialStiff(void);
00085 const Matrix &getMass(void);
00086
00087 void zeroLoad(void);
00088 int addLoad(ElementalLoad *theLoad, double loadFactor);
00089 int addInertiaLoadToUnbalance(const Vector &accel);
00090
00091 const Vector &getResistingForce(void);
00092 const Vector &getResistingForceIncInertia(void);
00093
00094 bool isSubdomain(void);
00095
00096 int sendSelf(int cTag, Channel &theChannel);
00097 int recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00098 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00099
00100 friend OPS_Stream &operator<<(OPS_Stream &s, NLBeamColumn2d &E);
00101 void Print(OPS_Stream &s, int flag =0);
00102
00103 Response *setResponse(const char **argv, int argc, Information &eleInformation);
00104 int getResponse(int responseID, Information &eleInformation);
00105
00106 int setParameter(const char **argv, int argc, Information &info);
00107 int updateParameter(int parameterID, Information &info);
00108
00109 private:
00110 void getGlobalDispls(Vector &dg) const;
00111 void getGlobalAccels(Vector &ag) const;
00112 void getForceInterpolatMatrix(double xi, Matrix &b, const ID &code);
00113 void getDistrLoadInterpolatMatrix(double xi, Matrix &bp, const ID &code);
00114 void compSectionDisplacements(Vector sectionCoords[], Vector sectionDispls[]) const;
00115 void initializeSectionHistoryVariables (void);
00116
00117
00118
00119 ID connectedExternalNodes;
00120 int nSections;
00121
00122 SectionForceDeformation **sections;
00123 CrdTransf2d *crdTransf;
00124
00125 double rho;
00126 int maxIters;
00127 double tol;
00128
00129
00130 double cosTheta, sinTheta;
00131
00132 int initialFlag;
00133
00134 Node *theNodes[2];
00135
00136 Vector load;
00137
00138 Matrix kv;
00139 Vector Se;
00140
00141 Matrix kvcommit;
00142 Vector Secommit;
00143
00144 Matrix *fs;
00145 Vector *vs;
00146 Vector *Ssr;
00147
00148 Vector *vscommit;
00149
00150 Matrix *sp;
00151 double p0[3];
00152
00153 Matrix *Ki;
00154 int maxSubdivisions;
00155
00156
00157 static Matrix theMatrix;
00158 static Vector theVector;
00159 static GaussLobattoQuadRule1d01 quadRule;
00160 static double workArea[];
00161
00162 static Vector *vsSubdivide;
00163 static Matrix *fsSubdivide;
00164 static Vector *SsrSubdivide;
00165 static int maxNumSections;
00166 };
00167
00168 #endif
00169
00170