xc
UniaxialMaterial.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 // $Revision: 1.8 $
49 // $Date: 2003/03/04 00:48:18 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/UniaxialMaterial.h,v $
51 
52 
53 // File: ~/material/UniaxialMaterial.h
54 //
55 // Written: fmk
56 // Created: 05/98
57 // Revision: A
58 //
59 // Description: This file contains the class definition for
60 // UniaxialMaterial. UniaxialMaterial is a base class and
61 // thus no objects of it's type can be instantiated. It has pure virtual
62 // functions which must be implemented in it's derived classes.
63 //
64 // What: "@(#) UniaxialMaterial.h, revA"
65 
66 #ifndef UniaxialMaterial_h
67 #define UniaxialMaterial_h
68 
69 #define POS_INF_STRAIN 1.0e16
70 #define NEG_INF_STRAIN -1.0e16
71 
72 #include <material/Material.h>
73 namespace XC {
74 class ID;
75 class Vector;
76 class Matrix;
77 class Information;
78 class Response;
79 
80 class SectionForceDeformation;
81 
85 //
87 //
94  {
95  private:
96  double rho;
97  protected:
98  int sendData(Communicator &);
99  int recvData(const Communicator &);
100  public:
101  UniaxialMaterial(int tag, int classTag);
102 
104  virtual UniaxialMaterial *getCopy(void) const=0;
106 
107  virtual int setInitialStrain(const double &);
108  virtual int incrementInitialStrain(const double &);
109  virtual void zeroInitialStrain(void);
110 
115  virtual int setTrialStrain(double strain, double strainRate = 0.0)= 0;
116  virtual int setTrial(double strain, double &stress, double &tangent, double strainRate = 0.0);
117 
118  virtual double getInitialStrain(void) const;
119  virtual double getStrain(void) const= 0;
120  virtual double getStrainRate(void) const;
122  virtual double getStress(void) const= 0;
123  const Vector &getGeneralizedStress(void) const;
124  const Vector &getGeneralizedStrain(void) const;
125 
126  virtual void setInitialGeneralizedStrain(const Vector &);
127  const Vector &getInitialGeneralizedStrain(void) const;
128 
130  virtual double getTangent(void) const= 0;
131  virtual double getInitialTangent(void) const= 0;
132  virtual double getDampTangent(void) const;
133  virtual double getSecant(void) const;
134  virtual double getFlexibility(void) const;
135  virtual double getInitialFlexibility(void) const;
136  virtual double getRho(void) const;
137  void setRho(const double &);
138 
139  int revertToStart(void);
140 
141  virtual Response *setResponse(const std::vector<std::string> &argv, Information &matInformation);
142  virtual int getResponse(int responseID, Information &matInformation);
143 
144 // AddingSensitivity:BEGIN //////////////////////////////////////////
145  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
146  virtual int updateParameter(int parameterID, Information &info);
147  virtual int activateParameter(int parameterID);
148  virtual double getStressSensitivity(int gradIndex, bool conditional);
149  virtual double getStrainSensitivity(int gradIndex);
150  virtual double getTangentSensitivity(int gradIndex);
151  virtual double getInitialTangentSensitivity(int gradIndex);
152  virtual double getDampTangentSensitivity(int gradIndex);
153  virtual double getRhoSensitivity(int gradIndex);
154  virtual int commitSensitivity(double strainGradient, int gradIndex, int numGrads);
155 // AddingSensitivity:END ///////////////////////////////////////////
156  virtual double getEnergy(void) const;
157  };
159 
160 } // end of XC namespace
161 
162 
163 #endif
164 
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: UniaxialMaterial.cpp:324
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
virtual double getInitialStrain(void) const
Return the initial strain.
Definition: UniaxialMaterial.cpp:96
Float vector abstraction.
Definition: Vector.h:94
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: UniaxialMaterial.cpp:316
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
virtual int setInitialStrain(const double &)
Sets the initial strain value.
Definition: UniaxialMaterial.cpp:190
const Vector & getGeneralizedStress(void) const
Return the generalized stress.
Definition: UniaxialMaterial.cpp:105
virtual double getInitialFlexibility(void) const
Return the inverse of stiffness matrix inicial.
Definition: UniaxialMaterial.cpp:161
virtual int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: UniaxialMaterial.cpp:280
virtual double getTangent(void) const =0
Return the current value of the tangent for the trial strain.
UniaxialMaterial * receiveUniaxialMaterialPtr(UniaxialMaterial *, DbTagData &, const Communicator &, const BrokedPtrCommMetaData &)
Receives a pointer to uniaxial material through the communicator argument.
Definition: UniaxialMaterial.cpp:342
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
Base class for materials.
Definition: Material.h:93
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
virtual double getStress(void) const =0
Return the current value of stress.
const Vector & getInitialGeneralizedStrain(void) const
Return the generalized initial strain.
Definition: UniaxialMaterial.cpp:121
virtual double getSecant(void) const
Return secant secant stiffness of the material.
Definition: UniaxialMaterial.cpp:133
const Vector & getGeneralizedStrain(void) const
Return the generalized strain.
Definition: UniaxialMaterial.cpp:113
virtual void zeroInitialStrain(void)
Zeroes the initial strain.
Definition: UniaxialMaterial.cpp:209
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: UniaxialMaterial.cpp:274
virtual UniaxialMaterial * getCopy(void) const =0
Virtual constructor.
virtual int getResponse(int responseID, Information &matInformation)
Returns material response.
Definition: UniaxialMaterial.cpp:247
UniaxialMaterial(int tag, int classTag)
Constructor.
Definition: UniaxialMaterial.cpp:76
int revertToStart(void)
Revert the material to its initial state.
Definition: UniaxialMaterial.cpp:218
virtual double getFlexibility(void) const
Return the inverse of stiffness matrix.
Definition: UniaxialMaterial.cpp:145
virtual double getStrainRate(void) const
default operation for strain rate is zero
Definition: UniaxialMaterial.cpp:100
void setRho(const double &)
Assigns la material density.
Definition: UniaxialMaterial.cpp:181
virtual int incrementInitialStrain(const double &)
Increments the initial strain.
Definition: UniaxialMaterial.cpp:200
virtual void setInitialGeneralizedStrain(const Vector &)
Sets the initial generalized strain to the value being passed as parameter.
Definition: UniaxialMaterial.cpp:214
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: UniaxialMaterial.cpp:277
virtual double getRho(void) const
Return the material density.
Definition: UniaxialMaterial.cpp:177
Data to transmit for a pointer «broked».
Definition: BrokedPtrCommMetaData.h:40
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual int setTrialStrain(double strain, double strainRate=0.0)=0
Sets the value of the trial strain.
virtual double getDampTangent(void) const
default operation for damping tangent is zero
Definition: UniaxialMaterial.cpp:129
virtual double getEnergy(void) const
Return the energy stored in the material.
Definition: UniaxialMaterial.cpp:332
Parameter.
Definition: Parameter.h:68