00001
00002
00004
00005 #if !defined YS_EVOLUTION_H
00006 #define YS_EVOLUTION_H
00007
00008
00009
00010 #include <Vector.h>
00011 #include <Matrix.h>
00012 #include <DomainComponent.h>
00013 #include <MovableObject.h>
00014
00015
00016 #define min_(a,b) (((a) < (b)) ? (a) : (b))
00017 #define max_(a,b) (((a) > (b)) ? (a) : (b))
00018 #define sign(a) (((a) < (0)) ?(-1) : (1))
00019
00020 class Information;
00021 class Response;
00022 class YieldSurface_BC;
00023
00024 class YS_Evolution : public TaggedObject, public MovableObject
00025 {
00026 public:
00027 YS_Evolution(int tag, int classTag, double iso_ratio, double kin_ratio,
00028 int _dimension, double shr_iso=0.5, double shr_kin=0.5);
00029 virtual ~YS_Evolution();
00030
00031
00032 virtual void Print(OPS_Stream &s, int flag =0);
00033
00034
00035 virtual int update(int flag=0);
00036 virtual int commitState();
00037 virtual int revertToLastCommit(void);
00038 virtual YS_Evolution *getCopy(void) = 0;
00039
00040 virtual Response *setResponse(char **argv, int argc, Information &info)=0;
00041 virtual int getResponse(int responseID, Information &info)=0;
00042 virtual int displaySelf(Renderer &theViewer, int displayMode, float fact)=0;
00043
00044
00045 virtual int evolveSurface(YieldSurface_BC *ys, double magPlasticDefo, Vector &G,
00046 Vector &F_Surface, int flag=0)=0;
00047
00048
00049 virtual const Vector &getEquiPlasticStiffness(void)=0;
00050
00051 virtual double getTrialPlasticStrains(int dof)=0;
00052 virtual double getCommitPlasticStrains(int dof)=0;
00053 virtual void setResidual(double res=1.0);
00054 void setInitTranslation(Vector &initTranslate);
00055 const Vector &getInitTranslation(void);
00056
00057 double getCommitTranslation(int dof);
00058 double getTrialTranslation(int dof);
00059 double getTrialIsotropicFactor(int dof);
00060 double getCommitIsotropicFactor(int dof);
00061
00062 void setDeformable(bool defo);
00063
00064 void toDeformedCoord(double &x);
00065 void toDeformedCoord(double &x, double &y);
00066 void toDeformedCoord(double &x, double &y, double &z);
00067
00068 void toOriginalCoord(double &x);
00069 void toOriginalCoord(double &x, double &y);
00070 void toOriginalCoord(double &x, double &y, double &z);
00071 public:
00072 bool freezeEvolution;
00073
00074
00075
00076 private:
00077 void checkDimension(int dir);
00078 void toDeformedCoord(Vector &coord);
00079 void toOriginalCoord(Vector &coord);
00080 protected:
00081
00082 bool deformable;
00083 Vector isotropicFactor_hist, isotropicFactor;
00084 Vector translate_hist, translate;
00085 Vector translate_init;
00086 double isotropicRatio_orig, isotropicRatio, isotropicRatio_shrink;
00087 double kinematicRatio_orig, kinematicRatio, kinematicRatio_shrink;
00088 int dimension;
00089 static Vector crd1, crd2, crd3;
00090 };
00091
00092 #endif