xc
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 namespace XC {
70 class Response;
71 class DamageResponse;
72  class Element;
73 
74 
75 enum DamageType
76  {
77  NotSpecified,
78  Force,
79  Deformation,
80  PlasticDefo,
81  TotalEnergy,
82  PlasticEnergy
83  };
84 
85 
86 class DamageModel : public TaggedObject, public MovableObject
87  {
88  public:
89  DamageModel(int tag, int classTag);
90 
91  virtual int setTrial(const Vector &trialVector) = 0;
92  virtual double getDamage (void) = 0;
93  virtual double getPosDamage (void) = 0;
94  virtual double getNegDamage (void) = 0;
95 
96  virtual int commitState (void) = 0;
97  virtual int revertToLastCommit (void) = 0;
98  virtual int revertToStart (void) = 0;
99 
100  virtual DamageModel *getCopy(void) const= 0;
101 
102  virtual int setVariable(const std::string &argv) { return -1; }
103  virtual int getVariable(int variableID, double &info) { return -1; }
104 
105  virtual int setParameter(const std::vector<std::string> &argv, Information &theInformation);
106  virtual int updateParameter(int responseID, Information &theInformation);
107  virtual Response *setResponse(const std::vector<std::string> &argv, Information &theInformation) = 0;
108  virtual int getResponse(int responseID, Information &info) = 0;
109 
110 
111  virtual int sendSelf(CommParameters &) = 0;
112  virtual int recvSelf(const CommParameters &) = 0;
113  virtual void Print(std::ostream &s, int flag =0) =0;
114  };
115 
116 } // end of XC namespace
117 
118 #endif
Float vector abstraction.
Definition: Vector.h:93
Information about an element.
Definition: Information.h:80
Definition: Response.h:71
Object that can move between processes.
Definition: MovableObject.h:99
virtual int updateParameter(int responseID, Information &theInformation)
Updates the parameter identified by parameterID with info.
Definition: DamageModel.cpp:68
virtual void Print(std::ostream &s, int flag=0)=0
Print stuff.
virtual int sendSelf(CommParameters &)=0
Send the object.
Object idenfied by an integer (tag).
Definition: TaggedObject.h:91
virtual int recvSelf(const CommParameters &)=0
Receive the object.
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Communication parameters between processes.
Definition: CommParameters.h:65
virtual DamageModel * getCopy(void) const =0
Virtual constructor.
Definition: DamageModel.h:86