xc
ElasticBaseMaterial.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 //ElasticBaseMaterial.h
29 
30 #ifndef ElasticBaseMaterial_h
31 #define ElasticBaseMaterial_h
32 
33 #include <material/uniaxial/UniaxialMaterial.h>
34 
35 namespace XC {
37 //
40  {
41  private:
42  double ezero;
43  protected:
44  double trialStrain;
45  double E;
46  protected:
47  int sendData(Communicator &);
48  int recvData(const Communicator &);
49 
50  inline virtual double get_total_strain(void) const { return trialStrain-ezero; }
51  public:
52  ElasticBaseMaterial(int tag= 0, int classtag= 0, double E= 0.0, double e0= 0.0);
53 
54  inline double getE(void) const
55  {return E;}
56  inline void setE(const double &e)
57  {E= e;}
58 
59  int commitState(void);
60  int revertToLastCommit(void);
61  int revertToStart(void);
62 
63  int setInitialStrain(const double &);
64  int incrementInitialStrain(const double &);
65  void zeroInitialStrain(void);
66  inline double getStrain(void) const
67  { return trialStrain; }
68  inline double getInitialStrain(void) const
69  { return ezero; }
70  inline double getInitialTangent(void) const
71  { return E; }
72 
73 
74  int sendSelf(Communicator &);
75  int recvSelf(const Communicator &);
76  };
77 } // end of XC namespace
78 
79 
80 #endif
int incrementInitialStrain(const double &)
Increments the initial strain.
Definition: ElasticBaseMaterial.cc:46
double trialStrain
Material trial strain.
Definition: ElasticBaseMaterial.h:44
int revertToLastCommit(void)
Revert to the last commited state.
Definition: ElasticBaseMaterial.cc:57
int setInitialStrain(const double &)
Sets initial stress.
Definition: ElasticBaseMaterial.cc:39
Communication parameters between processes.
Definition: Communicator.h:66
int revertToStart(void)
Revert the material to its initial state.
Definition: ElasticBaseMaterial.cc:66
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ElasticBaseMaterial.cc:90
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: ElasticBaseMaterial.cc:74
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
double E
Elastic modulus.
Definition: ElasticBaseMaterial.h:45
double getInitialStrain(void) const
Return the initial strain.
Definition: ElasticBaseMaterial.h:68
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: ElasticBaseMaterial.cc:82
void zeroInitialStrain(void)
Zeroes the initial strain.
Definition: ElasticBaseMaterial.cc:53
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ElasticBaseMaterial.cc:106
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
ElasticBaseMaterial(int tag=0, int classtag=0, double E=0.0, double e0=0.0)
Constructor.
Definition: ElasticBaseMaterial.cc:35
Base class for uniaxial elastic materials.
Definition: ElasticBaseMaterial.h:39
int commitState(void)
Commit the state of the material.
Definition: ElasticBaseMaterial.cc:62