xc
YieldSurface_BC.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 // HingeForceDeformation.h: interface for the HingeForceDeformation class.
29 //
31 
32 #ifndef YIELDSURFACE_BC_H
33 #define YIELDSURFACE_BC_H
34 
35 
36 #include "utility/tagged/TaggedObject.h"
37 #include "utility/actor/actor/MovableObject.h"
38 
39 namespace XC {
40 class Information;
41 class Response;
42 class YS_Evolution;
43 class ID;
44 
47 
54  {
55  private:
56  int checkT(void);
57 
58  public:
59  YS_Evolution *hModel;
60 
61  protected:
62  ID *T;
63  ID *S;
64  double capX_orig, capY_orig, capZ_orig;
65  double capX, capY, capZ;
66  double capXdim, capYdim, capZdim;
67  int dimension;
68  bool isLoading;
69 
70  public:
71  int ele_Tag, ele_Location;
72  const static int dFReturn, RadialReturn, ConstantXReturn, ConstantYReturn;
73  const static int NoFP, SurfOnly, StateLoading;
74  public:
75  YieldSurface_BC(int tag, int classtag, YS_Evolution &model,double capx);
76  YieldSurface_BC(int tag, int classtag, YS_Evolution &model,double capx, double capy);
77  YieldSurface_BC(int tag, int classtag, YS_Evolution &model,double capx, double capy, double capz);
78  virtual ~YieldSurface_BC();
79 
80  virtual void Print(std::ostream &s, int flag =0) const;
81  void setEleInfo(int eleTag, int loc);
82  // keep transformation virtual
83  virtual void setTransformation(int xDof, int xFact);
84  virtual void setTransformation(int xDof, int yDof, int xFact, int yFact);
85  virtual void setTransformation(int xDof, int yDof, int zDof, int xFact, int yFact, int zFact);
86 
87  // in element system
88  virtual void getCommitGradient(Matrix &G) = 0;
89  virtual void getTrialGradient(Matrix &G, Vector &force) = 0;
90  virtual double getTrialDrift(Vector &force) = 0;
91 
92 // virtual void setExtent()=0;
93  virtual const Vector &getExtent(void)=0;
94  virtual int update(int flag = 0);
95 
96  // in ys system
97  double getCap(int dir);
98  virtual Vector &translationTo(Vector &f_new, Vector &f_dir)=0;
99  virtual int getState(int stateInfo)=0;
100 
101  virtual double getDrift(double x1);
102  virtual double getDrift(double x1, double y1);
103  virtual double getDrift(double x1, double y1, double z1);
104 
105  // needed by evlution model
106  virtual double interpolate(double x1, double x2);
107  virtual double interpolate(double x1, double y1, double x2, double y2);
108  virtual double interpolate(double x1, double y1, double z1, double x2, double y2, double z2);
109 
110  virtual int getTrialForceLocation(Vector &force)=0;
111  virtual int getCommitForceLocation()=0;
112 
113  virtual void addPlasticStiffness(Matrix &K)=0;
114 
115  virtual double setToSurface(Vector &force, int algoType, int flag=0)=0;
116  virtual int modifySurface(double magPlasticDefo, Vector &Fsurface, Matrix &G, int flag=0)=0;
117 
118  virtual int commitState(Vector &force);
119  virtual int revertToLastCommit(void)=0;
120 
121  virtual YieldSurface_BC *getCopy(void) = 0;
122 
123 protected:
124  void toLocalSystem (Vector &eleVector, double &x, bool nonDimensionalize, bool signMult=true);
125  void toLocalSystem (Vector &eleVector, double &x, double &y, bool nonDimensionalize, bool signMult=true);
126  void toLocalSystem (Vector &eleVector, double &x, double &y, double &z, bool nonDimensionalize, bool signMult=true);
127 
128  // matrix do not multiply G!
129  void toLocalSystem (Matrix &eleMatrix, double &x, bool nonDimensionalize, bool signMult=true);
130  void toLocalSystem (Matrix &eleMatrix, double &x, double &y, bool nonDimensionalize, bool signMult=true);
131  void toLocalSystem (Matrix &eleMatrix, double &x, double &y, double &z, bool nonDimensionalize, bool signMult=true);
132 
133  void toElementSystem(Vector &eleVector, double &x, bool dimensionalize, bool signMult=true);
134  void toElementSystem(Vector &eleVector, double &x, double &y, bool dimensionalize, bool signMult=true);
135  void toElementSystem(Vector &eleVector, double &x, double &y, double &z, bool dimensionalize, bool signMult=true);
136 
137  void toElementSystem(Matrix &eleMatrix, double &x, bool dimensionalize, bool signMult=true);
138  void toElementSystem(Matrix &eleMatrix, double &x, double &y, bool dimensionalize, bool signMult=true);
139  void toElementSystem(Matrix &eleMatrix, double &x, double &y, double &z, bool dimensionalize, bool signMult=true);
140 };
141 } // end of XC namespace
142 
143 /*
144 enum Fstate { orig, trans };
145 
146 class ysfp
147 {
148 public:
149  ysfp(double x, enum Fstate);
150  ysfp(double x, double y, enum Fstate);
151  ysfp(double x, double y, double z, enum Fstate);
152 
153  double getOrig(int dof);
154  double getTrans(int dof);
155  //setState..
156 private:
157  bool orig, trans;
158 
159  Vector *F0;
160  Vector *Ft;
161 };
162 */
163 
164 #endif
Float vector abstraction.
Definition: Vector.h:94
virtual int commitState(Vector &force)
Commit the state of the material.
Definition: YieldSurface_BC.cpp:115
Object that can move between processes.
Definition: MovableObject.h:100
Definition: __init__.py:1
Vector of integers.
Definition: ID.h:95
virtual void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: YieldSurface_BC.cpp:731
Yield surface evolution law.
Definition: YS_Evolution.h:50
Object idenfied by an integer (tag).
Definition: TaggedObject.h:92
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
YieldSurface_BC(int tag, int classtag, YS_Evolution &model, double capx)
Constructor.
Definition: YieldSurface_BC.cpp:47
YieldSurface_BC is an abstract class and provides the interface between the specific yield surface de...
Definition: YieldSurface_BC.h:53