XC Open source finite element analysis program
straint.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 //----------------------------------------------------------------------------
28 //################################################################################
29 //# COPYRIGHT (C): :-)) #
30 //# PROJECT: Object Oriented Finite Element Program #
31 //# PURPOSE: strain tensor with all necessery functions #
32 //# CLASS: straintensor #
33 //# #
34 //# VERSION: #
35 //# LANGUAGE: C++.ver >= 2.0 ( Borland C++ ver=3.00, SUN C++ ver=2.1 ) #
36 //# TARGET OS: DOS || UNIX || . . . #
37 //# DESIGNER(S): Boris Jeremic #
38 //# PROGRAMMER(S): Boris Jeremic #
39 //# #
40 //# #
41 //# DATE: July 25 '93 #
42 //# UPDATE HISTORY: August 22-29 '94 choped to separate files and worked on #
43 //# const and & issues #
44 //# August 30-31 '94 added use_def_dim to full the CC, #
45 //# resolved problem with temoraries for #
46 //# operators + and - ( +=, -= ) #
47 //# #
48 //# #
49 //# #
50 //# #
51 //# #
52 //# #
53 //################################################################################
54 //*/
55 //
56 #ifndef STRAINTENSOR_HH
57 #define STRAINTENSOR_HH
58 
59 #include "utility/matrix/nDarray/BJtensor.h"
60 #include <iostream>
61 
62 namespace XC {
63 
65 //
67 class straintensor : public BJtensor
68  {
69  public: // just send appropriate arguments to the base constructor
70 // straintensor (int rank_of_tensor=2, double initval=0.00000003141528);
71  straintensor (int rank_of_tensor=2, double initval=0.0);
72 // default constructor // this is just PI/10^8 to check default constructor
73 
74  straintensor(double *values);
75  straintensor(double initvalue);
76 
77  straintensor(const straintensor & x );
78  straintensor(const BJtensor & x); // copy-initializer
79  straintensor(const nDarray & x); // copy-initializer
80 
81  straintensor operator=(const straintensor & rval); // straintensor assignment
82  straintensor operator=(const BJtensor & rval);// tensor assignment to straintensor
83  straintensor operator=(const nDarray & rval);// nDarray assignment to straintensor
84 
85  straintensor deep_copy(void);
86 //.. straintensor * p_deep_copy(void);
87 
88 //ini // use "from" and initialize already allocated strain tensor from "from" values
89 //ini void Initialize( const straintensor & from );
90 
91 //___// operator() overloading for 3D Gauss points!
92 //___ straintensor & operator()(short ir, short is, short it,
93 //___ short tr, short ts, short tt );
94 
95  double Iinvariant1(void) const;
96  double Iinvariant2(void) const;
97  double Iinvariant3(void) const;
98 
99  double Jinvariant1(void) const;
100  double Jinvariant2(void) const;
101  double Jinvariant3(void) const;
102 
103  double equivalent(void) const; //Zhaohui added 09-02-2000
104 
105  straintensor deviator(void) const;
106  straintensor principal(void) const;
107 
108  double sigma_octahedral(void) const;
109  double tau_octahedral(void) const;
110 
111  double ksi(void) const;
112  double ro(void) const;
113  double theta(void) const;
114  double thetaPI(void) const;
115 
116  double p_hydrostatic(void) const;
117  double q_deviatoric(void) const;
118 
119 
120  straintensor pqtheta2strain( double, double, double );
121  straintensor evoleq2strain( double, double );
122 
123  void report(const std::string &) const;
124  void reportshort(const std::string &) const;
125 
126  friend std::ostream &operator<<(std::ostream &os, const straintensor &rhs);
127 
128 //..// polinomial root solver friend functions definitions
129 //..public:
130 //..friend void laguer(complex *, int , complex *, double , int );
131 //..friend void zroots(complex *, int , complex *, int );
132 //..
133  };
134 
135 std::ostream &operator<<(std::ostream &os, const straintensor &rhs);
136 
137 } // end of XC namespace
138 
139 #endif
140 
straintensor operator=(const straintensor &rval)
Operador de asignación.
Definition: straint.cpp:129
Definition: BJtensor.h:110
Strain tensor.
Definition: straint.h:67
straintensor(int rank_of_tensor=2, double initval=0.0)
Constructor.
Definition: straint.cpp:62
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: nDarray.h:158