XC Open source finite element analysis program
DamageModel.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 
48 // $Revision: 1.1 $
49 // $Date: 2004/09/01 03:54:28 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/damage/DamageModel.h,v $
51 
52 #ifndef DamageModel_h
53 #define DamageModel_h
54 
55 // Written: Arash Altoontash, Gregory Deierlein
56 // Created: 08/02
57 // Revision: AA
58 //
59 // Description: This file contains the class definition for
60 // damage model Damage modelis a base class and
61 // thus no objects of it's type can be instantiated. It has pure virtual
62 // functions which must be implemented in it's derived classes.
63 
64 #include <utility/actor/actor/MovableObject.h>
65 #include <utility/tagged/TaggedObject.h>
66 #include <utility/matrix/Vector.h>
67 
68 
69 #include <utility/handler/ErrorHandler.h>
70 namespace XC {
71 class Response;
72 class DamageResponse;
73  class Element;
74 
75 
76 enum DamageType
77  {
78  NotSpecified,
79  Force,
80  Deformation,
81  PlasticDefo,
82  TotalEnergy,
83  PlasticEnergy
84  };
85 
86 
87 class DamageModel : public TaggedObject, public MovableObject
88  {
89  public:
90  DamageModel(int tag, int classTag);
91 
92  virtual int setTrial(const Vector &trialVector) = 0;
93  virtual double getDamage (void) = 0;
94  virtual double getPosDamage (void) = 0;
95  virtual double getNegDamage (void) = 0;
96 
97  virtual int commitState (void) = 0;
98  virtual int revertToLastCommit (void) = 0;
99  virtual int revertToStart (void) = 0;
100 
101  virtual DamageModel *getCopy(void) const= 0;
102 
103  virtual int setVariable(const std::string &argv) { return -1; }
104  virtual int getVariable(int variableID, double &info) { return -1; }
105 
106  virtual int setParameter(const std::vector<std::string> &argv, Information &theInformation);
107  virtual int updateParameter(int responseID, Information &theInformation);
108  virtual Response *setResponse(const std::vector<std::string> &argv, Information &theInformation) = 0;
109  virtual int getResponse(int responseID, Information &info) = 0;
110 
111 
112  virtual int sendSelf(CommParameters &) = 0;
113  virtual int recvSelf(const CommParameters &) = 0;
114  virtual void Print(std::ostream &s, int flag =0) =0;
115  };
116 
117 } // end of XC namespace
118 
119 #endif
Definition: Vector.h:82
Definition: DamageModel.h:87
Information about an element.
Definition: Information.h:80
virtual DamageModel * getCopy(void) const =0
Virtual constructor.
Object that can move between processes.
Definition: MovableObject.h:91
virtual void Print(std::ostream &s, int flag=0)=0
Imprime el objeto.
Object idenfied by an integer (tag).
Definition: TaggedObject.h:82
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71