xc
MultiLinear.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 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 #ifndef MultiLinear_h
49 #define MultiLinear_h
50 
51 // Written: fmk
52 // Created: 05/12
53 // Revision: A
54 //
55 // Description: This file contains the class definition for
56 // MultiLinear. MultiLinear provides the abstraction
57 // of an elastic perfectly plastic uniaxial material,
58 //
59 // What: "@(#) MultiLinear.h, revA"
60 
61 #include "material/uniaxial/UniaxialMaterial.h"
62 #include "utility/matrix/Matrix.h"
63 
64 namespace XC {
66 //
73  {
74  protected:
75  Vector e0; // Initial backbone strains
76  Vector s0; // Initial backbone stresses
77 
78  Matrix data;
79  int numSlope;
80  int tSlope;
81 
82  double tStrain; // current t strain
83  double tStress; // current t stress
84  double tTangent; // current t tangent
85  double cStrain; // last ced strain
86  double cStress; // last ced stress
87  double cTangent; // last cted tangent
88 
89  DbTagData &getDbTagData(void) const;
90  int sendData(Communicator &);
91  int recvData(const Communicator &);
92  void setup_data(void);
93  void setup(const Vector &, const Vector &);
94  public:
95  MultiLinear(int tag= 0);
96  MultiLinear(int tag, const Vector &s, const Vector &e);
97  UniaxialMaterial *getCopy(void) const;
98  virtual ~MultiLinear();
99 
100  void setupPyList(const boost::python::list &points);
101  int getNumPoints(void) const;
102  const Vector &getBackboneStrains(void) const;
103  boost::python::list getBackboneStrainsPy(void) const;
104  const Vector &getBackboneStresses(void) const;
105  boost::python::list getBackboneStressesPy(void) const;
106 
107  int setTrialStrain(double strain, double strainRate = 0.0);
108  double getStrain(void) const;
109  double getStress(void) const;
110  double getTangent(void) const;
111 
112  double getInitialTangent(void) const
113  {return data(0,4);}
114 
115  int commitState(void);
116  int revertToLastCommit(void);
117  int revertToStart(void);
118 
119  UniaxialMaterial *getCopy(void);
120 
121  int sendSelf(Communicator &);
122  int recvSelf(const Communicator &);
123 
124  void Print(std::ostream &s, int flag =0) const;
125 
126  int setParameter(const std::vector<std::string> &argv, Parameter &param);
127  int updateParameter(int parameterID, Information &info);
128  };
129 } // end of XC namespace
130 
131 #endif
double getStress(void) const
Return the current value of stress.
Definition: MultiLinear.cpp:236
void setupPyList(const boost::python::list &points)
Set values from a python list of tuples.
Definition: MultiLinear.cpp:132
Float vector abstraction.
Definition: Vector.h:94
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: MultiLinear.cpp:456
int numSlope
number of intervals.
Definition: MultiLinear.h:79
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Multilinear uniaxial material.
Definition: MultiLinear.h:72
boost::python::list getBackboneStrainsPy(void) const
Return the strains that define the material backbone.
Definition: MultiLinear.cpp:210
double getTangent(void) const
Return the current value of the tangent for the trial strain.
Definition: MultiLinear.cpp:239
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: MultiLinear.cpp:384
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
const Vector & getBackboneStresses(void) const
Return the stresses that define the material backbone.
Definition: MultiLinear.cpp:220
int getNumPoints(void) const
Return the number of intervals used to define the material.
Definition: MultiLinear.cpp:379
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: MultiLinear.cpp:485
const Vector & getBackboneStrains(void) const
Return the strains that define the material backbone.
Definition: MultiLinear.cpp:206
virtual ~MultiLinear()
Destructor.
Definition: MultiLinear.cpp:164
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: MultiLinear.cpp:404
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: MultiLinear.cpp:447
void setup(const Vector &, const Vector &)
Constructs the material from the values of stresses and strains.
Definition: MultiLinear.cpp:83
int recvSelf(const Communicator &)
Receive the object.
Definition: MultiLinear.cpp:429
UniaxialMaterial * getCopy(void) const
Virtual constructor.
Definition: MultiLinear.cpp:375
boost::python::list getBackboneStressesPy(void) const
Return the stresses that define the material backbone.
Definition: MultiLinear.cpp:224
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: MultiLinear.cpp:391
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
int setTrialStrain(double strain, double strainRate=0.0)
Sets the value of the trial strain.
Definition: MultiLinear.cpp:169
Parameter.
Definition: Parameter.h:68
int sendSelf(Communicator &)
Send the object.
Definition: MultiLinear.cpp:416