xc
CreepSteps.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 // Keep track of the creep history variables.
30 
31 #ifndef CreepSteps_h
32 #define CreepSteps_h
33 
34 #include <vector>
35 
36 namespace XC {
37 
38 class CreepConcreteHistoryVars;
39 
41  {
42  protected:
43  //Added by AMK:
44  int count;
45 
46  std::vector<float> E_i;
47  std::vector<float> DSIG_i;
48  // std::vector<float> dsig_i; // NOT USED.
49  std::vector<float> TIME_i; //Time from the previous time step
50  std::vector<float> DTIME_i;
51 
52  static int creepControl;
53  static double creepDt;
54 
55  virtual std::size_t resize(void);
56 
57  public:
58  CreepSteps(void);
59 
60  const int &getCount(void) const
61  { return this->count;}
62  const int &next(void)
63  {
64  this->count++;
65  this->resize();
66  return count;
67  }
68 
69  const float &getLastTime(void) const
70  { return this->TIME_i[this->count]; }
71  void initTime(const float &time)
72  { this->TIME_i[0]= time; }
73 
74  void setCreepDt(void)
75  { this->DTIME_i[this->count]= creepDt; }
76 
77  void assignNextStep(const CreepConcreteHistoryVars &hstv, const CreepConcreteHistoryVars &hstvP, const double &Ec, const double &eps_m, const double &currentTime);
78 
79  static void setCreepOn(void);
80  static void setCreepOff(void);
81  static bool isCreepOn(void);
82  static void setCreepDt(const double &);
83  static double getCreepDt(void);
84  };
85 
86 inline void set_creep_on(void)
87  { CreepSteps::setCreepOn(); }
88 inline void set_creep_off(void)
89  { CreepSteps::setCreepOff(); }
90 inline bool is_creep_on(void)
91  { return CreepSteps::isCreepOn(); }
92 inline bool is_creep_off(void)
93  { return !is_creep_on(); }
94 inline void set_creep_dt(const double &d)
95  { CreepSteps::setCreepDt(d); }
96 inline double get_creep_dt(void)
97  { return CreepSteps::getCreepDt(); }
98 
99 } // end of XC namespace
100 
101 #endif
102 
CreepSteps(void)
Constructor.
Definition: CreepSteps.cc:64
Definition: ConcreteHistoryVars.h:102
virtual std::size_t resize(void)
Resize the vectors that store the creep history.
Definition: CreepSteps.cc:35
static int creepControl
Controls creep calculation (see setTrialStrain).
Definition: CreepSteps.h:52
Definition: CreepSteps.h:40
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void assignNextStep(const CreepConcreteHistoryVars &hstv, const CreepConcreteHistoryVars &hstvP, const double &Ec, const double &eps_m, const double &currentTime)
Assign the values of the next step and resize the vectors if needed.
Definition: CreepSteps.cc:75