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