xc
Cosseratstraint.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: strain tensor with all necessary functions #
33 //# CLASS: Cosseratstraintensor #
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, Boris Jeremic #
39 //# PROGRAMMER(S): Alireza Tabarrei,Boris Jeremic #
40 //# #
41 //# #
42 //# DATE: July 25 '93 #
43 //# UPDATE HISTORY: August 22-29 '94 choped to separate files and worked on #
44 //# const and & issues #
45 //# August 30-31 '94 added use_def_dim to full the CC, #
46 //# resolved problem with temoraries for #
47 //# operators + and - ( +=, -= ) #
48 //# #
49 //# #
50 //# #
51 //# #
52 //# #
53 //# #
54 //################################################################################
55 //*/
56 //
57 #ifndef COSSERATSTRAINTENSOR_HH
58 #define COSSERATSTRAINTENSOR_HH
59 
60 #include "utility/matrix/nDarray/BJtensor.h"
61 
62 namespace XC {
71  {
72  public: // just send appropriate arguments to the base constructor
73 
74 // Cosseratstraintensor (int rank_of_tensor=2, double initval=0.00000003141528);
75  Cosseratstraintensor(double initval=0.0);
76 
77  Cosseratstraintensor(double *values);
78  Cosseratstraintensor(const std::vector<double> &);
79  Cosseratstraintensor(const boost::python::list &);
80 
82  Cosseratstraintensor(const BJtensor &x); // copy-initializer
83 
84  Cosseratstraintensor operator=(const Cosseratstraintensor & rval); // Cosseratstraintensor assignment
85  Cosseratstraintensor operator=(const BJtensor & rval);// tensor assignment to Cosseratstraintensor
86  Cosseratstraintensor operator=(const nDarray & rval);// nDarray assignment to Cosseratstraintensor
87 
88 //ini // use "from" and initialize already allocated strain tensor from "from" values
89 //ini void Initialize( const Cosseratstraintensor & from );
90 
91 //___// operator() overloading for 3D Gauss points!
92 //___ Cosseratstraintensor & operator()(short ir, short is, short it,
93 //___ short tr, short ts, short tt );
94 
95  double Iinvariant1( ) const;
96  double Iinvariant2( ) const;
97  double Iinvariant3( ) const;
98 
99  double Jinvariant1( ) const;
100  double Jinvariant2( ) const;
101  double Jinvariant3( ) const;
102 
103  double equivalent( ) const; //Zhaohui added 09-02-2000
104 
105  Cosseratstraintensor deviator( ) const;
106  Cosseratstraintensor principal( ) const;
107 
108  double sigma_octahedral( ) const;
109  double tau_octahedral( ) const;
110 
111  double ksi( ) const;
112  double ro( ) const;
113  double theta( ) const;
114  double thetaPI( ) const;
115 
116  double p_hydrostatic( ) const;
117  double q_deviatoric( ) const;
118 
119 
120  Cosseratstraintensor pqtheta2strain( double, double, double );
121  Cosseratstraintensor evoleq2strain( double, double );
122 
123  void report(const std::string &) const;
124  void reportshort(const std::string &) const;
125 
126 //..// polynomial root solver friend functions definitions
127 //..public:
128 //..friend void laguer(complex *, int , complex *, double , int );
129 //..friend void zroots(complex *, int , complex *, int );
130 //..
131 };
132 } // end of XC namespace
133 
134 #endif
135 
double Iinvariant1() const
invariants of the strain tensor Chen XC::W.F. "plasticity for Structural Engineers" ...
Definition: Cosseratstraint.cpp:111
Boris Jeremic tensor class.
Definition: BJtensor.h:112
double Iinvariant2() const
invariants of the strain tensor Chen XC::W.F. "plasticity for Structural Engineers" ...
Definition: Cosseratstraint.cpp:117
double Jinvariant1() const
invariants of the deviatoric strain XC::BJtensor
Definition: Cosseratstraint.cpp:143
n-dimensional array.
Definition: nDarray.h:242
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
double Iinvariant3() const
invariants of the strain tensor Chen XC::W.F. "plasticity for Structural Engineers" ...
Definition: Cosseratstraint.cpp:125
Strain tensor of a Cosserat material.
Definition: Cosseratstraint.h:70