XC Open source finite element analysis program
CyclicModel.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 #ifndef CyclicModel_H
28 #define CyclicModel_H
29 
30 #include <utility/tagged/TaggedObject.h>
31 #include <utility/actor/actor/MovableObject.h>
32 
33 namespace XC {
35 //
37 class CyclicModel : public TaggedObject, public MovableObject
38  {
39  private:
40  int initNewTask();
41  protected:
42  double resFactor;
43  double cycFactor, cycFactor_hist;
44  double f_hist, d_hist;
45  double f_curr, d_curr;
46  double delT_curr, delT_hist;
47  double f_bgn, d_bgn;
48  double f_end, d_end;
49 
50  bool initYieldPos, initYieldNeg;
51  bool initCyc;
52  bool yielding, yielding_hist;
53  double initFpos,initDpos;
54  double initFneg,initDneg;
55  double initFMag,initDMag;
56  double k_init;
57  double k_hist, k_curr;
58  double fpeakPos, fpeakNeg;
59  double dpeakPos, dpeakNeg;
60  int state_hist, state_curr;
61 
62  const static int Loading,Unloading, Crossover;
63  const static double Tol, delK;
64  public:
65  CyclicModel(int tag, int classTag);
66 
67  int commitState(double newResidual);
68  void update(double f, double d, bool yield);
69  virtual CyclicModel *getCopy()=0;
70 
71  virtual double getFactor();
72  // for now ignore
73  virtual int sendSelf(CommParameters &)
74  {return -1;}
75  virtual int recvSelf(const CommParameters &)
76  {return -1;}
77  virtual void Print (std::ostream &s, int flag=0);
78  protected:
79 // virtual methods
80  virtual int createFullCycleTask();
81  virtual int createHalfCycleTask();
82  virtual double getTaskFactor()=0;
83 
84 // protected:
85  int setCurrent(double f, double d);
86  int dir(double x);
87 
88  int taskStatus(void);
89  double rationalize(double x1, double y1, double x2, double y2);
90  bool contains(double x1, double x2, double x);
91  };
92 } // end of XC namespace
93 
94 #endif
95 
Object that can move between processes.
Definition: MovableObject.h:91
??.
Definition: CyclicModel.h:37
Object idenfied by an integer (tag).
Definition: TaggedObject.h:82
virtual void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: CyclicModel.cpp:349
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
virtual CyclicModel * getCopy()=0
Virtual constructor.