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