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