xc
NodeLockers.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 //NodeLockers.h
29 
30 #ifndef NODELOCKERS_H
31 #define NODELOCKERS_H
32 
33 #include "utility/kernel/CommandEntity.h"
34 #include "domain/load/pattern/NodeLocker.h"
35 #include <map>
36 
37 namespace XC {
38 
39 class Mesh;
40 
43  {
44  typedef std::map<std::string,NodeLocker *> map_node_lockers;
45  map_node_lockers node_lockers;
46  int tag;
47  std::string code;
48  protected:
49  friend class Mesh;
50  NodeLocker *find_node_locker(const std::string &);
51  const NodeLocker *find_node_locker(const std::string &) const;
52  NodeLocker *newNodeLocker(const std::string &nmb);
53  void borraNodeLocker(const std::string &nmb);
54 
55  DbTagData &getDbTagData(void) const;
56  int sendData(Communicator &comm);
57  int recvData(const Communicator &comm);
58 
59  NodeLockers(Mesh *owr);
60  ~NodeLockers(void);
61  public:
62  const std::string getCurrentNodeLockerId(void) const;
63  NodeLocker *getCurrentNodeLockerPtr(void);
64  const NodeLocker *getCurrentNodeLockerPtr(void) const;
65  void clearAll(void);
66  Domain *getDomain(void);
67  const Domain *getDomain(void) const;
68 
69  void removeFromDomain(const std::string &);
70  void removeAllFromDomain(void);
71 
72  NodeLocker *buscaNodeLocker(const int &tag);
73  const NodeLocker *buscaNodeLocker(const int &tag) const;
74 
75  const int &getTag(void) const
76  { return tag; }
77 
78  virtual int sendSelf(Communicator &);
79  virtual int recvSelf(const Communicator &);
80  };
81 
82 } // end of XC namespace
83 
84 #endif
NodeLockers(Mesh *owr)
Default constructor.
Definition: NodeLockers.cc:43
~NodeLockers(void)
Destructor.
Definition: NodeLockers.cc:168
Communication parameters between processes.
Definition: Communicator.h:66
NodeLocker container.
Definition: NodeLockers.h:42
Domain * getDomain(void)
Returns the domain.
Definition: NodeLockers.cc:181
Object that can move between processes.
Definition: MovableObject.h:100
NodeLocker * buscaNodeLocker(const int &tag)
Returns a pointer to the blocker whose tag is passed as parameter.
Definition: NodeLockers.cc:67
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
NodeLocker * find_node_locker(const std::string &)
Returns a pointer to the blocker whose name is passed as parameter.
Definition: NodeLockers.cc:47
Objet that can execute python scripts.
Definition: CommandEntity.h:40
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: NodeLockers.cc:213
Single freedom constraints that make part of a load pattern.
Definition: NodeLocker.h:45
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: NodeLockers.cc:266
void clearAll(void)
Clears all the objects.
Definition: NodeLockers.cc:159
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: NodeLockers.cc:206
virtual int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: NodeLockers.cc:279
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: NodeLockers.cc:237
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
Finite element mesh.
Definition: Mesh.h:65