xc
steel02_state_variables.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 steel02_state_variables_h
30 #define steel02_state_variables_h
31 
32 namespace XC {
33 
36  {
37  double eps;
38  double sig;
39  double e;
40 
42  void setup_parameters(const double &, const double &);
43  void print(std::ostream &) const;
44  };
45 
46 inline steel02_state_variables::steel02_state_variables(void)
47  : eps(0.0), sig(0.0), e(0.0)
48  {}
49 
50 inline void steel02_state_variables::setup_parameters(const double &E0, const double &sigini)
51  {
52  this->e= E0;
53  this->sig= 0.0;
54  this->eps= 0.0;
55 
56  if(sigini!=0.0)
57  {
58  this->eps= sigini/E0;
59  this->sig= sigini;
60  }
61  }
62 
64 inline void steel02_state_variables::print(std::ostream &os) const
65  { os << this->eps << " " << this->sig << " " << this->e; }
66 
67 inline std::ostream& operator<<(std::ostream &os, const steel02_state_variables &stv)
68  {
69  stv.print(os);
70  return os;
71  }
72 
73 } // end of XC namespace
74 
75 #endif
76 
double sig
stress
Definition: steel02_state_variables.h:38
double eps
strain
Definition: steel02_state_variables.h:37
void print(std::ostream &) const
Print stuff.
Definition: steel02_state_variables.h:64
Variables to keep track of the material state.
Definition: steel02_state_variables.h:35
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
double e
stiffness modulus
Definition: steel02_state_variables.h:39