xc
YieldSurface_BC2D.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 // YieldSurfaceBC_2D.h: interface for the HingeForceDeformation class.
29 //
31 
32 #ifndef YIELDSURFACE_BC2D_H
33 #define YIELDSURFACE_BC2D_H
34 
35 #include "material/yieldSurface/yieldSurfaceBC/YieldSurface_BC.h"
36 #include <material/uniaxial/UniaxialMaterial.h>
37 
38 namespace XC {
45  {
46  protected:
47 // UniaxialMaterial *kpMatX, *kpMatY;
48  double xPos, xNeg, yPos, yNeg; // Extent along X and Y
49  double a1, b1, a2, b2, a3, b3, a4, b4; // y = ax +b -> inner quad
50  double offset, increment;
51 // double isotropicRatio; // Ratio of the plastic deformation that
52  // is isotropic
54 // state variables
56 // double translateX, translateY; // Kinematic displacement
57 // double isotropicFactor; // Magnification factor
58 // double sumPlasticDeformX, sumPlasticDeformY;
59 
60 // double translateX_hist, translateY_hist;
61  int status_hist;
62  int state;
63 // double isotropicFactor_hist;
64 // double sumPlasticDeformX_hist, sumPlasticDeformY_hist;
65  double fx_hist, fy_hist, gx_hist, gy_hist;
66  double fx_trial, fy_trial, gx_trial, gy_trial;
67 
68  static Vector v6;
69  static double error;
70  static Vector v2;
71  static Vector g2;
72  static Vector v4;
73  static Vector T2;
74  static Vector F2;
75  public:
76  YieldSurface_BC2D(int tag, int classTag, double xmax, double ymax,YS_Evolution &);
77 
78 
79 
80 // virtual Response *setResponse(const std::vector<std::string> &argv, Information &info);
81 // virtual int getResponse(int responseID, Information &info);
82  virtual void Print(std::ostream &s, int flag =0) const=0;
83  virtual int sendSelf(Communicator &){return -1;}
84  virtual int recvSelf(const Communicator &){return -1;}
85 
86  virtual void setTransformation(int xDof, int yDof, int xFact, int yFact);
87 
88  virtual void getCommitGradient(Matrix &G);
89  virtual void getTrialGradient(Matrix &G, Vector &force);
90  //virtual const Vector &getGradient(void);
91  //virtual const Vector &getTrialGradient(void);
92 
93  virtual int update(int flag = 0);
94  virtual int getState(int stateInfo);
95  virtual double getTrialDrift(Vector &force);
96  virtual int getTrialForceLocation(Vector &force);
97  virtual int getCommitForceLocation();
98  //virtual const Vector &getForce(void);
99  //virtual const Vector &getTrialForce(void);
100 
101  //virtual int setTrialForce(Vector &force);
102 
103  // double getIsotropicFactor(void){ return hModel->getIsotropicFactor();}
104 
105  virtual void addPlasticStiffness(Matrix &K);
106 // virtual void checkState(Vector &trialforce, bool &plastify, bool &shootsthrough);
107 
108  virtual double setToSurface(Vector &force, int algoType, int colorFlag = 0);
109  virtual int modifySurface(double magPlasticDefo, Vector &Fsurface, Matrix &G, int flag=0);
110  //virtual int trialModifySurface(double magPlasticDefo);
111  //virtual double getElasticForce(Vector &force, Vector &elasticForce);
112 
113  virtual int commitState(Vector &force);
114  virtual int revertToLastCommit(void);
115 
116  virtual YieldSurface_BC *getCopy(void) = 0;
117 //protected:
118  virtual Vector &translationTo(Vector &f_new, Vector &f_dir);
119  virtual double getDrift(double x, double y);
120 // For the following 2 methods, x, y already non-dimensionalized
121  virtual void getGradient(double &gx, double &gy, double x, double y)=0;
122  virtual double getSurfaceDrift(double x, double y)=0;
123  virtual void setExtent()=0;
124  virtual const Vector &getExtent(void);
125 
126  virtual int forceLocation(double drift);
127  virtual double interpolate(double xi, double yi, double xj, double yj);
128  virtual void customizeInterpolate(double &xi, double &yi, double &xj, double &yj);
129 
130  double interpolateClose(double xi, double yi, double xj, double yj);
131 // Dimensionalizing taken care at Element System <--> Local System level
132 // void toDeformedCoord(double &x, double &y);
133 // void toOriginalCoord(double &x, double &y);
134  };
135 } // end of XC namespace
136 
137 #endif
Float vector abstraction.
Definition: Vector.h:94
Communication parameters between processes.
Definition: Communicator.h:66
virtual int commitState(Vector &force)
Commit the state of the material.
Definition: YieldSurface_BC2D.cpp:139
virtual int recvSelf(const Communicator &)
Receive the object.
Definition: YieldSurface_BC2D.h:84
virtual void Print(std::ostream &s, int flag=0) const =0
Print stuff.
Yield surface evolution law.
Definition: YS_Evolution.h:50
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
YieldSurfaceBC2D is an abstract class that implements methods for two-dimensional (e...
Definition: YieldSurface_BC2D.h:44
YieldSurface_BC is an abstract class and provides the interface between the specific yield surface de...
Definition: YieldSurface_BC.h:53
virtual int sendSelf(Communicator &)
Send the object.
Definition: YieldSurface_BC2D.h:83