xc
YS_Evolution.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 // YS_Evolution.h
28 //
30 
31 #ifndef YS_EVOLUTION_H
32 #define YS_EVOLUTION_H
33 
34 #include "utility/tagged/TaggedObject.h"
35 #include "utility/actor/actor/MovableObject.h"
36 #include "utility/matrix/Vector.h"
37 
38 namespace XC {
39 class Information;
40 class Response;
41 class YieldSurface_BC;
42 
47  {
48  public:
49  bool freezeEvolution;
50  private:
51  void checkDimension(int dir);
52  void toDeformedCoord(Vector &coord);
53  void toOriginalCoord(Vector &coord);
54  protected:
55  //double isotropicFactor_hist, isotropicFactor; // Effective magnification
56  bool deformable;
57  Vector isotropicFactor_hist, isotropicFactor;
58  Vector translate_hist, translate;
59  Vector translate_init;
60  double isotropicRatio_orig, isotropicRatio, isotropicRatio_shrink;
61  double kinematicRatio_orig, kinematicRatio, kinematicRatio_shrink;
62  int dimension;
63  static Vector crd1, crd2, crd3;
64  public:
65  YS_Evolution(int tag, int classTag, double iso_ratio, double kin_ratio,
66  int _dimension, double shr_iso=0.5, double shr_kin=0.5);
67 // Methods inherited
68  virtual void Print(std::ostream &s, int flag =0);
69 
70  virtual int update(int flag=0);
71  virtual int commitState(void);
72  virtual int revertToLastCommit(void);
73  virtual YS_Evolution *getCopy(void) = 0;
74 
75  virtual Response *setResponse(const std::vector<std::string> &argv, Information &info)=0;
76  virtual int getResponse(int responseID, Information &info)=0;
77 
78 // Public methods called by the yield surface
79  virtual int evolveSurface(YieldSurface_BC *ys, double magPlasticDefo, Vector &G, Vector &F_Surface, int flag=0)=0;
80 
81  // needed by ys->add Kp
82  virtual const Vector &getEquiPlasticStiffness(void)=0;
83 
84  virtual double getTrialPlasticStrains(int dof)=0;
85  virtual double getCommitPlasticStrains(int dof)=0;
86  const Vector &getGeneralizedStress(void) const;
87  const Vector &getGeneralizedStrain(void) const;
88 
89  virtual void setResidual(double res=1.0);
90  void setInitTranslation(Vector &initTranslate);
91  const Vector &getInitTranslation(void);
92 
93  double getCommitTranslation(int dof);
94  double getTrialTranslation(int dof);
95  double getTrialIsotropicFactor(int dof);
96  double getCommitIsotropicFactor(int dof);
97 
98  void setDeformable(bool defo);
99 
100  void toDeformedCoord(double &x);
101  void toDeformedCoord(double &x, double &y);
102  void toDeformedCoord(double &x, double &y, double &z);
103 
104  void toOriginalCoord(double &x);
105  void toOriginalCoord(double &x, double &y);
106  void toOriginalCoord(double &x, double &y, double &z);
107  };
108 } // end of XC namespace
109 
110 #endif
Float vector abstraction.
Definition: Vector.h:93
Information about an element.
Definition: Information.h:80
Definition: Response.h:71
Object that can move between processes.
Definition: MovableObject.h:99
Yield surface evolution.
Definition: YS_Evolution.h:46
Object idenfied by an integer (tag).
Definition: TaggedObject.h:91
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
virtual void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: YS_Evolution.cpp:246
Yield surface.
Definition: YieldSurface_BC.h:46