xc
NodeVectors.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 //NodeVectors
29 
30 
31 #ifndef NodeVectors_h
32 #define NodeVectors_h
33 
34 #include "utility/actor/actor/MovableObject.h"
35 #include "utility/kernel/CommandEntity.h"
36 #include "utility/matrix/Vector.h"
37 
38 namespace XC {
39 
40 class Vector;
41 class Channel;
42 class FEM_ObjectBroker;
43 
45 //
49  {
50  protected:
51  size_t numVectors;
54 
56 
57  DbTagData &getDbTagData(void) const;
58  int sendData(Communicator &);
59  int recvData(const Communicator &);
60  int createData(const size_t &);
61  void free_mem(void);
62  void copy(const NodeVectors &);
63  public:
64  // constructors
65  NodeVectors(const size_t &nv= 2);
66  NodeVectors(const NodeVectors &);
67  NodeVectors &operator=(const NodeVectors &);
68  virtual ~NodeVectors(void);
69 
70  // public methods dealing with the DOF at the node
71  size_t getVectorsSize(void) const;
72 
73  // public methods for obtaining committed and trial
74  // response quantities of the node
75  virtual const Vector &getData(const size_t &) const;
76  virtual const Vector &getTrialData(const size_t &) const;
77  const Vector &getTrialData(void) const;
78  const Vector &getCommitData(void) const;
79 
80  // public methods for updating the trial response quantities
81  virtual int setTrialData(const size_t &nDOF,const double &value,const size_t &dof);
82  virtual int setTrialData(const size_t &nDOF,const Vector &);
83  virtual int incrTrialData(const size_t &nDOF,const Vector &);
84 
85  // public methods dealing with the committed state of the node
86  virtual int commitState(const size_t &nDOF);
87  virtual int revertToLastCommit(const size_t &nDOF);
88  virtual int revertToStart(const size_t &nDOF);
89 
90  virtual int sendSelf(Communicator &);
91  virtual int recvSelf(const Communicator &);
92  };
93 
94 } // end of XC namespace
95 
96 #endif
97 
Float vector abstraction.
Definition: Vector.h:94
Vectors to store trial and committed values of node displacement, velocity, etc.
Definition: NodeVectors.h:48
Communication parameters between processes.
Definition: Communicator.h:66
size_t getVectorsSize(void) const
Return the number of node DOFs.
Definition: NodeVectors.cc:86
Vector values
double array holding the displacement/velocity/acceleration.
Definition: NodeVectors.h:55
Vector * commitData
committed quantities
Definition: NodeVectors.h:52
Object that can move between processes.
Definition: MovableObject.h:100
virtual int revertToLastCommit(const size_t &nDOF)
Returns the vectors its last committed value.
Definition: NodeVectors.cc:223
virtual const Vector & getData(const size_t &) const
Returns the data vector.
Definition: NodeVectors.cc:95
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
size_t numVectors
number of vectors.
Definition: NodeVectors.h:51
const Vector & getCommitData(void) const
Returns committed values.
Definition: NodeVectors.cc:111
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags de los miembros of the clase.
Definition: NodeVectors.cc:283
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: NodeVectors.cc:312
virtual int revertToStart(const size_t &nDOF)
Returns the node a su estado inicial.
Definition: NodeVectors.cc:236
const Vector & getTrialData(void) const
Returns trial values.
Definition: NodeVectors.cc:133
virtual int sendSelf(Communicator &)
Sends the vector through the communicator.
Definition: NodeVectors.cc:347
virtual int recvSelf(const Communicator &)
Receive the object.
Definition: NodeVectors.cc:360
Objet that can execute python scripts.
Definition: CommandEntity.h:40
Vector * trialData
trial quantities
Definition: NodeVectors.h:53
int sendData(Communicator &)
Sends object members through the communicator argument.
Definition: NodeVectors.cc:289
virtual ~NodeVectors(void)
destructor
Definition: NodeVectors.cc:82
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual int commitState(const size_t &nDOF)
Commit state.
Definition: NodeVectors.cc:210
NodeVectors(const size_t &nv=2)
Constructor.
Definition: NodeVectors.cc:64
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:251