XC Open source finite element analysis program
MotionHistory.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //MotionHistory.h
28 
29 #ifndef MotionHistory_h
30 #define MotionHistory_h
31 
32 #include "xc_utils/src/nucleo/EntCmd.h"
33 
34 namespace XC {
35  class TimeSeries;
36  class TimeSeriesIntegrator;
37  class Parameter;
38  class Information;
39  class Vector;
40 
42 //
45 class MotionHistory: public EntCmd
46  {
47  private:
48  TimeSeries *theAccelSeries;
49  mutable TimeSeries *theVelSeries;
50  mutable TimeSeries *theDispSeries;
51  mutable TimeSeriesIntegrator *theIntegrator;
52  double delta;
53 
54  void calcVel(void) const;
55  void calcDisp(void) const;
56  void clearSeries(void);
57  protected:
58 
59  public:
60  MotionHistory(const double &dt= 0.0);
61  MotionHistory(const MotionHistory &otro);
62  MotionHistory &operator=(const MotionHistory &otro);
63 
64  virtual ~MotionHistory(void);
65 
66  inline double getDelta(void) const
67  { return delta; }
68  inline void setDelta(const double &dT)
69  { delta= dT; }
70  void setAccelHistory(const TimeSeries *);
71  TimeSeries *getAccelHistory(void);
72 
73  size_t getNumDataPoints(void) const;
74  double getDuration(void) const;
75 
76  double getPeakAccel(void) const;
77  double getPeakVel(void) const;
78  double getPeakDisp(void) const;
79 
80  double getAccel(double time) const;
81  double getVel(double time) const;
82  double getDisp(double time) const;
83  const XC::Vector &getDispVelAccel(Vector &data,const double &time) const;
84 
85  void setIntegrator(TimeSeriesIntegrator *integrator);
86  TimeSeries *integrate(TimeSeries *theSeries) const;
87 
88  // AddingSensitivity:BEGIN //////////////////////////////////////////
89  double getAccelSensitivity(double time);
90  int setParameter(const std::vector<std::string> &argv, Parameter &param);
91  int updateParameter(int parameterID, Information &info);
92  int activateParameter(int parameterID);
93  // AddingSensitivity:END ///////////////////////////////////////////
94  void loadAccelFile(const std::string &fileNameAccel,const double &timeStep,const double &theFactor);
95  void loadAccelTimeFile(const std::string &fileNameAccel, const std::string &fileNameTime,const double &theFactor);
96 
97  };
98 } // end of XC namespace
99 
100 #endif
101 
void setAccelHistory(const TimeSeries *)
Set acceleration history.
Definition: MotionHistory.cc:76
Definition: Vector.h:82
Time integration of time series. A TimeSeriesIntegrator describes the numerical integration of a grou...
Definition: TimeSeriesIntegrator.h:74
Information about an element.
Definition: Information.h:80
Data that define acceleration, velocities and displacements due to a earthquake.
Definition: MotionHistory.h:45
Definition: Parameter.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
Time variation of loads.A TimeSeries object is used to determine the load factor to be applied to the...
Definition: TimeSeries.h:81