PatternRecorder.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.5 $ 00022 // $Date: 2004/11/24 22:45:28 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/recorder/PatternRecorder.h,v $ 00024 00025 #ifndef PatternRecorder_h 00026 #define PatternRecorder_h 00027 00028 // Written: MHS 00029 // Created: 2002 00030 // 00031 // Description: This file contains the class definition for 00032 // PatternRecorder. A PatternRecorder records loads values from 00033 // a LoadPattern. 00034 00035 00036 #include <Recorder.h> 00037 #include <ID.h> 00038 #include <Vector.h> 00039 00040 #include <fstream> 00041 using std::ofstream; 00042 class Domain; 00043 class FE_Datastore; 00044 00045 class PatternRecorder: public Recorder 00046 { 00047 public: 00048 PatternRecorder(int thePattern, 00049 Domain &theDomain, 00050 const char *fileName, 00051 double deltaT = 0.0, 00052 int startFlag = 0); 00053 00054 ~PatternRecorder(); 00055 int record(int commitTag, double timeStamp); 00056 int playback(int commitTag); 00057 int restart(void); 00058 00059 protected: 00060 00061 private: 00062 int thePattern; 00063 Domain *theDomain; 00064 00065 int flag; // flag indicating whether time, load factor or nothing printed 00066 // at start of each line in file 00067 char *fileName; 00068 ofstream theFile; 00069 00070 double deltaT; 00071 double nextTimeStampToRecord; 00072 }; 00073 00074 #endif |