xc
ElasticIsotropicMaterial.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.10 $
48 // $Date: 2003/02/14 23:01:25 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/ElasticIsotropicMaterial.h,v $
50 
51 
52 #ifndef ElasticIsotropicMaterial_h
53 #define ElasticIsotropicMaterial_h
54 
55 // File: ~/material/ElasticIsotropicMaterial.h
56 //
57 // Written: MHS
58 // Created: Feb 2000
59 // Revision: A
60 //
61 // Description: This file contains the class definition for ElasticIsotropicMaterialModel.
62 // ElasticIsotropicMaterialModel is an abstract base class and thus no objects of it's type
63 // can be instantiated. It has pure virtual functions which must be
64 // implemented in it's derived classes.
65 //
66 // What: "@(#) ElasticIsotropicMaterial.h, revA"
67 
68 #include <material/nD/NDMaterial.h>
69 #include <utility/matrix/Vector.h>
70 
71 namespace XC {
75 //
77 //
87  {
88  protected:
89  double E;
90  double v;
91  double rho ;
93 
94  int sendData(CommParameters &);
95  int recvData(const CommParameters &);
96 
97  public:
98  // Only called by subclasses to pass their tags to NDMaterialModel
99  ElasticIsotropicMaterial(int tag, int classTag, int eps_size, double E, double nu, double rho = 0.0);
100 
101  // Called by clients
102  ElasticIsotropicMaterial(int tag, int eps_size, double E, double nu, double rho = 0.0);
103  ElasticIsotropicMaterial(int tag, int eps_size);
104 
105  // For parallel processing
107 
108  virtual double getRho(void) const;
109  inline void setRho(const double &r)
110  { rho= r; }
111 // BJ added 19June2002
112  double getE(void);
113  inline void setE(const double &e)
114  { E= e; }
115  double getnu(void);
116  inline void setnu(const double &nu)
117  { v= nu; }
118 
119  virtual int setTrialStrain(const Vector &v);
120  virtual int setTrialStrain(const Vector &v, const Vector &r);
121  virtual int setTrialStrainIncr(const Vector &v);
122  virtual int setTrialStrainIncr(const Vector &v, const Vector &r);
123  virtual const Matrix &getTangent(void) const;
124  virtual const Matrix &getInitialTangent(void) const;
125  virtual const Vector &getStress(void) const;
126  virtual const Vector &getStrain(void) const;
127 
128  int setTrialStrain(const Tensor &v);
129  int setTrialStrain(const Tensor &v, const Tensor &r);
130  int setTrialStrainIncr(const Tensor &v);
131  int setTrialStrainIncr(const Tensor &v, const Tensor &r);
132  const Tensor &getTangentTensor(void) const;
133  const stresstensor &getStressTensor(void) const;
134  const straintensor &getStrainTensor(void) const;
135  const straintensor &getPlasticStrainTensor(void) const;
136 
137 
138  virtual int commitState(void);
139  virtual int revertToLastCommit(void);
140  virtual int revertToStart(void);
141 
142  // Create a copy of material parameters AND state variables
143  // Called by GenericSectionXD
144  virtual NDMaterial *getCopy(void) const;
145 
146  // Create a copy of just the material parameters
147  // Called by the continuum elements
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(CommParameters &);
156  virtual int recvSelf(const CommParameters &);
157 
158  void Print(std::ostream &s, int flag = 0);
159 
160  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
161  virtual int updateParameter(int parameterID, Information &info);
162 
163 
164  };
165 } // end of XC namespace
166 
167 
168 #endif
double v
Poisson ratio.
Definition: ElasticIsotropicMaterial.h:90
Float vector abstraction.
Definition: Vector.h:93
Vector epsilon
Strain vector.
Definition: ElasticIsotropicMaterial.h:92
Definition: stresst.h:68
Information about an element.
Definition: Information.h:80
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: ElasticIsotropicMaterial.cpp:462
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: ElasticIsotropicMaterial.cpp:459
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ElasticIsotropicMaterial.cpp:414
void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: ElasticIsotropicMaterial.cpp:450
virtual const Vector & getStress(void) const
Returns the material stress vector at the current trial strain.
Definition: ElasticIsotropicMaterial.cpp:245
virtual NDMaterial * getCopy(void) const
Virtual constructor.
Definition: ElasticIsotropicMaterial.cpp:370
Base class for elastic isotropic materials.
Definition: ElasticIsotropicMaterial.h:86
double E
Elastic modulus.
Definition: ElasticIsotropicMaterial.h:89
virtual int commitState(void)
To accept the current value of the trial strain vector as being on the solution path.
Definition: ElasticIsotropicMaterial.cpp:340
virtual int revertToLastCommit(void)
To cause the material to revert to its last committed state.
Definition: ElasticIsotropicMaterial.cpp:350
virtual int revertToStart(void)
Invoked to cause the material to revert to its original state in its undeformed configuration.
Definition: ElasticIsotropicMaterial.cpp:362
double rho
mass per unit 3D volume
Definition: ElasticIsotropicMaterial.h:91
virtual int setTrialStrainIncr(const Vector &v)
Set trial strain increment.
Definition: ElasticIsotropicMaterial.cpp:206
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: ElasticIsotropicMaterial.cpp:396
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ElasticIsotropicMaterial.cpp:429
virtual const Matrix & getTangent(void) const
Returns material tangent stiffness matrix.
Definition: ElasticIsotropicMaterial.cpp:223
Base class for 2D and 3D materials.
Definition: NDMaterial.h:97
virtual int setTrialStrain(const Vector &v)
Sets the value of the trial strain vector, that value used by {getStress()} and getTangent(), to be strain.
Definition: ElasticIsotropicMaterial.cpp:194
virtual const Vector & getStrain(void) const
Returns strain.
Definition: ElasticIsotropicMaterial.cpp:256
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
Definition: Parameter.h:65
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: ElasticIsotropicMaterial.cpp:405
Strain tensor.
Definition: straint.h:67