ForceBeamColumn2d.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020 
00021 // $Revision: 1.8 $
00022 // $Date: 2006/09/05 23:24:12 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/forceBeamColumn/ForceBeamColumn2d.h,v $
00024 
00025 #ifndef ForceBeamColumn2d_h
00026 #define ForceBeamColumn2d_h
00027 
00028 #include <Element.h>
00029 #include <Node.h>
00030 #include <Matrix.h>
00031 #include <Vector.h>
00032 #include <Channel.h>
00033 #include <BeamIntegration.h>
00034 #include <SectionForceDeformation.h>
00035 #include <CrdTransf2d.h>
00036 
00037 class Response;
00038 class ElementalLoad;
00039 
00040 class ForceBeamColumn2d: public Element
00041 {
00042  public:
00043   ForceBeamColumn2d();
00044   ForceBeamColumn2d(int tag, int nodeI, int nodeJ, 
00045                     int numSections, SectionForceDeformation **sec,
00046                     BeamIntegration &beamIntegr,
00047                     CrdTransf2d &coordTransf, double rho = 0.0, 
00048                     int maxNumIters = 10, double tolerance = 1.0e-12);
00049   
00050   ~ForceBeamColumn2d();
00051   
00052   const char *getClassType(void) const {return "ForceBeamColumn2d";};
00053 
00054   int getNumExternalNodes(void) const;
00055   const ID &getExternalNodes(void);
00056   Node **getNodePtrs(void);
00057   
00058   int getNumDOF(void);
00059   
00060   void setDomain(Domain *theDomain);
00061   int commitState(void);
00062   int revertToLastCommit(void);        
00063   int revertToStart(void);
00064   int update(void);    
00065   
00066   const Matrix &getTangentStiff(void);
00067   const Matrix &getInitialStiff(void);
00068   const Matrix &getMass(void);    
00069   
00070   void zeroLoad(void);  
00071   int addLoad(ElementalLoad *theLoad, double loadFactor);
00072   int addInertiaLoadToUnbalance(const Vector &accel);
00073   
00074   const Vector &getResistingForce(void);
00075   const Vector &getResistingForceIncInertia(void);            
00076   
00077   int sendSelf(int cTag, Channel &theChannel);
00078   int recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00079   int displaySelf(Renderer &theViewer, int displayMode, float fact);        
00080   
00081   friend OPS_Stream &operator<<(OPS_Stream &s, ForceBeamColumn2d &E);        
00082   void Print(OPS_Stream &s, int flag =0);    
00083   
00084   Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00085   int getResponse(int responseID, Information &eleInformation);
00086   int getResponseSensitivity(int responseID, int gradNumber,
00087                              Information &eleInformation);
00088   
00089   // AddingSensitivity:BEGIN //////////////////////////////////////////
00090   int setParameter(const char **argv, int argc, Parameter &param);
00091   int updateParameter(int parameterID, Information &info);
00092   int activateParameter(int parameterID);
00093   const Vector &getResistingForceSensitivity(int gradNumber);
00094   const Matrix &getKiSensitivity(int gradNumber);
00095   const Matrix &getMassSensitivity(int gradNumber);
00096   int commitSensitivity(int gradNumber, int numGrads);
00097   // AddingSensitivity:END ///////////////////////////////////////////
00098 
00099  protected:
00100   void setSectionPointers(int numSections, SectionForceDeformation **secPtrs);
00101   int getInitialFlexibility(Matrix &fe);
00102   
00103  private:
00104   void getForceInterpolatMatrix(double xi, Matrix &b, const ID &code);
00105   void getDistrLoadInterpolatMatrix(double xi, Matrix &bp, const ID &code);
00106   void compSectionDisplacements(Vector sectionCoords[], Vector sectionDispls[]) const;
00107   void initializeSectionHistoryVariables (void);
00108   
00109   // Reactions of basic system due to element loads
00110   void computeReactions(double *p0);
00111 
00112   // Section forces due to element loads
00113   void computeSectionForces(Vector &sp, int isec);
00114 
00115   // internal data
00116   ID     connectedExternalNodes; // tags of the end nodes
00117 
00118   BeamIntegration *beamIntegr;
00119   int numSections;
00120   SectionForceDeformation **sections;          // array of pointers to sections
00121   CrdTransf2d *crdTransf;        // pointer to coordinate tranformation object 
00122   // (performs the transformation between the global and basic system)
00123   double rho;                    // mass density per unit length
00124   int    maxIters;               // maximum number of local iterations
00125   double tol;                      // tolerance for relative energy norm for local iterations
00126   
00127   int    initialFlag;            // indicates if the element has been initialized
00128   
00129   Node *theNodes[2];   // pointers to the nodes
00130   
00131   Matrix kv;                     // stiffness matrix in the basic system 
00132   Vector Se;                     // element resisting forces in the basic system
00133   
00134   Matrix kvcommit;               // commited stiffness matrix in the basic system
00135   Vector Secommit;               // commited element end forces in the basic system
00136   
00137   Matrix *fs;                    // array of section flexibility matrices
00138   Vector *vs;                    // array of section deformation vectors
00139   Vector *Ssr;                   // array of section resisting force vectors
00140   
00141   Vector *vscommit;              // array of commited section deformation vectors
00142   
00143   enum {maxNumEleLoads = 100};
00144   int numEleLoads; // Number of element load objects
00145   ElementalLoad *eleLoads[maxNumEleLoads];
00146 
00147   Matrix *Ki;
00148   
00149   static Matrix theMatrix;
00150   static Vector theVector;
00151   static double workArea[];
00152   
00153   enum {maxNumSections = 100};
00154   
00155   // following are added for subdivision of displacement increment
00156   int    maxSubdivisions;       // maximum number of subdivisons of dv for local iterations
00157   
00158   static Vector *vsSubdivide;
00159   static Vector *SsrSubdivide;
00160   static Matrix *fsSubdivide;
00161   //static int maxNumSections;
00162 
00163   // AddingSensitivity:BEGIN //////////////////////////////////////////
00164   int parameterID;
00165   const Vector &computedqdh(int gradNumber);
00166   const Matrix &computedfedh(int gradNumber);
00167   void computeReactionSensitivity(double *dp0dh, int gradNumber);
00168   void computeSectionForceSensitivity(Vector &dspdh, int isec, int gradNumber);
00169   // AddingSensitivity:END ///////////////////////////////////////////
00170 };
00171 
00172 #endif

Generated on Mon Oct 23 15:05:06 2006 for OpenSees by doxygen 1.5.0