PathTimeSeries.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.6 $
00022 // $Date: 2005/10/20 21:58:54 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/domain/pattern/PathTimeSeries.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef PathTimeSeries_h
00027 #define PathTimeSeries_h
00028 
00029 // File: ~/domain/pattern/PathTimeSeries.h
00030 // 
00031 // Written: fmk 
00032 // Created: 07/99
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for PathTimeSeries.
00036 // PathTimeSeries is a TimeSeries class which linear interpolates the
00037 // load factor using user specified control points provided in a vector object.
00038 // the points in the vector are given at time points specified in another vector.
00039 // object. 
00040 //
00041 // What: "@(#) PathTimeSeries.h, revA"
00042 
00043 #include <TimeSeries.h>
00044 
00045 class Vector;
00046 
00047 class PathTimeSeries : public TimeSeries
00048 {
00049   public:
00050     // constructors  
00051     PathTimeSeries(const Vector &thePath, 
00052                    const Vector &theTime, 
00053                    double cfactor = 1.0);
00054 
00055     PathTimeSeries(const char *fileNamePath, 
00056                    const char *fileNameTime, 
00057                    double cfactor = 1.0);    
00058 
00059     PathTimeSeries(const char *fileName,
00060                    double cfactor = 1.0);
00061     PathTimeSeries();    
00062     
00063     // destructor    
00064     ~PathTimeSeries();
00065 
00066     // method to get factor
00067     double getFactor(double pseudoTime);
00068     double getDuration ();
00069     double getPeakFactor ();
00070     double getTimeIncr (double pseudoTime);
00071 
00072     // methods for output
00073     int sendSelf(int commitTag, Channel &theChannel);
00074     int recvSelf(int commitTag, Channel &theChannel, 
00075                  FEM_ObjectBroker &theBroker);
00076 
00077     void Print(OPS_Stream &s, int flag =0);    
00078     
00079   protected:
00080     
00081   private:
00082     Vector *thePath;      // vector containg the data points
00083     Vector *time;                 // vector containg the time values of data points
00084     int currentTimeLoc;   // current location in time
00085     double cFactor;       // additional factor on the returned load factor
00086     int dbTag1, dbTag2;   // additional database tags needed for vector objects
00087     int lastSendCommitTag;
00088 
00089     Channel *lastChannel;
00090 };
00091 
00092 #endif
00093 

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