00001
00002
00004
00005 #if !defined YIELDSURFACE_BC_H
00006 #define YIELDSURFACE_BC_H
00007
00008 #include <Renderer.h>
00009 #include <Vector.h>
00010 #include <Matrix.h>
00011 #include <ID.h>
00012 #include "YS_Evolution.h"
00013
00014 #include <DomainComponent.h>
00015 #include <MovableObject.h>
00016
00017
00018 #define min_(a,b) (((a) < (b)) ? (a) : (b))
00019 #define max_(a,b) (((a) > (b)) ? (a) : (b))
00020
00021 class Information;
00022 class Response;
00023
00024 class YieldSurface_BC : public TaggedObject, public MovableObject
00025 {
00026 public:
00027 YieldSurface_BC(int tag, int classtag, YS_Evolution &model,
00028 double capx);
00029
00030 YieldSurface_BC(int tag, int classtag, YS_Evolution &model,
00031 double capx, double capy);
00032
00033 YieldSurface_BC(int tag, int classtag, YS_Evolution &model,
00034 double capx, double capy, double capz);
00035
00036 virtual ~YieldSurface_BC();
00037
00038 virtual void Print(OPS_Stream &s, int flag =0);
00039 void setEleInfo(int eleTag, int loc);
00040
00041 virtual void setTransformation(int xDof, int xFact);
00042 virtual void setTransformation(int xDof, int yDof,
00043 int xFact, int yFact);
00044 virtual void setTransformation(int xDof, int yDof, int zDof,
00045 int xFact, int yFact, int zFact);
00046
00047
00048 virtual void getCommitGradient(Matrix &G) = 0;
00049 virtual void getTrialGradient(Matrix &G, Vector &force) = 0;
00050 virtual double getTrialDrift(Vector &force) = 0;
00051
00052
00053 virtual const Vector &getExtent(void)=0;
00054 virtual int update(int flag = 0);
00055
00056
00057 double getCap(int dir);
00058 virtual Vector& translationTo(Vector &f_new, Vector &f_dir)=0;
00059 virtual int getState(int stateInfo)=0;
00060
00061 virtual double getDrift(double x1);
00062 virtual double getDrift(double x1, double y1);
00063 virtual double getDrift(double x1, double y1, double z1);
00064
00065
00066 virtual double interpolate(double x1, double x2);
00067 virtual double interpolate(double x1, double y1, double x2, double y2);
00068 virtual double interpolate(double x1, double y1, double z1, double x2, double y2, double z2);
00069
00070 virtual int getTrialForceLocation(Vector &force)=0;
00071 virtual int getCommitForceLocation()=0;
00072
00073 virtual void addPlasticStiffness(Matrix &K)=0;
00074
00075 virtual double setToSurface(Vector &force, int algoType, int flag=0)=0;
00076 virtual int modifySurface(double magPlasticDefo, Vector &Fsurface, Matrix &G, int flag=0)=0;
00077
00078 virtual int commitState(Vector &force);
00079 virtual int revertToLastCommit(void)=0;
00080
00081 virtual YieldSurface_BC *getCopy(void) = 0;
00082 virtual int displaySelf(Renderer &theViewer, int displayMode, float fact);
00083 virtual void setView(Renderer *theRenderer);
00084
00085
00086 virtual int displayForcePoint(Vector &force, int color = 4);
00087
00088 protected:
00089 void toLocalSystem (Vector &eleVector, double &x, bool nonDimensionalize, bool signMult=true);
00090 void toLocalSystem (Vector &eleVector, double &x, double &y, bool nonDimensionalize, bool signMult=true);
00091 void toLocalSystem (Vector &eleVector, double &x, double &y, double &z, bool nonDimensionalize, bool signMult=true);
00092
00093
00094 void toLocalSystem (Matrix &eleMatrix, double &x, bool nonDimensionalize, bool signMult=true);
00095 void toLocalSystem (Matrix &eleMatrix, double &x, double &y, bool nonDimensionalize, bool signMult=true);
00096 void toLocalSystem (Matrix &eleMatrix, double &x, double &y, double &z, bool nonDimensionalize, bool signMult=true);
00097
00098 void toElementSystem(Vector &eleVector, double &x, bool dimensionalize, bool signMult=true);
00099 void toElementSystem(Vector &eleVector, double &x, double &y, bool dimensionalize, bool signMult=true);
00100 void toElementSystem(Vector &eleVector, double &x, double &y, double &z, bool dimensionalize, bool signMult=true);
00101
00102 void toElementSystem(Matrix &eleMatrix, double &x, bool dimensionalize, bool signMult=true);
00103 void toElementSystem(Matrix &eleMatrix, double &x, double &y, bool dimensionalize, bool signMult=true);
00104 void toElementSystem(Matrix &eleMatrix, double &x, double &y, double &z, bool dimensionalize, bool signMult=true);
00105
00106 private:
00107 int checkT(void);
00108
00109 public:
00110 YS_Evolution *hModel;
00111
00112 protected:
00113 Renderer *theView;
00114 ID *T;
00115 ID *S;
00116 double capX_orig, capY_orig, capZ_orig;
00117 double capX, capY, capZ;
00118 double capXdim, capYdim, capZdim;
00119 int dimension;
00120 bool isLoading;
00121
00122 public:
00123 int ele_Tag, ele_Location;
00124 const static int dFReturn, RadialReturn, ConstantXReturn, ConstantYReturn;
00125 const static int NoFP, SurfOnly, StateLoading;
00126 };
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149 #endif