XC Open source finite element analysis program
T2Vector.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 //<<<<<<< T2Vector.h
28 //<<<<<<< T2Vector.h
29 // $Revision: 1.7 $
30 // $Date: 2002/05/16 00:07:47 $
31 //=======
32 // $Revision: 1.7 $
33 // $Date: 2002/05/16 00:07:47 $
34 //>>>>>>> 1.4
35 //=======
36 // $Revision: 1.7 $
37 // $Date: 2002/05/16 00:07:47 $
38 //>>>>>>> 1.6
39 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/soil/T2Vector.h,v $
40 
41 // Written: ZHY
42 // Created: August 2000
43 
44 //
45 // T2Vector.h
46 // --------
47 //
48 
49 #ifndef _T2Vector_H_
50 #define _T2Vector_H_
51 
52 #include "utility/actor/actor/MovableObject.h"
53 #include "utility/matrix/Vector.h"
54 #include <cfloat>
55 
56 #define UP_LIMIT 1.0e+30
57 #define LOW_LIMIT 20.*DBL_EPSILON
58 
59 namespace XC {
60 // global function: scalar product of two second order tensor vectors
61 double operator &&(const Vector &, const Vector &);
62 
63 // define second order tensor vector class
65 //
67 class T2Vector: public MovableObject
68  {
69  private:
70  Vector theT2Vector;
71  Vector theDeviator;
72  double theVolume;
73  static Vector engrgStrain;
74  protected:
75  int sendData(CommParameters &);
76  int recvData(const CommParameters &);
77  public:
78  // constructors
79  T2Vector();
80  T2Vector(const Vector & T2Vector_init, int isEngrgStrain=0);
81  T2Vector(const Vector & deviat_init, double volume_init);
82 
83  void setData(const Vector &init, int isEngrgStrain =0);
84  void setData(const Vector &deviat, double volume);
85 
86  const Vector & t2Vector(int isEngrgStrain=0) const;
87  const Vector & deviator(int isEngrgStrain=0) const;
88  double volume() const {return theVolume; }
89  const Vector &unitT2Vector() const;
90  const Vector &unitDeviator() const;
91  double t2VectorLength() const;
92  double deviatorLength() const;
93  double octahedralShear(int isEngrgStrain=0) const;
94 
95  // = -sqrt(3/2*(S:S))/(p+residualPress)
96  double deviatorRatio(double residualPress=0.) const;
97 
98  //next function return the angle between two T2Vectors in radians (-PI to PI)
99  double angleBetweenT2Vector(const T2Vector &) const;
100 
101  //next function return the angle between deviatoric components of
102  //two vectors in radians (-PI to PI)
103  double angleBetweenDeviator(const T2Vector &) const;
104 
105  int operator == (const T2Vector & a) const;
106  int isZero(void) const;
107  virtual int sendSelf(CommParameters &);
108  virtual int recvSelf(const CommParameters &);
109  };
110 } // end of XC namespace
111 
112 
113 #endif
Tensor de segundo orden.
Definition: T2Vector.h:67
Definition: Vector.h:82
Object that can move between processes.
Definition: MovableObject.h:91
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: T2Vector.cpp:299
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: T2Vector.cpp:313
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: T2Vector.cpp:289
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: T2Vector.cpp:279
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34