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 
42  {
43  public:
44  // just send appropriate arguments to the base constructor
45  stressstraintensor(double initval=0.0); // default constructor
46  stressstraintensor(const boost::python::list &l);
47  stressstraintensor(const double *values );
48  stressstraintensor(const std::vector<double> &values );
49  explicit stressstraintensor(const Vector &);
50 
52  explicit stressstraintensor(const BJtensor & x); // copy-initializer
53  explicit stressstraintensor(const nDarray & x); // copy-initializer
54 
55  stressstraintensor operator=(const stressstraintensor & rval);
56  stressstraintensor operator=(const BJtensor & rval);
57 
58  stressstraintensor &operator+=(const stressstraintensor & rval); // stressstraintensor addition
59  stressstraintensor &operator-=(const stressstraintensor & rval); // stressstraintensor subtraction
60 
61  stressstraintensor &operator*=(const double &rval); // scalar multiplication
62  stressstraintensor operator*(const double &rval) const; // scalar multiplication
63 
64  Vector getVector(const size_t &dim) const;
65 
66  double Iinvariant1(void) const;
67  double Iinvariant2(void) const;
68  double Iinvariant3(void) const;
69 
70  double Jinvariant1(void) const;
71  double Jinvariant2(void) const;
72  double Jinvariant3(void) const;
73 
74  void compute_deviator(stressstraintensor &) const;
75  void compute_principal(stressstraintensor &) const;
76 
77  double sigma_octahedral(void) const;
78  double tau_octahedral(void) const;
79 
80  double ksi(void) const;
81  double ro(void) const;
82  double rho(void) const;
83  double theta() const;
84  double thetaPI(void) const;
85 
86  double p_hydrostatic(void) const;
87  double q_deviatoric(void) const;
88  };
89 
90 template stressstraintensor operator*(const double & , const stressstraintensor & );
93 
94 } // end of XC namespace
95 
96 #endif
97 
stressstraintensor & operator*=(const double &rval)
Scalar multiplication.
Definition: stress_strain_tensor.cc:130
nDarray operator-()
unary minus
Definition: nDarray.cpp:665
Float vector abstraction.
Definition: Vector.h:94
Base class for strain and stress tensors.
Definition: stress_strain_tensor.h:41
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:106
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:597
double Jinvariant1(void) const
invariants of the deviatoric stressstrain XC::BJtensor
Definition: stress_strain_tensor.cc:200