xc
stress_strain_tensor.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 //----------------------------------------------------------------------------
28 
29 #ifndef STRESSSTRAINTENSOR_H
30 #define STRESSSTRAINTENSOR_H
31 
32 #include "utility/matrix/nDarray/BJtensor.h"
33 #include "tmpl_operators.h"
34 
35 namespace XC {
36 class Vector;
37 
38 
43  {
44  public:
45  // just send appropriate arguments to the base constructor
46  stressstraintensor(double initval=0.0); // default constructor
47  stressstraintensor(const boost::python::list &l);
48  stressstraintensor(const double *values );
49  stressstraintensor(const std::vector<double> &values );
50  explicit stressstraintensor(const Vector &);
51 
53  explicit stressstraintensor(const BJtensor & x); // copy-initializer
54  explicit stressstraintensor(const nDarray & x); // copy-initializer
55 
56  stressstraintensor operator=(const stressstraintensor & rval);
57  stressstraintensor operator=(const BJtensor & rval);
58 
59  stressstraintensor &operator+=(const stressstraintensor & rval); // stressstraintensor addition
60  stressstraintensor &operator-=(const stressstraintensor & rval); // stressstraintensor subtraction
61 
62  stressstraintensor &operator*=(const double &rval); // scalar multiplication
63  stressstraintensor operator*(const double &rval) const; // scalar multiplication
64 
65  Vector getVector(const size_t &dim) const;
66 
67  double Iinvariant1(void) const;
68  double Iinvariant2(void) const;
69  double Iinvariant3(void) const;
70 
71  double Jinvariant1(void) const;
72  double Jinvariant2(void) const;
73  double Jinvariant3(void) const;
74 
75  void compute_deviator(stressstraintensor &) const;
76  void compute_principal(stressstraintensor &) const;
77 
78  double sigma_octahedral(void) const;
79  double tau_octahedral(void) const;
80 
81  double ksi(void) const;
82  double ro(void) const;
83  double rho(void) const;
84  double theta() const;
85  double thetaPI(void) const;
86 
87  double p_hydrostatic(void) const;
88  double q_deviatoric(void) const;
89  };
90 
91 template stressstraintensor operator*(const double & , const stressstraintensor & );
94 
95 } // end of XC namespace
96 
97 #endif
98 
stressstraintensor & operator*=(const double &rval)
Scalar multiplication.
Definition: stress_strain_tensor.cc:130
nDarray operator-()
unary minus
Definition: nDarray.cpp:798
Float vector abstraction.
Definition: Vector.h:94
Base class for strain and stress tensors.
Definition: stress_strain_tensor.h:42
Boris Jeremic tensor class.
Definition: BJtensor.h:112
stressstraintensor & operator-=(const stressstraintensor &rval)
stressstraintensor subtraction
Definition: stress_strain_tensor.cc:123
stressstraintensor operator*(const double &rval) const
Scalar multiplication.
Definition: stress_strain_tensor.cc:137
stressstraintensor & operator+=(const stressstraintensor &rval)
stressstraintensor addition
Definition: stress_strain_tensor.cc:116
n-dimensional array.
Definition: nDarray.h:242
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
double Iinvariant1(void) const
invariants of the stressstrain XC::BJtensor Chen XC::W.F.
Definition: stress_strain_tensor.cc:171
nDarray operator+(const double &rval)
scalar addition
Definition: nDarray.cpp:730
double Jinvariant1(void) const
invariants of the deviatoric stressstrain XC::BJtensor
Definition: stress_strain_tensor.cc:200