XC Open source finite element analysis program
NodeVectors.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 //NodeVectors
28 
29 
30 #ifndef NodeVectors_h
31 #define NodeVectors_h
32 
33 #include "utility/actor/actor/MovableObject.h"
34 #include "xc_utils/src/nucleo/EntCmd.h"
35 #include "utility/matrix/Vector.h"
36 
37 namespace XC {
38 
39 class Vector;
40 class Channel;
41 class FEM_ObjectBroker;
42 
44 //
47 class NodeVectors: public EntCmd, public MovableObject
48  {
49  protected:
50  size_t numVectors;
53 
55 
56  DbTagData &getDbTagData(void) const;
57  int sendData(CommParameters &);
58  int recvData(const CommParameters &);
59  int createData(const size_t &);
60  void libera(void);
61  void copia(const NodeVectors &);
62  public:
63  // constructors
64  NodeVectors(const size_t &nv= 2);
65  NodeVectors(const NodeVectors &otro);
66  NodeVectors &operator=(const NodeVectors &otro);
67  virtual ~NodeVectors(void);
68 
69  // public methods dealing with the DOF at the node
70  size_t getVectorsSize(void) const;
71 
72  // public methods for obtaining committed and trial
73  // response quantities of the node
74  virtual const Vector &getData(const size_t &) const;
75  virtual const Vector &getTrialData(const size_t &) const;
76  const Vector &getTrialData(void) const;
77  const Vector &getCommitData(void) const;
78 
79  // public methods for updating the trial response quantities
80  virtual int setTrialData(const size_t &nDOF,const double &value,const size_t &dof);
81  virtual int setTrialData(const size_t &nDOF,const Vector &);
82  virtual int incrTrialData(const size_t &nDOF,const Vector &);
83 
84  // public methods dealing with the committed state of the node
85  virtual int commitState(const size_t &nDOF);
86  virtual int revertToLastCommit(const size_t &nDOF);
87  virtual int revertToStart(const size_t &nDOF);
88 
89  virtual int sendSelf(CommParameters &);
90  virtual int recvSelf(const CommParameters &);
91  };
92 
93 } // end of XC namespace
94 
95 #endif
96 
const Vector & getCommitData(void) const
Returns commited values.
Definition: NodeVectors.cc:111
int createData(const size_t &)
private method to create the arrays to hold the data values and the Vector objects for the committed ...
Definition: NodeVectors.cc:250
Definition: Vector.h:82
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
Vector * commitData
commited quantities
Definition: NodeVectors.h:51
virtual int revertToLastCommit(const size_t &nDOF)
Returns the vectores al estado correspondiente al último commit.
Definition: NodeVectors.cc:222
size_t numVectors
number of vectors.
Definition: NodeVectors.h:50
int sendData(CommParameters &)
Sends object members through the channel being passed as parameter.
Definition: NodeVectors.cc:288
virtual ~NodeVectors(void)
destructor
Definition: NodeVectors.cc:82
virtual const Vector & getData(const size_t &) const
Returns the data vector.
Definition: NodeVectors.cc:95
Object that can move between processes.
Definition: MovableObject.h:91
size_t getVectorsSize(void) const
Return the number of node DOFs.
Definition: NodeVectors.cc:86
virtual int sendSelf(CommParameters &)
Envia los vectores through the channel being passed as parameter.E.
Definition: NodeVectors.cc:345
Vectores to store trial and commited values of node displacement, velocity, etc.
Definition: NodeVectors.h:47
virtual int revertToStart(const size_t &nDOF)
Returns the nodo a su estado inicial.
Definition: NodeVectors.cc:235
const Vector & getTrialData(void) const
Returns the valores de prueba.
Definition: NodeVectors.cc:133
Communication parameters between processes.
Definition: CommParameters.h:65
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: NodeVectors.cc:282
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: NodeVectors.cc:311
================================================================================
Definition: ContinuaReprComponent.h:34
Vector values
double array holding the displacement/velocity/acceleration.
Definition: NodeVectors.h:54
Vector * trialData
trial quantities
Definition: NodeVectors.h:52
NodeVectors(const size_t &nv=2)
Constructor.
Definition: NodeVectors.cc:64