XC Open source finite element analysis program
stresst.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: stress tensor with all necessery functions #
32 //# CLASS: stresstensor #
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 22 '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 //# 13 septembar '96 added reportAnim :) #
48 //# #
49 //# #
50 //# #
51 //# #
52 //# #
53 //################################################################################
54 //*/
55 
56 #ifndef STRESSTENSOR_H
57 #define STRESSTENSOR_H
58 
59 #include "utility/matrix/nDarray/BJtensor.h"
60 #include <iostream>
61 
62 namespace XC {
63 class Material_Model;
64 
65 
67 //
68 class stresstensor : public BJtensor
69 {
70  public:
71  friend class Material_Model;
72 
73  public:
74  // just send appropriate arguments to the base constructor
75  stresstensor(int rank_of_tensor=2, double initval=0.0); // default constructor
76  stresstensor( double *values );
77  stresstensor( double initvalue );
78 
79  stresstensor(const stresstensor & x );
80  stresstensor(const BJtensor & x); // copy-initializer
81  stresstensor(const nDarray & x); // copy-initializer
82 
83  //~stresstensor( );
84 
85 
86  stresstensor operator=(const stresstensor & rval);// stresstensor assignment
87  stresstensor operator=(const BJtensor & rval);// tensor assignment to stresstensor
88  stresstensor operator=(const nDarray & rval);// nDarray assignment to stresstensor
89 
90  stresstensor deep_copy(void);
91  //.. stresstensor * p_deep_copy(void);
92 
93  //ini // use "from" and initialize already allocated stress tensor from "from" values
94  //ini void Initialize( const stresstensor & from );
95 
96  //___// operator() overloading for 3D Gauss points!
97  //___ stresstensor & operator()(short ir, short is, short it,
98  //___ short tr, short ts, short tt );
99 
100 
101  double Iinvariant1( ) const;
102  double Iinvariant2( ) const;
103  double Iinvariant3( ) const;
104 
105  double Jinvariant1( ) const;
106  double Jinvariant2( ) const;
107  double Jinvariant3( ) const;
108 
109  stresstensor deviator( ) const;
110  stresstensor principal( ) const;
111 
112  double sigma_octahedral( ) const;
113  double tau_octahedral( ) const;
114 
115  double ksi( ) const;
116  double xi( ) const;
117  double ro( ) const;
118  double rho( ) const;
119  double theta() const;
120  double thetaPI( ) const;
121 
122  double p_hydrostatic( ) const;
123  double q_deviatoric( ) const;
124 
125  BJtensor dpoverds( void ) const;
126  BJtensor dqoverds( void ) const;
127  BJtensor dthetaoverds( void ) const;
128  BJtensor d2poverds2( void ) const;
129  BJtensor d2qoverds2( void ) const;
130  BJtensor d2thetaoverds2( void ) const;
131 
132 
133 
134  //-- stresstensor yield_surface_cross(stresstensor & end_stress,
135  //-- Material_Model & YC);
136 
137  stresstensor pqtheta2stress( double, double, double );
138 
139  void report(const std::string &) const;
140  void reportshort(const std::string &) const;
141  void reportshortpqtheta(const std::string &) const;
142  void reportSHORTpqtheta(const std::string &) const;
143  void reportSHORTs1s2s3(const std::string &) const;
144  void reportKLOTpqtheta(const std::string &) const;
145  void reportshortI1J2J3(const std::string &) const;
146  void reportAnim(void) const;
147  void reportTensor(const std::string &) const;
148 
149  //================================================================================
150  // Overloaded Insertion Operator ZHaohui Added Aug. 13, 2000
151  // prints an stresstensor's contents
152  //================================================================================
153  friend std::ostream &operator<<(std::ostream &os, const stresstensor & rhs);
154 
155  // // routine used by root finder, takes an alfa and returns the
156  // // yield function value for that alfa
157  // public:
158  // double func( stresstensor & start_stress,
159  // stresstensor & end_stress,
160  // Material_Model & YC,
161  // double alfa );
162  //
163  //
164  // //..// polinomial root solver friend functions definitions
165  // //..public:
166  // //..friend void laguer(complex *, int , complex *, double , int );
167  // //..friend void zroots(complex *, int , complex *, int );
168  // //..
169  //
170  // zero of function
171  friend double zbrentstress(stresstensor & start_stress,
172  stresstensor & end_stress,
173  Material_Model & YC,
174  double x1, double x2, double tol);
175 
176  // friend double zbrent(double x1, double x2, double tol);
177  //
178  //
179  };
180 
181 std::ostream &operator<<(std::ostream &os, const stresstensor & rhs);
182 
183 } // end of XC namespace
184 
185 #endif
186 
Definition: BJtensor.h:110
Definition: stresst.h:68
BJtensor d2poverds2(void) const
Definition: stresst.cpp:687
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: nDarray.h:158