YieldSurface_BC.h

Go to the documentation of this file.
00001 // HingeForceDeformation.h: interface for the HingeForceDeformation class.
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 // min_, max_ provide functions for getting min/max of 2 quantities
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          // keep transformation virtual
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     // in element system
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 //    virtual void  setExtent()=0;
00053         virtual const   Vector &getExtent(void)=0;
00054         virtual int             update(int flag = 0);
00055 
00056     // in ys system
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         // needed by evlution model
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         // required for debugging only
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         // matrix do not multiply G!
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 enum Fstate { orig, trans };
00130 
00131 class ysfp
00132 {
00133 public:
00134         ysfp(double x, enum Fstate);
00135         ysfp(double x, double y, enum Fstate);
00136         ysfp(double x, double y, double z, enum Fstate);
00137 
00138         double getOrig(int dof);
00139         double getTrans(int dof);
00140         //setState..
00141 private:
00142         bool orig, trans;
00143 
00144         Vector *F0;
00145         Vector *Ft;
00146 };
00147 */
00148 
00149 #endif

Generated on Mon Oct 23 15:05:23 2006 for OpenSees by doxygen 1.5.0