XC Open source finite element analysis program
NDMaterial.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 ** Additions and changes by: **
47 ** Boris Jeremic (@ucdavis.edu) **
48 ** **
49 ** **
50 ** ****************************************************************** */
51 
52 // $Revision: 1.16 $
53 // $Date: 2004/07/20 22:39:02 $
54 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/NDMaterial.h,v $
55 
56 
57 #ifndef NDMaterial_h
58 #define NDMaterial_h
59 
60 // File: ~/material/NDMaterial.h
61 //
62 // Written: MHS
63 // Created: Feb 2000
64 // Revision: A
65 //
66 // Description: This file contains the class definition for NDMaterial.
67 // NDMaterial is an abstract base class and thus no objects of it's type
68 // can be instantiated. It has pure virtual functions which must be
69 // implemented in it's derived classes.
70 //
71 // What: "@(#) NDMaterial.h, revA"
72 
73 #include <material/Material.h>
74 #include <utility/matrix/nDarray/stresst.h>
75 
76 namespace XC {
77 class Matrix;
78 class ID;
79 class Vector;
80 class Tensor;
81 class Information;
82 class Response;
83 
85 //
87 //
89 //
91 class NDMaterial: public Material
92  {
93  private:
94  static Matrix errMatrix;
95  static Vector errVector;
96  static Tensor errTensor;
97  static stresstensor errstresstensor;
98  static straintensor errstraintensor;
99  protected:
100  int sendData(CommParameters &);
101  int recvData(const CommParameters &);
102  public:
103  NDMaterial();
104  NDMaterial(int tag, int classTag);
105 
106  // methods to set state and retrieve state using Matrix and Vector classes
107  virtual double getRho(void) const;
108 // BJ added 19June2002
109  virtual double getE(void);
110  virtual double getnu(void);
111  virtual double getpsi(void);
112 
113 
114  virtual int setTrialStrain(const Vector &v);
115  virtual int setTrialStrain(const Vector &v, const Vector &r);
116  virtual int setTrialStrainIncr(const Vector &v);
117  virtual int setTrialStrainIncr(const Vector &v, const Vector &r);
118  virtual const Matrix &getTangent(void) const;
119  inline virtual const Matrix &getInitialTangent(void) const
120  {return this->getTangent();};
121 
122  virtual const Vector &getStress(void) const;
123  virtual const Vector &getStrain(void) const;
124  inline const Vector &getGeneralizedStress(void) const
125  { return getStress(); }
126  inline const Vector &getGeneralizedStrain(void) const
127  { return getStrain(); }
128 
129  virtual void setInitialGeneralizedStrain(const Vector &);
130  const Vector &getInitialGeneralizedStrain(void) const;
131 
132  virtual const Vector &getCommittedStress(void);
133  virtual const Vector &getCommittedStrain(void);
134 
135  // methods to set and retrieve state using the Tensor class
136  virtual int setTrialStrain(const Tensor &v);
137  virtual int setTrialStrain(const Tensor &v, const Tensor &r);
138  virtual int setTrialStrainIncr(const Tensor &v);
139  virtual int setTrialStrainIncr(const Tensor &v, const Tensor &r);
140  virtual const Tensor &getTangentTensor(void) const;
141  virtual const stresstensor &getStressTensor(void) const;
142  virtual const straintensor &getStrainTensor(void) const;
143  virtual const straintensor &getPlasticStrainTensor(void) const; //Added Joey Aug. 13, 2001
144 
145 //Zhao (zcheng@ucdavis.edu)
146 // added Sept 22 2003 for Large Deformation, F is the Deformation Gradient
147  virtual int setTrialF(const straintensor &f);
148  virtual int setTrialFIncr(const straintensor &df);
149  virtual int setTrialC(const straintensor &c);
150  virtual int setTrialCIncr(const straintensor &dc);
151  virtual const stresstensor getPK1StressTensor(void);
152  virtual const stresstensor getCauchyStressTensor(void);
153  virtual const straintensor &getF(void) const;
154  virtual const straintensor &getC(void) const;
155  virtual const straintensor getFp(void);
156 // Only For Large Deformation, END////////////////////////////////////////
157 
158  virtual NDMaterial *getCopy(void) const= 0;
159  virtual NDMaterial *getCopy(const std::string &) const= 0;
160 
161  virtual const std::string &getType(void) const = 0;
162  virtual int getOrder(void) const = 0;
163 
164  virtual Response *setResponse(const std::vector<std::string> &argv, Information &matInformation);
165  virtual int getResponse (int responseID, Information &matInformation);
166 
167 // AddingSensitivity:BEGIN //////////////////////////////////////////
168  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
169  virtual int updateParameter (int parameterID, Information &info);
170  virtual int activateParameter (int parameterID);
171  virtual const Vector & getStressSensitivity (int gradNumber, bool conditional);
172  virtual const Vector & getStrainSensitivity (int gradNumber);
173  virtual const Matrix & getTangentSensitivity (int gradNumber);
174  virtual const Matrix & getDampTangentSensitivity(int gradNumber);
175  virtual double getRhoSensitivity (int gradNumber);
176  virtual int commitSensitivity (Vector & strainGradient, int gradNumber, int numGrads);
177 // AddingSensitivity:END ///////////////////////////////////////////
178 
179  };
180 
182 
183 } // end of XC namespace
184 
185 
186 #endif
NDMaterial * receiveNDMaterialPtr(NDMaterial *, DbTagData &, const CommParameters &, const BrokedPtrCommMetaData &)
Recibe a pointer a material through the channel being passed as parameter.
Definition: NDMaterial.cpp:374
virtual NDMaterial * getCopy(void) const =0
Virtual constructor.
Base class for materials.
Definition: Material.h:85
Base class for 2D and 3D materials.
Definition: NDMaterial.h:91
Definition: Vector.h:82
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
NDMaterial()
Constructor.
Definition: NDMaterial.cpp:84
virtual const Vector & getCommittedStress(void)
Returns commited stresses.
Definition: NDMaterial.cpp:104
Information about an element.
Definition: Information.h:80
virtual const Matrix & getTangent(void) const
Return the tangent stiffness matrix.
Definition: NDMaterial.cpp:148
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: NDMaterial.cpp:319
Data to transmit for a pointer «broked».
Definition: BrokedPtrCommMetaData.h:39
virtual const Vector & getStrain(void) const
Returns strain.
Definition: NDMaterial.cpp:162
Definition: stresst.h:68
virtual int setTrialStrain(const Vector &v)
Asigna el trial strain value.
Definition: NDMaterial.cpp:113
Strain tensor.
Definition: straint.h:67
Definition: Matrix.h:82
const Vector & getInitialGeneralizedStrain(void) const
Return the initial strain.
Definition: NDMaterial.cpp:169
virtual const Vector & getCommittedStrain(void)
Returns commited strains.
Definition: NDMaterial.cpp:108
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: NDMaterial.cpp:326
virtual int setTrialStrainIncr(const Vector &v)
Asigna el valor del incremento de la trial strain.
Definition: NDMaterial.cpp:128
Definition: Parameter.h:65
virtual const Vector & getStress(void) const
Returns stress.
Definition: NDMaterial.cpp:155
virtual void setInitialGeneralizedStrain(const Vector &)
Asigna el initial strain value.
Definition: NDMaterial.cpp:142
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
virtual int getResponse(int responseID, Information &matInformation)
Returns material response.
Definition: NDMaterial.cpp:303
Definition: Response.h:71