xc
NodePtrArray.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 //NodePtrArray.h
29 //Node matrix
30 
31 #ifndef NODEPTRARRAY_H
32 #define NODEPTRARRAY_H
33 
34 #include "PtrArrayBase.h"
35 #include "utility/matrices/m_int.h"
36 #include <vector>
37 
38 class Pos3d;
39 
40 namespace XC{
41 class Node;
42 class SFreedom_Constraint;
43 
47 class NodePtrArray: public PtrArrayBase<Node>
48  {
49  public:
51  NodePtrArray(const size_t &f=0,const size_t &c=0)
52  : PtrArrayBase<Node>(f,c) {}
53  m_int getTags(void) const;
54  void fix(const SFreedom_Constraint &) const;
55 
56  Node *findNode(const int &tag);
57  const Node *findNode(const int &tag) const;
58  Node *getNearestNode(const Pos3d &p);
59  const Node *getNearestNode(const Pos3d &p) const;
60  bool removeNode(Node *);
61  bool removeNode(const int &);
62  std::deque<const Node *> getNodePtrs(void) const;
63  boost::python::list getPyNodeList(void) const;
64  };
65 
66 } //end of XC namespace
67 
68 #endif
Matrix which element type has estructura de anillo respecto a las operaciones + y *...
Definition: ZMatrix.h:37
boost::python::list getPyNodeList(void) const
Returns a Python list containing the nodes of this array.
Definition: NodePtrArray.cc:179
std::deque< const Node * > getNodePtrs(void) const
Returns the pointers to the nodes of this array.
Definition: NodePtrArray.cc:161
NodePtrArray(const size_t &f=0, const size_t &c=0)
Constructor.
Definition: NodePtrArray.h:51
m_int getTags(void) const
Returns an array with the identifiers of the nodes.
Definition: NodePtrArray.cc:207
Two-dimensional array of pointers to nodes.
Definition: NodePtrArray.h:47
Single freedom constraint.
Definition: SFreedom_Constraint.h:85
Node * getNearestNode(const Pos3d &p)
Returns the node closest to the point being passed as parameter.
Definition: NodePtrArray.cc:88
bool removeNode(Node *)
Remove the given node from the array (set the corresponding pointer to null).
Definition: NodePtrArray.cc:125
void fix(const SFreedom_Constraint &) const
Impone desplazamiento nulo en the nodes de this set.
Definition: NodePtrArray.cc:196
Posición en tres dimensiones.
Definition: Pos3d.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Base class for matrices of pointers to nodes, elements and points.
Definition: PtrArrayBase.h:50
Node * findNode(const int &tag)
Returns (if it exists) a pointer to the node which tag is being passed as parameter.
Definition: NodePtrArray.cc:41
Mesh node.
Definition: Node.h:111