XC Open source finite element analysis program
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 {
73 //
75 //
77 //
80  {
81  protected:
82  double E;
83  double v;
84  double rho ;
86 
87  int sendData(CommParameters &);
88  int recvData(const CommParameters &);
89 
90  public:
91  // Only called by subclasses to pass their tags to NDMaterialModel
92  ElasticIsotropicMaterial(int tag, int classTag, int eps_size, double E, double nu, double rho = 0.0);
93 
94  // Called by clients
95  ElasticIsotropicMaterial(int tag, int eps_size, double E, double nu, double rho = 0.0);
96  ElasticIsotropicMaterial(int tag, int eps_size);
97 
98  // For parallel processing
100 
101  virtual double getRho(void) const;
102  inline void setRho(const double &r)
103  { rho= r; }
104 // BJ added 19June2002
105  double getE(void);
106  inline void setE(const double &e)
107  { E= e; }
108  double getnu(void);
109  inline void setnu(const double &nu)
110  { v= nu; }
111 
112  virtual int setTrialStrain(const Vector &v);
113  virtual int setTrialStrain(const Vector &v, const Vector &r);
114  virtual int setTrialStrainIncr(const Vector &v);
115  virtual int setTrialStrainIncr(const Vector &v, const Vector &r);
116  virtual const Matrix &getTangent(void) const;
117  virtual const Matrix &getInitialTangent(void) const;
118  virtual const Vector &getStress(void) const;
119  virtual const Vector &getStrain(void) const;
120 
121  int setTrialStrain(const Tensor &v);
122  int setTrialStrain(const Tensor &v, const Tensor &r);
123  int setTrialStrainIncr(const Tensor &v);
124  int setTrialStrainIncr(const Tensor &v, const Tensor &r);
125  const Tensor &getTangentTensor(void) const;
126  const stresstensor &getStressTensor(void) const;
127  const straintensor &getStrainTensor(void) const;
128  const straintensor &getPlasticStrainTensor(void) const;
129 
130 
131  virtual int commitState(void);
132  virtual int revertToLastCommit(void);
133  virtual int revertToStart(void);
134 
135  // Create a copy of material parameters AND state variables
136  // Called by GenericSectionXD
137  virtual NDMaterial *getCopy(void) const;
138 
139  // Create a copy of just the material parameters
140  // Called by the continuum elements
141  virtual NDMaterial *getCopy(const std::string &) const;
142 
143  // Return a string indicating the type of material model
144  virtual const std::string &getType(void) const;
145 
146  virtual int getOrder(void) const;
147 
148  virtual int sendSelf(CommParameters &);
149  virtual int recvSelf(const CommParameters &);
150 
151  void Print(std::ostream &s, int flag = 0);
152 
153  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
154  virtual int updateParameter(int parameterID, Information &info);
155 
156 
157  };
158 } // end of XC namespace
159 
160 
161 #endif
double E
Elastic modulus.
Definition: ElasticIsotropicMaterial.h:82
virtual int setTrialStrain(const Vector &v)
Asigna el trial strain value.
Definition: ElasticIsotropicMaterial.cpp:178
Base class for 2D and 3D materials.
Definition: NDMaterial.h:91
Definition: Vector.h:82
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: ElasticIsotropicMaterial.cpp:361
Information about an element.
Definition: Information.h:80
Definition: stresst.h:68
virtual const Vector & getStrain(void) const
Returns strain.
Definition: ElasticIsotropicMaterial.cpp:234
Strain tensor.
Definition: straint.h:67
double v
Poisson ratio.
Definition: ElasticIsotropicMaterial.h:83
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ElasticIsotropicMaterial.cpp:384
virtual NDMaterial * getCopy(void) const
Virtual constructor.
Definition: ElasticIsotropicMaterial.cpp:329
Definition: Matrix.h:82
Vector epsilon
Strain vector.
Definition: ElasticIsotropicMaterial.h:85
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: ElasticIsotropicMaterial.cpp:402
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: ElasticIsotropicMaterial.cpp:352
Definition: Parameter.h:65
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ElasticIsotropicMaterial.cpp:370
Communication parameters between processes.
Definition: CommParameters.h:65
virtual const Vector & getStress(void) const
Returns stress.
Definition: ElasticIsotropicMaterial.cpp:224
================================================================================
Definition: ContinuaReprComponent.h:34
virtual const Matrix & getTangent(void) const
Return the tangent stiffness matrix.
Definition: ElasticIsotropicMaterial.cpp:204
Base class for elastic isotropic materials.
Definition: ElasticIsotropicMaterial.h:79
virtual int setTrialStrainIncr(const Vector &v)
Asigna el valor del incremento de la trial strain.
Definition: ElasticIsotropicMaterial.cpp:190
double rho
mass per unit 3D volume
Definition: ElasticIsotropicMaterial.h:84