xc
TimeSeries.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.3 $
49 // $Date: 2003/03/04 00:48:12 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/domain/load/pattern/TimeSeries.h,v $
51 
52 
53 #ifndef TimeSeries_h
54 #define TimeSeries_h
55 
56 // Written: fmk
57 // Created: 07/99
58 // Revision: A
59 //
60 // Purpose: This file contains the class definition for TimeSeries.
61 // TimeSeries is an abstract class.
62 //
63 // What: "@(#) TimeSeries.h, revA"
64 
65 #include "utility/actor/actor/MovableObject.h"
66 #include "utility/kernel/CommandEntity.h"
67 
68 namespace XC {
69  class Information;
70  class Vector;
71  class MapLoadPatterns;
72 
77 //
79 //
85 class TimeSeries: public MovableObject, public CommandEntity
86  {
87  public:
88  TimeSeries(int classTag);
89  inline virtual ~TimeSeries(void)
90  {}
91 
93  virtual TimeSeries *getCopy(void) const= 0;
94 
95  const MapLoadPatterns *getMapLoadPatterns(void) const;
96  const std::string &getName(void) const;
97 
98  // pure virtual functions
102  virtual double getFactor(double pseudoTime) const= 0;
103  virtual double getDuration(void) const= 0;
104  virtual double getStartTime(void) const
105  { return 0.0; }
106  virtual double getPeakFactor(void) const= 0;
107 
108  virtual double getTimeIncr(double pseudoTime) const= 0;
109  // This is defined to be the time increment from the argument
110  // 'pseudoTime' to the NEXT point in the time series path
111  // THIS MAY CHANGE -- MAY BE BETTER TO GET THE TIME INCREMENT
112  // FROM THE PREVIOUS POINT IN THE PATH UP TO 'pseudoTime', WILL
113  // DECIDE ONCE GroundMotionIntegrator IS IMPLEMENTED
114 
115  virtual void Print(std::ostream &s, int flag = 0) const= 0;
116 
117  // AddingSensitivity:BEGIN //////////////////////////////////////////
118  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
119  virtual int updateParameter(int parameterID, Information &info);
120  virtual int activateParameter(int parameterID);
121  virtual double getFactorSensitivity(double pseudoTime);
122  // AddingSensitivity:BEGIN //////////////////////////////////////////
123  };
124 
125 int sendTimeSeriesPtr(TimeSeries *,int posClassTag, int posDbTag,DbTagData &,Communicator &comm);
126 TimeSeries *receiveTimeSeriesPtr(TimeSeries *,int posClassTag, int posDbTag,DbTagData &,const Communicator &comm);
127 
128 } // end of XC namespace
129 
130 #endif
virtual double getFactor(double pseudoTime) const =0
To return the current load factor for the given value of {pseudoTime} to be applied to the loads and ...
virtual TimeSeries * getCopy(void) const =0
Virtual constructor.
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
TimeSeries(int classTag)
Constructor.
Definition: TimeSeries.cpp:75
Object that can move between processes.
Definition: MovableObject.h:100
const std::string & getName(void) const
Returns the name of this load pattern.
Definition: TimeSeries.cpp:88
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
int sendTimeSeriesPtr(TimeSeries *, int posClassTag, int posDbTag, DbTagData &, Communicator &comm)
Send a pointer to the series through the communicator argument.
Definition: TimeSeries.cpp:111
Objet that can execute python scripts.
Definition: CommandEntity.h:40
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: TimeSeries.cpp:95
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Load pattern container.
Definition: MapLoadPatterns.h:46
Time variation of loads.
Definition: TimeSeries.h:85
TimeSeries * receiveTimeSeriesPtr(TimeSeries *, int posClassTag, int posDbTag, DbTagData &, const Communicator &comm)
Receive a pointer to the series through the communicator argument.
Definition: TimeSeries.cpp:128
Parameter.
Definition: Parameter.h:68
const MapLoadPatterns * getMapLoadPatterns(void) const
Returns a pointer to the container of the time series.
Definition: TimeSeries.cpp:79
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: TimeSeries.cpp:98
virtual int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: TimeSeries.cpp:101