PulseSeries.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.1 $
00022 // $Date: 2005/12/15 00:35:47 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/domain/pattern/PulseSeries.h,v $
00024                                                                         
00025 #ifndef PulseSeries_h
00026 #define PulseSeries_h
00027 
00028 // Written: Andreas Schellenberg (andreas.schellenberg@gmx.net)
00029 // Created: 02/04
00030 // Revision: A
00031 //
00032 // Purpose: This file contains the class definition for PulseSeries.
00033 // PulseSeries is a concrete class. A PulseSeries object provides
00034 // a pulse time series. The factor is given by the pseudoTime (t),
00035 // pulse period (T), pulse width (pw) and phase shift (phi),
00036 // and a constant factor provided in the constructor,
00037 // the duration by tStart and tFinal;
00038 //
00039 // What: "@(#) PulseSeries.h, revA"
00040 
00041 #include <TimeSeries.h>
00042 
00043 class PulseSeries : public TimeSeries
00044 {
00045 public:
00046     // constructors
00047     PulseSeries(double tStart, double tFinish,
00048         double period, double pWidth, double shift, double cFactor = 1.0);
00049 
00050     PulseSeries();
00051     
00052     // destructor
00053     ~PulseSeries();
00054     
00055     // method to get load factor
00056     double getFactor(double pseudoTime);
00057     double getDuration () {return tFinish-tStart;}
00058     double getPeakFactor () {return cFactor;}
00059     double getTimeIncr (double pseudoTime) {return tFinish-tStart;}
00060     
00061     // methods for output    
00062     int sendSelf(int commitTag, Channel &theChannel);
00063     int recvSelf(int commitTag, Channel &theChannel, 
00064                  FEM_ObjectBroker &theBroker);
00065 
00066     void Print(OPS_Stream &s, int flag =0);    
00067     
00068 protected:
00069         
00070 private:
00071     double tStart;    // start time of time series (sec)
00072     double tFinish;   // end time of time series (sec)
00073     double period;    // period of pulse series (sec)
00074     double pWidth;    // width of pulse series [0..1] 
00075     double shift;     // phase shift of pulse series (sec)
00076     double cFactor;   // amplitude of pulse series
00077 };
00078 
00079 #endif

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