XC Open source finite element analysis program
NodePtrsWithIDs.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 //NodePtrsWithIDs.h
28 
29 #ifndef NodePtrsWithIDs_h
30 #define NodePtrsWithIDs_h
31 
32 #include "NodePtrs.h"
33 #include "utility/matrix/ID.h"
34 #include "utility/actor/actor/MovableObject.h"
35 
36 namespace XC {
37 class Node;
38 class Domain;
39 class Channel;
40 class FEM_ObjectBroker;
41 
43 //
45 class NodePtrsWithIDs: public NodePtrs, public MovableObject
46  {
47  protected:
49 
50  DbTagData &getDbTagData(void) const;
51  int sendData(CommParameters &cp);
52  int recvData(const CommParameters &cp);
53 
54 
55  friend class Element;
56  void set_node_ptrs(Domain *domain);
57  public:
58  NodePtrsWithIDs(Element *owr,size_t numNodos);
59 
60  inline const size_t numNodos(void)
61  { return NodePtrs::size(); }
62  // public methods to obtain information about dof & connectivity
63  int getNumExternalNodes(void) const;
64  NodePtrs &getNodePtrs(void);
65  const NodePtrs &getNodePtrs(void) const;
66  const ID &getExternalNodes(void) const;
67  int getTagNode(const int &i) const;
68 
69 
70  void set_id_nodes(int Nd1,int Nd2);
71  void set_id_nodes(int nd1,int nd2,int nd3);
72  void set_id_nodes(int nd1,int nd2,int nd3,int nd4);
73  void set_id_nodes(int nd1,int nd2,int nd3,int nd4,int nd5);
74  void set_id_nodes(int nd1,int nd2,int nd3,int nd4,int nd5,int nd6);
75  void set_id_nodes(int nd1,int nd2,int nd3,int nd4,int nd5,int nd6,int nd7);
76  void set_id_nodes(int nd1,int nd2,int nd3,int nd4,int nd5,int nd6,int nd7,int nd8);
77  void set_id_nodes(int nd1,int nd2,int nd3,int nd4,int nd5,int nd6,int nd7,int nd8,int nd9);
78  void set_id_nodes(int nd1,int nd2,int nd3,int nd4,int nd5,int nd6,int nd7,int nd8,int nd9,int nd10
79  ,int nd11,int nd12,int nd13,int nd14,int nd15,int nd16,int nd17,int nd18,int nd19,int nd20);
80  void set_id_nodes(int nd1,int nd2,int nd3,int nd4,int nd5,int nd6,int nd7,
81  int nd8,int nd9,int nd10,int nd11,int nd12,int nd13,
82  int nd14,int nd15,int nd16,int nd17,int nd18,int nd19,
83  int nd20, int nd21, int nd22,int nd23, int nd24, int nd25,
84  int nd26,int nd27);
85  void set_id_nodes(const std::vector<int> &inodos);
86  void set_id_nodes(const ID &inodos);
87  void Print(std::ostream &os) const;
88  int sendSelf(CommParameters &);
89  int recvSelf(const CommParameters &);
90  bool equalNumDOF(void);
91  bool checkNumDOF(const size_t &, const size_t &);
92 
93  };
94 
95 std::ostream &operator<<(std::ostream &os,const NodePtrsWithIDs &nodePtrs);
96 
97 } //end of XC namespace
98 #endif
void set_id_nodes(int Nd1, int Nd2)
Sets identifiers for nodes 1 and 2.
Definition: NodePtrsWithIDs.cc:97
NodePtrsWithIDs(Element *owr, size_t numNodos)
@ brief Default constructor.
Definition: NodePtrsWithIDs.cc:33
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: NodePtrsWithIDs.cc:255
ID connectedExternalNodes
contains the tags of the end nodes.
Definition: NodePtrsWithIDs.h:48
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
int sendData(CommParameters &cp)
Sends object members through the channel being passed as parameter.
Definition: NodePtrsWithIDs.cc:262
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
bool checkNumDOF(const size_t &, const size_t &)
Check DOF number on nodes.
Definition: NodePtrsWithIDs.cc:219
NodePtrs & getNodePtrs(void)
Returns a pointer to the vector de nodos.
Definition: NodePtrsWithIDs.cc:54
int getNumExternalNodes(void) const
Return the number of external nodes.
Definition: NodePtrsWithIDs.cc:46
const ID & getExternalNodes(void) const
Reuturns external nodes identifiers.
Definition: NodePtrsWithIDs.cc:58
Base calass for the finite elements.
Definition: Element.h:104
void Print(std::ostream &os) const
Printing...
Definition: NodePtrsWithIDs.cc:238
Object that can move between processes.
Definition: MovableObject.h:91
void set_node_ptrs(Domain *domain)
Asigna los pointers to los nodos.
Definition: NodePtrsWithIDs.cc:90
Node pointer container for elements.
Definition: NodePtrsWithIDs.h:45
Definition: ID.h:77
Pointers to nodes.
Definition: NodePtrs.h:54
int getTagNode(const int &i) const
Returns the tag of the i-th node.
Definition: NodePtrsWithIDs.cc:62
bool equalNumDOF(void)
True if all nodes has the same DOF number.
Definition: NodePtrsWithIDs.cc:201
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
int recvData(const CommParameters &cp)
Receives object members through the channel being passed as parameter.
Definition: NodePtrsWithIDs.cc:266