XC Open source finite element analysis program
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 
82 //
84 //
86 //
88 class UniaxialMaterial : public Material
89  {
90  private:
91  double rho;
92  protected:
93  int sendData(CommParameters &);
94  int recvData(const CommParameters &);
95  public:
96  UniaxialMaterial(int tag, int classTag);
97 
98  virtual int setInitialStrain(double strain);
99  virtual int setTrialStrain(double strain, double strainRate = 0.0)= 0;
100  virtual int setTrial(double strain, double &stress, double &tangent, double strainRate = 0.0);
101 
102  virtual double getInitialStrain(void) const;
103  virtual double getStrain(void) const= 0;
104  virtual double getStrainRate(void) const;
105  virtual double getStress(void) const= 0;
106  const Vector &getGeneralizedStress(void) const;
107  const Vector &getGeneralizedStrain(void) const;
108 
109  virtual void setInitialGeneralizedStrain(const Vector &);
110  const Vector &getInitialGeneralizedStrain(void) const;
111 
112  virtual double getTangent(void) const= 0;
113  virtual double getInitialTangent(void) const= 0;
114  virtual double getDampTangent(void) const;
115  virtual double getSecant(void) const;
116  virtual double getFlexibility(void) const;
117  virtual double getInitialFlexibility(void) const;
118  virtual double getRho(void) const;
119  void setRho(const double &);
120 
121  virtual UniaxialMaterial *getCopy(void) const=0;
123 
124  virtual Response *setResponse(const std::vector<std::string> &argv, Information &matInformation);
125  virtual int getResponse(int responseID, Information &matInformation);
126 
127 // AddingSensitivity:BEGIN //////////////////////////////////////////
128  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
129  virtual int updateParameter(int parameterID, Information &info);
130  virtual int activateParameter(int parameterID);
131  virtual double getStressSensitivity(int gradNumber, bool conditional);
132  virtual double getStrainSensitivity(int gradNumber);
133  virtual double getInitialTangentSensitivity(int gradNumber);
134  virtual double getDampTangentSensitivity(int gradNumber);
135  virtual double getRhoSensitivity(int gradNumber);
136  virtual int commitSensitivity(double strainGradient, int gradNumber, int numGrads);
137 // AddingSensitivity:END ///////////////////////////////////////////
138  };
140 
141 } // end of XC namespace
142 
143 
144 #endif
145 
virtual void setInitialGeneralizedStrain(const Vector &)
Sets the initial generalized strain to the value being passed as parameter.
Definition: UniaxialMaterial.cpp:191
Base class for materials.
Definition: Material.h:85
Definition: Vector.h:82
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
virtual int getResponse(int responseID, Information &matInformation)
Returns material response.
Definition: UniaxialMaterial.cpp:217
UniaxialMaterial(int tag, int classTag)
Constructor.
Definition: UniaxialMaterial.cpp:73
virtual double getSecant(void) const
default operation for secant stiffness
Definition: UniaxialMaterial.cpp:128
const Vector & getGeneralizedStrain(void) const
Return the generalized strain.
Definition: UniaxialMaterial.cpp:109
Information about an element.
Definition: Information.h:80
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: UniaxialMaterial.cpp:281
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: UniaxialMaterial.cpp:289
virtual double getInitialFlexibility(void) const
Return the inverse of stiffness matrix inicial.
Definition: UniaxialMaterial.cpp:155
Data to transmit for a pointer «broked».
Definition: BrokedPtrCommMetaData.h:39
virtual double getRho(void) const
Return the material density.
Definition: UniaxialMaterial.cpp:170
virtual double getStrainRate(void) const
default operation for strain rate is zero
Definition: UniaxialMaterial.cpp:96
UniaxialMaterial * receiveUniaxialMaterialPtr(UniaxialMaterial *, DbTagData &, const CommParameters &, const BrokedPtrCommMetaData &)
Recibe a pointer a material through the channel being passed as parameter.
Definition: UniaxialMaterial.cpp:297
virtual double getInitialStrain(void) const
Return the initial strain.
Definition: UniaxialMaterial.cpp:92
virtual double getDampTangent(void) const
default operation for damping tangent is zero
Definition: UniaxialMaterial.cpp:124
Definition: Parameter.h:65
virtual double getFlexibility(void) const
Return the inverse of stiffness matrix.
Definition: UniaxialMaterial.cpp:140
const Vector & getGeneralizedStress(void) const
Return the generalized stress.
Definition: UniaxialMaterial.cpp:101
Base class for force deformation section models. Constitutive equations of the section.
Definition: SectionForceDeformation.h:86
virtual int setInitialStrain(double strain)
Sets the initial strain value.
Definition: UniaxialMaterial.cpp:182
Communication parameters between processes.
Definition: CommParameters.h:65
virtual UniaxialMaterial * getCopy(void) const =0
Virtual constructor.
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71
void setRho(const double &)
Assigns la material density.
Definition: UniaxialMaterial.cpp:174
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:88