xc
UniaxialMaterial.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.8 $
48 // $Date: 2003/03/04 00:48:18 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/UniaxialMaterial.h,v $
50 
51 
52 // File: ~/material/UniaxialMaterial.h
53 //
54 // Written: fmk
55 // Created: 05/98
56 // Revision: A
57 //
58 // Description: This file contains the class definition for
59 // UniaxialMaterial. UniaxialMaterial is a base class and
60 // thus no objects of it's type can be instantiated. It has pure virtual
61 // functions which must be implemented in it's derived classes.
62 //
63 // What: "@(#) UniaxialMaterial.h, revA"
64 
65 #ifndef UniaxialMaterial_h
66 #define UniaxialMaterial_h
67 
68 #define POS_INF_STRAIN 1.0e16
69 #define NEG_INF_STRAIN -1.0e16
70 
71 #include <material/Material.h>
72 namespace XC {
73 class ID;
74 class Vector;
75 class Matrix;
76 class Information;
77 class Response;
78 
79 class SectionForceDeformation;
80 
84 //
86 //
92 class UniaxialMaterial : public Material
93  {
94  private:
95  double rho;
96  protected:
97  int sendData(CommParameters &);
98  int recvData(const CommParameters &);
99  public:
100  UniaxialMaterial(int tag, int classTag);
101 
102  virtual int setInitialStrain(double strain);
107  virtual int setTrialStrain(double strain, double strainRate = 0.0)= 0;
108  virtual int setTrial(double strain, double &stress, double &tangent, double strainRate = 0.0);
109 
110  virtual double getInitialStrain(void) const;
111  virtual double getStrain(void) const= 0;
112  virtual double getStrainRate(void) const;
114  virtual double getStress(void) const= 0;
115  const Vector &getGeneralizedStress(void) const;
116  const Vector &getGeneralizedStrain(void) const;
117 
118  virtual void setInitialGeneralizedStrain(const Vector &);
119  const Vector &getInitialGeneralizedStrain(void) const;
120 
122  virtual double getTangent(void) const= 0;
123  virtual double getInitialTangent(void) const= 0;
124  virtual double getDampTangent(void) const;
125  virtual double getSecant(void) const;
126  virtual double getFlexibility(void) const;
127  virtual double getInitialFlexibility(void) const;
128  virtual double getRho(void) const;
129  void setRho(const double &);
130 
132  virtual UniaxialMaterial *getCopy(void) const=0;
134 
135  virtual Response *setResponse(const std::vector<std::string> &argv, Information &matInformation);
136  virtual int getResponse(int responseID, Information &matInformation);
137 
138 // AddingSensitivity:BEGIN //////////////////////////////////////////
139  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
140  virtual int updateParameter(int parameterID, Information &info);
141  virtual int activateParameter(int parameterID);
142  virtual double getStressSensitivity(int gradNumber, bool conditional);
143  virtual double getStrainSensitivity(int gradNumber);
144  virtual double getInitialTangentSensitivity(int gradNumber);
145  virtual double getDampTangentSensitivity(int gradNumber);
146  virtual double getRhoSensitivity(int gradNumber);
147  virtual int commitSensitivity(double strainGradient, int gradNumber, int numGrads);
148 // AddingSensitivity:END ///////////////////////////////////////////
149  };
151 
152 } // end of XC namespace
153 
154 
155 #endif
156 
Base class for force deformation section models.
Definition: SectionForceDeformation.h:86
virtual double getInitialStrain(void) const
Return the initial strain.
Definition: UniaxialMaterial.cpp:96
Float vector abstraction.
Definition: Vector.h:93
Information about an element.
Definition: Information.h:80
Definition: Response.h:71
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:160
virtual int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: UniaxialMaterial.cpp:256
virtual double getTangent(void) const =0
Return the current value of the tangent for the trial strain.
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:92
Base class for materials.
Definition: Material.h:91
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:43
virtual double getStress(void) const =0
Return the current value of stress.
virtual double getSecant(void) const
Return secant secant stiffness of the material.
Definition: UniaxialMaterial.cpp:132
const Vector & getGeneralizedStrain(void) const
Return the generalized strain.
Definition: UniaxialMaterial.cpp:113
UniaxialMaterial * receiveUniaxialMaterialPtr(UniaxialMaterial *, DbTagData &, const CommParameters &, const BrokedPtrCommMetaData &)
Recibe a pointer a material through the channel being passed as parameter.
Definition: UniaxialMaterial.cpp:305
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: UniaxialMaterial.cpp:250
virtual UniaxialMaterial * getCopy(void) const =0
Virtual constructor.
virtual int getResponse(int responseID, Information &matInformation)
Returns material response.
Definition: UniaxialMaterial.cpp:223
virtual int setInitialStrain(double strain)
Sets the initial strain value.
Definition: UniaxialMaterial.cpp:188
UniaxialMaterial(int tag, int classTag)
Constructor.
Definition: UniaxialMaterial.cpp:76
virtual double getFlexibility(void) const
Return the inverse of stiffness matrix.
Definition: UniaxialMaterial.cpp:144
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:180
virtual void setInitialGeneralizedStrain(const Vector &)
Sets the initial generalized strain to the value being passed as parameter.
Definition: UniaxialMaterial.cpp:197
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: UniaxialMaterial.cpp:253
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: UniaxialMaterial.cpp:297
virtual double getRho(void) const
Return the material density.
Definition: UniaxialMaterial.cpp:176
Data to transmit for a pointer «broked».
Definition: BrokedPtrCommMetaData.h:39
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
virtual int setTrialStrain(double strain, double strainRate=0.0)=0
Sets the value of the trial strain.
Communication parameters between processes.
Definition: CommParameters.h:65
virtual double getDampTangent(void) const
default operation for damping tangent is zero
Definition: UniaxialMaterial.cpp:128
Definition: Parameter.h:65
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: UniaxialMaterial.cpp:289