TrigSeries.hGo 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.2 $ 00022 // $Date: 2003/02/14 23:01:01 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/domain/pattern/TrigSeries.h,v $ 00024 00025 00026 #ifndef TrigSeries_h 00027 #define TrigSeries_h 00028 00029 // File: ~/domain/pattern/TrigSeries.h 00030 // 00031 // Written: MHS 00032 // Created: July 2000 00033 // Revision: A 00034 // 00035 // Purpose: This file contains the class definition for TrigSeries. 00036 // TrigSeries is a concrete class. A TrigSeries object provides 00037 // a sine time series. the factor is given by the pseudoTime (x), 00038 // pulse period (T), phase shift (phi), i.e. by sin(2*PI*(x-xo)/T + phi), 00039 // and a constant factor provided in the constructor, 00040 // the duration by tStart and tFinal; 00041 // 00042 // What: "@(#) TrigSeries.h, revA" 00043 00044 #include <TimeSeries.h> 00045 00046 class TrigSeries : public TimeSeries 00047 { 00048 public: 00049 // constructors 00050 TrigSeries(double tStart, double tFinish, 00051 double period, double shift, double cFactor = 1.0); 00052 TrigSeries(); 00053 00054 // destructor 00055 ~TrigSeries(); 00056 00057 // method to get load factor 00058 double getFactor(double pseudoTime); 00059 double getDuration () {return tFinish-tStart;} 00060 double getPeakFactor () {return cFactor;} 00061 double getTimeIncr (double pseudoTime) {return tFinish-tStart;} 00062 00063 // methods for output 00064 int sendSelf(int commitTag, Channel &theChannel); 00065 int recvSelf(int commitTag, Channel &theChannel, 00066 FEM_ObjectBroker &theBroker); 00067 00068 void Print(OPS_Stream &s, int flag =0); 00069 00070 protected: 00071 00072 private: 00073 double tStart; // start time of the pulse 00074 double tFinish; // finish time of the pulse 00075 double period; 00076 double shift; 00077 double cFactor; // factor = cFactor*sin for tStart <= t <= tFinish 00078 }; 00079 00080 #endif |