xc
ElasticIsotropicMaterial.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.10 $
49 // $Date: 2003/02/14 23:01:25 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/elastic_isotropic/ElasticIsotropicMaterial.h,v $
51 
52 
53 #ifndef ElasticIsotropicMaterial_h
54 #define ElasticIsotropicMaterial_h
55 
56 // File: ~/material/ElasticIsotropicMaterial.h
57 //
58 // Written: MHS
59 // Created: Feb 2000
60 // Revision: A
61 //
62 // Description: This file contains the class definition for ElasticIsotropicMaterialModel.
63 // ElasticIsotropicMaterialModel is an abstract base class and thus no objects of it's type
64 // can be instantiated. It has pure virtual functions which must be
65 // implemented in it's derived classes.
66 //
67 // What: "@(#) ElasticIsotropicMaterial.h, revA"
68 
69 #include <material/nD/NDMaterial.h>
70 #include <utility/matrix/Vector.h>
71 
72 namespace XC {
76 //
78 //
89  {
90  protected:
91  double E;
92  double v;
93  double rho ;
96  int sendData(Communicator &);
97  int recvData(const Communicator &);
98 
99  public:
100  // Only called by subclasses to pass their tags to NDMaterialModel
101  ElasticIsotropicMaterial(int tag, int classTag, int eps_size, double E, double nu, double rho = 0.0);
102 
103  // Called by clients
104  ElasticIsotropicMaterial(int tag, int eps_size, double E, double nu, double rho = 0.0);
105  ElasticIsotropicMaterial(int tag, int eps_size);
106 
107  // For parallel processing
109 
111  inline virtual double getRho(void) const
112  { return rho; }
114  inline virtual void setRho(const double &r)
115  { rho= r; }
116 // BJ added 19June2002
117  double getE(void) const;
119  inline void setE(const double &e)
120  { E= e; }
121  double getnu(void) const;
123  inline void setnu(const double &nu)
124  { v= nu; }
125 
126 
127  int setInitialStrain(const Vector &v);
128  int incrementInitialStrain(const Vector &);
129  void zeroInitialStrain(void);
130  virtual const Vector &getInitialStrain(void) const;
131  virtual int setTrialStrain(const Vector &v);
132  virtual int setTrialStrain(const Vector &v, const Vector &r);
133  virtual int setTrialStrainIncr(const Vector &v);
134  virtual int setTrialStrainIncr(const Vector &v, const Vector &r);
135  virtual const Matrix &getTangent(void) const;
136  virtual const Matrix &getInitialTangent(void) const;
137  virtual const Vector &getStress(void) const;
138  virtual const Vector &getStrain(void) const;
139 
140  const Vector &getInitialGeneralizedStrain(void) const;
141  void setInitialGeneralizedStrain(const Vector &);
142  void zeroInitialGeneralizedStrain(void);
143  virtual int commitState(void);
144  virtual int revertToLastCommit(void);
145  virtual int revertToStart(void);
146 
147  virtual NDMaterial *getCopy(void) const;
148  virtual NDMaterial *getCopy(const std::string &) const;
149 
150  // Return a string indicating the type of material model
151  virtual const std::string &getType(void) const;
152 
153  virtual int getOrder(void) const;
154 
155  virtual int sendSelf(Communicator &);
156  virtual int recvSelf(const Communicator &);
157 
158  void Print(std::ostream &s, int flag = 0) const;
159 
160  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
161  virtual int updateParameter(int parameterID, Information &info);
162  };
163 } // end of XC namespace
164 
165 
166 #endif
double v
Poisson ratio.
Definition: ElasticIsotropicMaterial.h:92
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: ElasticIsotropicMaterial.cpp:424
virtual double getRho(void) const
Return material density.
Definition: ElasticIsotropicMaterial.h:111
Float vector abstraction.
Definition: Vector.h:94
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: ElasticIsotropicMaterial.cpp:370
Vector epsilon
trial strain vector.
Definition: ElasticIsotropicMaterial.h:94
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
double getnu(void) const
Return the material Poisson&#39;s ratio.
Definition: ElasticIsotropicMaterial.cpp:114
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: ElasticIsotropicMaterial.cpp:436
void zeroInitialGeneralizedStrain(void)
zeroes initial generalized strain
Definition: ElasticIsotropicMaterial.cpp:300
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: ElasticIsotropicMaterial.cpp:433
double getE(void) const
Return the elastic modulus.
Definition: ElasticIsotropicMaterial.cpp:109
virtual const Vector & getStress(void) const
Returns the material stress.
Definition: ElasticIsotropicMaterial.cpp:280
void setnu(const double &nu)
Set material Poisson&#39;s ratio.
Definition: ElasticIsotropicMaterial.h:123
int setInitialStrain(const Vector &v)
Sets the initial strain value.
Definition: ElasticIsotropicMaterial.cpp:199
virtual NDMaterial * getCopy(void) const
Virtual constructor.
Definition: ElasticIsotropicMaterial.cpp:344
Base class for elastic isotropic materials with elastic modulus E and Poisson ratio v...
Definition: ElasticIsotropicMaterial.h:88
double E
Elastic modulus.
Definition: ElasticIsotropicMaterial.h:91
virtual int commitState(void)
To accept the current value of the trial strain vector as being on the solution path.
Definition: ElasticIsotropicMaterial.cpp:313
virtual const Matrix & getInitialTangent(void) const
Returns material initial tangent stiffness matrix.
Definition: ElasticIsotropicMaterial.cpp:268
virtual int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ElasticIsotropicMaterial.cpp:403
virtual const Vector & getInitialStrain(void) const
Returns the value of the initial strain.
Definition: ElasticIsotropicMaterial.cpp:218
virtual int revertToLastCommit(void)
To cause the material to revert to its last committed state.
Definition: ElasticIsotropicMaterial.cpp:323
int incrementInitialStrain(const Vector &)
Increments initial strain.
Definition: ElasticIsotropicMaterial.cpp:207
void setE(const double &e)
Set material elastic modulus.
Definition: ElasticIsotropicMaterial.h:119
virtual int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ElasticIsotropicMaterial.cpp:388
virtual int revertToStart(void)
Invoked to cause the material to revert to its original state in its undeformed configuration.
Definition: ElasticIsotropicMaterial.cpp:335
double rho
mass per unit 3D volume.
Definition: ElasticIsotropicMaterial.h:93
virtual int setTrialStrainIncr(const Vector &v)
Increment the value of the trial strain.
Definition: ElasticIsotropicMaterial.cpp:240
void zeroInitialStrain(void)
Zeroes the initial strain.
Definition: ElasticIsotropicMaterial.cpp:214
virtual const Matrix & getTangent(void) const
Returns material tangent stiffness matrix.
Definition: ElasticIsotropicMaterial.cpp:256
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: ElasticIsotropicMaterial.cpp:379
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
Vector epsilon0
initial strain vector.
Definition: ElasticIsotropicMaterial.h:95
virtual int setTrialStrain(const Vector &v)
Set the value of the trial strain.
Definition: ElasticIsotropicMaterial.cpp:223
virtual const Vector & getStrain(void) const
Return the material strain.
Definition: ElasticIsotropicMaterial.cpp:292
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
void setInitialGeneralizedStrain(const Vector &)
Sets the initial strain value.
Definition: ElasticIsotropicMaterial.cpp:307
virtual void setRho(const double &r)
Set material density.
Definition: ElasticIsotropicMaterial.h:114
Parameter.
Definition: Parameter.h:68
const Vector & getInitialGeneralizedStrain(void) const
Return the initial strain.
Definition: ElasticIsotropicMaterial.cpp:304