xc
FeapMaterial.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.2 $
49 // $Date: 2003/02/14 23:01:25 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/FeapMaterial.h,v $
51 
52 // Written: MHS
53 // Created: June 2001
54 //
55 // Description: This file contains the class definition for
56 // FeapMaterial. FeapMaterial wraps a Feap material subroutine.
57 
58 #ifndef FeapMaterial_h
59 #define FeapMaterial_h
60 
61 #include <material/nD/NDMaterial.h>
62 
63 namespace XC {
67 //
69 //
71 class FeapMaterial: public NDMaterial
72  {
73  public:
74  FeapMaterial(int tag, int classTag, int numHV, int numData,double rho = 0.0);
75  FeapMaterial(int classTag);
76  virtual ~FeapMaterial();
77 
78  virtual int setTrialStrain(const Vector &strain);
79  virtual const Vector &getStrain(void) const;
80  virtual const Vector &getStress(void) const;
81  virtual const Matrix &getTangent(void) const;
82 
83  inline virtual double getRho(void) const
84  { return rho; }
85  inline virtual void setRho(const double &r)
86  { rho= r; }
87 
88  virtual int commitState(void);
89  virtual int revertToLastCommit(void);
90  virtual int revertToStart(void);
91 
92  virtual NDMaterial *getCopy(void) const;
93  virtual NDMaterial *getCopy(const std::string &) const;
94  virtual const std::string &getType(void) const;
95  virtual int getOrder(void) const;
96 
97  virtual int sendSelf(Communicator &);
98  virtual int recvSelf(const Communicator &);
99 
100  virtual void Print(std::ostream &s, int flag = 0) const;
101 
102  protected:
103  // Invokes the Feap subroutine
104  virtual int invokeSubroutine(int isw);
105  virtual int fillDArray(void);
106 
107  double *ud; // Material parameters array
108  double *hstv; // History array: first half is committed, second half is trial
109 
110  static double d[]; // Feap material parameter array
111 
112  double rho; // Material mass density
113 
114  private:
115  int numHV; // Number of history variables
116  int numData; // Number of material parameters
117 
118  double eps[6]; // Strain vector
119  static double sig[6]; // Stress vector
120  static double dd[36]; // Tangent matrix
121 
122  static Vector strain3;
123  static Vector strain4;
124  static Vector strain6;
125 
126  static Vector sigma3;
127  static Vector sigma4;
128  static Vector sigma6;
129 
130  static Matrix tangent3;
131  static Matrix tangent4;
132  static Matrix tangent6;
133 
134  enum Formulation{Unknown, ThreeDimensional, PlaneStrain, AxiSymmetric};
135  int myFormulation;
136  void setType(Formulation form);
137 };
138 } // end of XC namespace
139 
140 #endif
virtual const Vector & getStress(void) const
Returns the material stress vector at the current trial strain.
Definition: FeapMaterial.cpp:208
Float vector abstraction.
Definition: Vector.h:94
virtual int sendSelf(Communicator &)
Send the object.
Definition: FeapMaterial.cpp:354
Communication parameters between processes.
Definition: Communicator.h:66
virtual void setRho(const double &r)
Set material density.
Definition: FeapMaterial.h:85
virtual void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: FeapMaterial.cpp:424
virtual int commitState(void)
Commit the state of the material.
Definition: FeapMaterial.cpp:273
virtual double getRho(void) const
Get material density.
Definition: FeapMaterial.h:83
virtual const Matrix & getTangent(void) const
Return the material tangent stiffness.
Definition: FeapMaterial.cpp:237
virtual int recvSelf(const Communicator &)
Receive the object.
Definition: FeapMaterial.cpp:386
virtual int setTrialStrain(const Vector &strain)
Sets the value of the trial strain vector, that value used by {getStress()} and getTangent(), to be strain.
Definition: FeapMaterial.cpp:143
virtual NDMaterial * getCopy(void) const
Virtual constructor.
Definition: FeapMaterial.cpp:302
virtual int revertToStart(void)
Revert the material to its initial state.
Definition: FeapMaterial.cpp:293
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
Base class for 2D and 3D FEAP materials.
Definition: FeapMaterial.h:71
virtual const Vector & getStrain(void) const
Returns strain.
Definition: FeapMaterial.cpp:176
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111