XC Open source finite element analysis program
DamageModelVector.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 // under the terms of the GNU General Public License 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 //DamageModelVector.h
28 
29 #ifndef DamageModelVector_h
30 #define DamageModelVector_h
31 
32 #include "material/MaterialVector.h"
33 #include "material/uniaxial/UniaxialMaterial.h"
34 #include "xc_utils/src/nucleo/EntCmd.h"
35 #include "utility/actor/actor/MovableID.h"
36 #include "utility/matrix/Vector.h"
37 
38 
39 namespace XC {
40 
41 class DamageModel;
42 
44 //
47 class DamageModelVector: public std::vector<DamageModel *>, public EntCmd, public MovableObject
48  {
49  protected:
50  void borra_dmg_models(void);
51  void clearAll(void);
52  void alloc(const std::vector<DamageModel *> &);
53 
54  DbTagData &getDbTagData(void) const;
55  int sendData(CommParameters &);
56  int recvData(const CommParameters &);
57  public:
59  typedef typename std::vector<DamageModel *> dmg_model_vector;
60  typedef typename dmg_model_vector::iterator iterator;
61  typedef typename dmg_model_vector::reference reference;
62  typedef typename dmg_model_vector::const_reference const_reference;
63 
64  DamageModelVector(const size_t &nDamageModels,const DamageModel *dmgModel= nullptr);
67  ~DamageModelVector(void)
68  { clearAll(); }
69 
70  void setDamageModel(const DamageModel *);
71  void setDamageModel(size_t i,DamageModel *);
72  bool empty(void) const;
73  int commitState(const material_vector &);
74  int revertToLastCommit(void);
75  int revertToStart(void);
76 
77  int sendSelf(CommParameters &);
78  int recvSelf(const CommParameters &);
79  };
80 
81 
82 
83 } // end of XC namespace
84 
85 #endif
int revertToLastCommit(void)
Returns the estado de los dmg_models al del último commit.
Definition: DamageModelVector.cc:157
int revertToStart(void)
Returns the estado de los dmg_models al inicial.
Definition: DamageModelVector.cc:173
void alloc(const std::vector< DamageModel * > &)
Copia los dmg_models.
Definition: DamageModelVector.cc:48
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
Definition: DamageModel.h:87
int recvData(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: DamageModelVector.cc:205
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: DamageModelVector.cc:227
DamageModelVector & operator=(const DamageModelVector &)
Assignment operator.
Definition: DamageModelVector.cc:70
Vector de pointers to damage models. se emplea en Joint2D.
Definition: DamageModelVector.h:47
Object that can move between processes.
Definition: MovableObject.h:91
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: DamageModelVector.cc:197
int commitState(const material_vector &)
Consuma el estado de los dmg_models.
Definition: DamageModelVector.cc:126
DamageModelVector(const size_t &nDamageModels, const DamageModel *dmgModel=nullptr)
Default constructor.
Definition: DamageModelVector.cc:33
bool empty(void) const
Returns true ifno se ha asignado damage model.
Definition: DamageModelVector.cc:110
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: DamageModelVector.cc:189
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: DamageModelVector.cc:214