XC Open source finite element analysis program
PathSeriesBase.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 //PathSeriesBase.h
28 
29 #ifndef PathSeriesBase_h
30 #define PathSeriesBase_h
31 
32 #include <domain/load/pattern/time_series/CFactorSeries.h>
33 #include "utility/matrix/Vector.h"
34 
35 namespace XC {
36 class Vector;
37 
39 //
43  {
44  protected:
46  int lastSendCommitTag;
47 
48  static size_t load_vector_from_file(Vector &v,std::istream &is);
49 
50  int sendData(CommParameters &cp);
51  int recvData(const CommParameters &cp);
52  public:
53  // constructors
54  PathSeriesBase(int classTag,const double &cfactor= 1.0);
55  PathSeriesBase(int classTag,const Vector &thePath,const double &cfactor= 1.0);
56 
57  size_t getNumDataPoints(void) const;
58  size_t getNumDataPointsOnFile(const std::string &) const;
59  double getPeakFactor(void) const;
60 
61  inline Vector getPath(void) const
62  { return thePath; }
63  inline void setPath(const Vector &d)
64  { thePath= d; }
65  inline int getLastSendCommitTag(void) const
66  { return lastSendCommitTag; }
67  inline void setLastSendCommitTag(const int &d)
68  { lastSendCommitTag= d; }
69 
70  void Print(std::ostream &s, int flag =0) const;
71  };
72 } // end of XC namespace
73 
74 #endif
75 
double getPeakFactor(void) const
Returns the peak value of the factor.
Definition: PathSeriesBase.cc:87
Base class for constant factor time series.
Definition: CFactorSeries.h:38
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: PathSeriesBase.cc:120
PathSeriesBase(int classTag, const double &cfactor=1.0)
Constructor.
Definition: PathSeriesBase.cc:38
Definition: Vector.h:82
size_t getNumDataPointsOnFile(const std::string &) const
Returns the number of data en on the file with the name being passed as parameter.
Definition: PathSeriesBase.cc:52
Base class for time-dependent functions defined by a series of points (ti,fi).
Definition: PathSeriesBase.h:42
size_t getNumDataPoints(void) const
Returns the número de puntos que definen el path.
Definition: PathSeriesBase.cc:48
static size_t load_vector_from_file(Vector &v, std::istream &is)
Lee desde archivo.
Definition: PathSeriesBase.cc:74
void Print(std::ostream &s, int flag=0) const
Imprime el objeto.
Definition: PathSeriesBase.cc:103
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
Vector thePath
vector containg the data points
Definition: PathSeriesBase.h:45
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: PathSeriesBase.cc:111