AnalysisModel.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.10 $
00022 // $Date: 2006/03/29 18:50:37 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/model/AnalysisModel.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef AnalysisModel_h
00027 #define AnalysisModel_h
00028 
00029 // Written: fmk 
00030 // Created: 9/96
00031 // Revision: A
00032 //
00033 // Description: This file contains the class definition for AnalysisModel.
00034 // AnalysisModel is a container class. This class is responsible for holding
00035 // and providing access to the FE_Element and DOF_Group objects that the 
00036 // ConstraintHandler creates. It is also responsible for updating the 
00037 // response quantities at the DOF_Groups and for triggering methods 
00038 // in the associated Domain.
00039 //
00040 // What: "@(#) AnalysisModel.h, revA"
00041 
00042 #ifndef _bool_h
00043 #include <bool.h>
00044 #endif
00045     
00046 #include <MovableObject.h>
00047 
00048 class TaggedObjectStorage;
00049 class Domain;
00050 class FE_EleIter;
00051 class DOF_GrpIter;
00052 class Graph;
00053 class FE_Element;
00054 class DOF_Group;
00055 class Vector;
00056 class FEM_ObjectBroker;
00057 class ConstraintHandler;
00058 
00059 class AnalysisModel: public MovableObject
00060 {
00061   public:
00062     AnalysisModel();    
00063     AnalysisModel(int classTag);
00064     AnalysisModel(TaggedObjectStorage &theDofStorage,
00065                   TaggedObjectStorage &theFeStorage);
00066     virtual ~AnalysisModel();    
00067 
00068     // methods to populate/depopulate the AnalysisModel
00069     virtual bool addFE_Element(FE_Element *theFE_Ele);
00070     virtual bool addDOF_Group(DOF_Group *theDOF_Grp);
00071     virtual void clearAll(void);
00072     
00073     // methods to access the FE_Elements and DOF_Groups and their numbers
00074     virtual int getNumDOF_Groups(void) const;           
00075     virtual DOF_Group *getDOF_GroupPtr(int tag);        
00076     virtual FE_EleIter &getFEs();
00077     virtual DOF_GrpIter &getDOFs();
00078 
00079     // method to access the connectivity for SysOfEqn to size itself
00080     virtual void setNumEqn(int) ;       
00081     virtual int getNumEqn(void) const ; 
00082     virtual Graph &getDOFGraph(void);
00083     virtual Graph &getDOFGroupGraph(void);
00084     
00085     // methods to update the response quantities at the DOF_Groups,
00086     // which in turn set the new nodal trial response quantities.
00087     virtual void setResponse(const Vector &disp, 
00088                              const Vector &vel, 
00089                              const Vector &accel);
00090     virtual void setDisp(const Vector &disp);    
00091     virtual void setVel(const Vector &vel);        
00092     virtual void setAccel(const Vector &vel);            
00093 
00094     virtual void incrDisp(const Vector &disp);    
00095     virtual void incrVel(const Vector &vel);        
00096     virtual void incrAccel(const Vector &vel);            
00097 
00098     // methods added to store the eigenvalues and vectors in the domain
00099     virtual void setNumEigenvectors(int numEigenvectors);
00100     virtual void setEigenvector(int mode, const Vector &);
00101     virtual void setEigenvalues(const Vector &);    
00102     
00103     // methods which trigger operations in the Domain
00104     virtual void setLinks(Domain &theDomain, ConstraintHandler &theHandler);
00105         
00106     virtual void   applyLoadDomain(double newTime);
00107     virtual int    updateDomain(void);
00108     virtual int    updateDomain(double newTime, double dT);
00109     virtual int    newStepDomain(double dT =0.0);
00110     virtual int    commitDomain(void);
00111     virtual int    revertDomainToLastCommit(void);
00112     virtual double getCurrentDomainTime(void);
00113     virtual void   setCurrentDomainTime(double newTime);    
00114     virtual void   setRayleighDampingFactors(double alphaM, double betaK, double betaKi, double betaKc);    
00115     
00116     virtual int sendSelf(int commitTag, Channel &theChannel);
00117     virtual int recvSelf(int commitTag, Channel &theChannel, 
00118                          FEM_ObjectBroker &theBroker);
00119 
00120     Domain *getDomainPtr(void) const;
00121 
00122   protected:
00123 
00124     
00125   private:
00126     Domain *myDomain;
00127     ConstraintHandler *myHandler;
00128 
00129     Graph *myDOFGraph;
00130     Graph *myGroupGraph;    
00131     
00132     int numFE_Ele;             // number of FE_Elements objects added
00133     int numDOF_Grp;            // number of DOF_Group objects added
00134     int numEqn;                // numEqn set by the ConstraintHandler typically
00135 
00136     TaggedObjectStorage  *theFEs;
00137     TaggedObjectStorage  *theDOFs;
00138     
00139     FE_EleIter    *theFEiter;     
00140     DOF_GrpIter   *theDOFiter;    
00141 };
00142 
00143 #endif

Generated on Mon Oct 23 15:04:59 2006 for OpenSees by doxygen 1.5.0