XC Open source finite element analysis program
NodeLockers.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 //NodeLockers.h
28 
29 #ifndef NODELOCKERS_H
30 #define NODELOCKERS_H
31 
32 #include "xc_utils/src/nucleo/EntCmd.h"
33 #include "domain/load/pattern/NodeLocker.h"
34 #include <map>
35 
36 namespace XC {
37 
38 class Mesh;
39 
41 class NodeLockers: public EntCmd, public MovableObject
42  {
43  typedef std::map<std::string,NodeLocker *> map_node_lockers;
44  map_node_lockers node_lockers;
45  int tag;
46  std::string code;
47  protected:
48  friend class Mesh;
49  NodeLocker *busca_node_locker(const std::string &);
50  const NodeLocker *busca_node_locker(const std::string &) const;
51  NodeLocker *newNodeLocker(const std::string &nmb);
52  void borraNodeLocker(const std::string &nmb);
53 
54  DbTagData &getDbTagData(void) const;
55  int sendData(CommParameters &cp);
56  int recvData(const CommParameters &cp);
57 
58  NodeLockers(Mesh *owr);
59  ~NodeLockers(void);
60  public:
61  const std::string getCurrentNodeLockerId(void) const;
62  NodeLocker *getCurrentNodeLockerPtr(void);
63  const NodeLocker *getCurrentNodeLockerPtr(void) const;
64  void clearAll(void);
65  Domain *getDomain(void);
66  const Domain *getDomain(void) const;
67 
68  void removeFromDomain(const std::string &);
69  void removeAllFromDomain(void);
70 
71  NodeLocker *buscaNodeLocker(const int &tag);
72  const NodeLocker *buscaNodeLocker(const int &tag) const;
73 
74  const int &getTag(void) const
75  { return tag; }
76 
77  virtual int sendSelf(CommParameters &);
78  virtual int recvSelf(const CommParameters &);
79  };
80 
81 } // end of XC namespace
82 
83 #endif
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: NodeLockers.cc:210
Single freedom constraints that make part of a load pattern.
Definition: NodeLocker.h:44
Domain * getDomain(void)
Returns the domain.
Definition: NodeLockers.cc:178
Finite element mesh.
Definition: Mesh.h:64
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
~NodeLockers(void)
Destructor.
Definition: NodeLockers.cc:165
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
NodeLockers(Mesh *owr)
Default constructor.
Definition: NodeLockers.cc:43
Object that can move between processes.
Definition: MovableObject.h:91
NodeLocker * busca_node_locker(const std::string &)
Returns a pointer to the bloqueador cuyo nombre being passed as parameter.
Definition: NodeLockers.cc:47
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: NodeLockers.cc:234
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: NodeLockers.cc:276
NodeLocker container.
Definition: NodeLockers.h:41
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: NodeLockers.cc:203
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: NodeLockers.cc:263
Communication parameters between processes.
Definition: CommParameters.h:65
void clearAll(void)
Clears all the objects.
Definition: NodeLockers.cc:156
================================================================================
Definition: ContinuaReprComponent.h:34
NodeLocker * buscaNodeLocker(const int &tag)
Returns a pointer to the bloqueador cuyo tag being passed as parameter.
Definition: NodeLockers.cc:67