XC Open source finite element analysis program
YieldSurface_BC.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 // HingeForceDeformation.h: interface for the HingeForceDeformation class.
28 //
30 
31 #ifndef YIELDSURFACE_BC_H
32 #define YIELDSURFACE_BC_H
33 
34 
35 #include "utility/tagged/TaggedObject.h"
36 #include "utility/actor/actor/MovableObject.h"
37 
38 namespace XC {
39 class Information;
40 class Response;
41 class YS_Evolution;
42 class ID;
43 
47  {
48  private:
49  int checkT(void);
50 
51  public:
52  YS_Evolution *hModel;
53 
54  protected:
55  ID *T;
56  ID *S;
57  double capX_orig, capY_orig, capZ_orig;
58  double capX, capY, capZ;
59  double capXdim, capYdim, capZdim;
60  int dimension;
61  bool isLoading;
62 
63  public:
64  int ele_Tag, ele_Location;
65  const static int dFReturn, RadialReturn, ConstantXReturn, ConstantYReturn;
66  const static int NoFP, SurfOnly, StateLoading;
67  public:
68  YieldSurface_BC(int tag, int classtag, YS_Evolution &model,double capx);
69  YieldSurface_BC(int tag, int classtag, YS_Evolution &model,double capx, double capy);
70  YieldSurface_BC(int tag, int classtag, YS_Evolution &model,double capx, double capy, double capz);
71  virtual ~YieldSurface_BC();
72 
73  virtual void Print(std::ostream &s, int flag =0);
74  void setEleInfo(int eleTag, int loc);
75  // keep transformation virtual
76  virtual void setTransformation(int xDof, int xFact);
77  virtual void setTransformation(int xDof, int yDof, int xFact, int yFact);
78  virtual void setTransformation(int xDof, int yDof, int zDof, int xFact, int yFact, int zFact);
79 
80  // in element system
81  virtual void getCommitGradient(Matrix &G) = 0;
82  virtual void getTrialGradient(Matrix &G, Vector &force) = 0;
83  virtual double getTrialDrift(Vector &force) = 0;
84 
85 // virtual void setExtent()=0;
86  virtual const Vector &getExtent(void)=0;
87  virtual int update(int flag = 0);
88 
89  // in ys system
90  double getCap(int dir);
91  virtual Vector &translationTo(Vector &f_new, Vector &f_dir)=0;
92  virtual int getState(int stateInfo)=0;
93 
94  virtual double getDrift(double x1);
95  virtual double getDrift(double x1, double y1);
96  virtual double getDrift(double x1, double y1, double z1);
97 
98  // needed by evlution model
99  virtual double interpolate(double x1, double x2);
100  virtual double interpolate(double x1, double y1, double x2, double y2);
101  virtual double interpolate(double x1, double y1, double z1, double x2, double y2, double z2);
102 
103  virtual int getTrialForceLocation(Vector &force)=0;
104  virtual int getCommitForceLocation()=0;
105 
106  virtual void addPlasticStiffness(Matrix &K)=0;
107 
108  virtual double setToSurface(Vector &force, int algoType, int flag=0)=0;
109  virtual int modifySurface(double magPlasticDefo, Vector &Fsurface, Matrix &G, int flag=0)=0;
110 
111  virtual int commitState(Vector &force);
112  virtual int revertToLastCommit(void)=0;
113 
114  virtual YieldSurface_BC *getCopy(void) = 0;
115 
116 protected:
117  void toLocalSystem (Vector &eleVector, double &x, bool nonDimensionalize, bool signMult=true);
118  void toLocalSystem (Vector &eleVector, double &x, double &y, bool nonDimensionalize, bool signMult=true);
119  void toLocalSystem (Vector &eleVector, double &x, double &y, double &z, bool nonDimensionalize, bool signMult=true);
120 
121  // matrix do not multiply G!
122  void toLocalSystem (Matrix &eleMatrix, double &x, bool nonDimensionalize, bool signMult=true);
123  void toLocalSystem (Matrix &eleMatrix, double &x, double &y, bool nonDimensionalize, bool signMult=true);
124  void toLocalSystem (Matrix &eleMatrix, double &x, double &y, double &z, bool nonDimensionalize, bool signMult=true);
125 
126  void toElementSystem(Vector &eleVector, double &x, bool dimensionalize, bool signMult=true);
127  void toElementSystem(Vector &eleVector, double &x, double &y, bool dimensionalize, bool signMult=true);
128  void toElementSystem(Vector &eleVector, double &x, double &y, double &z, bool dimensionalize, bool signMult=true);
129 
130  void toElementSystem(Matrix &eleMatrix, double &x, bool dimensionalize, bool signMult=true);
131  void toElementSystem(Matrix &eleMatrix, double &x, double &y, bool dimensionalize, bool signMult=true);
132  void toElementSystem(Matrix &eleMatrix, double &x, double &y, double &z, bool dimensionalize, bool signMult=true);
133 };
134 } // end of XC namespace
135 
136 /*
137 enum Fstate { orig, trans };
138 
139 class ysfp
140 {
141 public:
142  ysfp(double x, enum Fstate);
143  ysfp(double x, double y, enum Fstate);
144  ysfp(double x, double y, double z, enum Fstate);
145 
146  double getOrig(int dof);
147  double getTrans(int dof);
148  //setState..
149 private:
150  bool orig, trans;
151 
152  Vector *F0;
153  Vector *Ft;
154 };
155 */
156 
157 #endif
virtual void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: YieldSurface_BC.cpp:733
Definition: Vector.h:82
Object that can move between processes.
Definition: MovableObject.h:91
Definition: ID.h:77
Definition: Matrix.h:82
Yield surface.
Definition: YieldSurface_BC.h:46
Object idenfied by an integer (tag).
Definition: TaggedObject.h:82
Yield surface evolution.
Definition: YS_Evolution.h:46
================================================================================
Definition: ContinuaReprComponent.h:34