LoadPattern.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.13 $
00022 // $Date: 2006/09/05 20:50:24 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/domain/pattern/LoadPattern.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef LoadPattern_h
00027 #define LoadPattern_h
00028 
00029 // Written: fmk 
00030 // Created: 07/99
00031 // Revision: A
00032 //
00033 // Purpose: This file contains the class definition for LoadPattern.
00034 // LoadPattern is a concrete class. A LoadPattern object is used to 
00035 // to store reference loads and single point constraints and a TimeSeries function
00036 // which is used to determine the load factor given the pseudo-time
00037 // to the model. 
00038 //
00039 // What: "@(#) LoadPattern.h, revA"
00040 
00041 #include <DomainComponent.h>
00042 #include <Vector.h>
00043 
00044 class NodalLoad;
00045 class TimeSeries;
00046 class ElementalLoad;
00047 class SP_Constraint;
00048 class NodalLoadIter;
00049 class ElementalLoadIter;
00050 class SingleDomSP_Iter;
00051 class SP_ConstraintIter;
00052 class TaggedObjectStorage;
00053 class GroundMotion;
00054 
00055 class LoadPattern : public DomainComponent    
00056 {
00057   public:
00058     // constructors
00059     LoadPattern(int tag);    
00060     LoadPattern();                      // for FEM_ObjectBroker
00061     LoadPattern(int tag, int classTag); // for subclasses
00062     
00063     // destructor
00064     virtual ~LoadPattern();
00065 
00066     // method to set the associated TimeSeries and Domain
00067     virtual void setTimeSeries(TimeSeries *theSeries);
00068     virtual void setDomain(Domain *theDomain);
00069 
00070     // methods to add loads
00071     virtual bool addSP_Constraint(SP_Constraint *);
00072     virtual bool addNodalLoad(NodalLoad *);
00073     virtual bool addElementalLoad(ElementalLoad *);
00074     virtual NodalLoadIter     &getNodalLoads(void);
00075     virtual ElementalLoadIter &getElementalLoads(void);    
00076     virtual SP_ConstraintIter &getSPs(void);        
00077     
00078     // methods to remove loads
00079     virtual void clearAll(void);
00080     virtual NodalLoad *removeNodalLoad(int tag);
00081     virtual ElementalLoad *removeElementalLoad(int tag);
00082     virtual SP_Constraint *removeSP_Constraint(int tag);
00083 
00084     // methods to apply loads
00085     virtual void applyLoad(double pseudoTime = 0.0);
00086     virtual void setLoadConstant(void);
00087 
00088     virtual double getLoadFactor(void);
00089 
00090     // methods for o/p
00091     virtual int sendSelf(int commitTag, Channel &theChannel);
00092     virtual int recvSelf(int commitTag, Channel &theChannel, 
00093                          FEM_ObjectBroker &theBroker);
00094     virtual void Print(OPS_Stream &s, int flag =0);        
00095 
00096     // method to obtain a blank copy of the LoadPattern
00097     virtual LoadPattern *getCopy(void);
00098 
00099     virtual int addMotion(GroundMotion &theMotion, int tag);    
00100     virtual GroundMotion *getMotion(int tag);        
00101 
00102     // AddingSensitivity:BEGIN //////////////////////////////////////////
00103     virtual void applyLoadSensitivity(double pseudoTime = 0.0);
00104     virtual int setParameter(const char **argv, int argc, Parameter &param);
00105     virtual int  updateParameter(int parameterID, Information &info);
00106     virtual int  activateParameter(int parameterID);
00107     virtual const Vector & getExternalForceSensitivity(int gradNumber);
00108     // AddingSensitivity:END ///////////////////////////////////////////
00109 
00110   protected:
00111     int    isConstant;     // to indictae whether setConstant has been called
00112         
00113   private:
00114     double loadFactor;     // current load factor
00115 
00116     TimeSeries *theSeries; // pointer to associated TimeSeries
00117 
00118     int    currentGeoTag;
00119     int    lastGeoSendTag;
00120     int    dbSPs, dbNod, dbEle; // database tags for storing info about components
00121     
00122     // storage objects for the loads and constraints
00123     TaggedObjectStorage  *theNodalLoads;
00124     TaggedObjectStorage  *theElementalLoads;
00125     TaggedObjectStorage  *theSPs;         
00126 
00127     // iterator objects for the objects added to the storage objects
00128     NodalLoadIter       *theNodIter;
00129     ElementalLoadIter   *theEleIter;
00130     SingleDomSP_Iter    *theSpIter;    
00131 
00132     // AddingSensitivity:BEGIN //////////////////////////////////////
00133     Vector *randomLoads;
00134     bool RVisRandomProcessDiscretizer;
00135     // AddingSensitivity:END ////////////////////////////////////////
00136 
00137     int lastChannel; 
00138 };
00139 
00140 #endif
00141 
00142 
00143 
00144 
00145 
00146 
00147 

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