xc
DqPtrsNode.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 //DqPtrsNode.h
28 //deque de pointers to node.
29 
30 
31 #ifndef DQPTRSNODE_H
32 #define DQPTRSNODE_H
33 
34 #include "DqPtrsKDTree.h"
35 #include "domain/mesh/node/KDTreeNodes.h"
36 
37 class Vector3d;
38 class ExprAlgebra;
39 class GeomObj3d;
40 class BND3d;
41 
42 namespace XC {
43 class TrfGeom;
44 
49 class DqPtrsNode: public DqPtrsKDTree<Node,KDTreeNodes>
50  {
51  public:
52  DqPtrsNode(CommandEntity *owr= nullptr);
53  DqPtrsNode(const DqPtrsNode &);
54  explicit DqPtrsNode(const std::deque<Node *> &);
55  explicit DqPtrsNode(const std::set<const Node *> &);
58  void mueve(const Vector3d &);
59  void transforma(const TrfGeom &trf);
60 
61  size_t getNumLiveNodes(void) const;
62  size_t getNumDeadNodes(void) const;
63 
64  bool InNodeTag(const int ) const;
65  bool InNodeTags(const ID &) const;
66  std::set<int> getTags(void) const;
67  DqPtrsNode pickNodesInside(const GeomObj3d &, const double &tol= 0.0);
68  BND3d Bnd(const double &) const;
69  Pos3d getCentroid(const double &) const;
70 
71  Node *findNode(const int &tag);
72  const Node *findNode(const int &tag) const;
73  void numera(void);
74  };
75 
76 DqPtrsNode operator+(const DqPtrsNode &a,const DqPtrsNode &b);
77 DqPtrsNode operator-(const DqPtrsNode &a,const DqPtrsNode &b);
78 DqPtrsNode operator*(const DqPtrsNode &a,const DqPtrsNode &b);
79 
80 } //end of XC namespace
81 #endif
82 
std::set< int > getTags(void) const
Returns the tags de los nodes.
Definition: DqPtrsNode.cc:187
bool InNodeTags(const ID &) const
Returns true if the nodes, with the tags are being passed as parameter, belong to the set...
Definition: DqPtrsNode.cc:178
Pointers to node container.
Definition: DqPtrsNode.h:49
BND3d Bnd(const double &) const
Return the nodes current position boundary.
Definition: DqPtrsNode.cc:217
FiberSet operator*(const FiberSet &, const FiberSet &)
Return the fibers in a that are also in b.
Definition: FiberSet.cc:87
Pos3d getCentroid(const double &) const
Returns the centroid of the nodes.
Definition: DqPtrsNode.cc:241
DqPtrsNode pickNodesInside(const GeomObj3d &, const double &tol=0.0)
Return a container with the nodes that lie inside the geometric object.
Definition: DqPtrsNode.cc:200
Vector of integers.
Definition: ID.h:93
void transforma(const TrfGeom &trf)
Applies the transformation to the elements of the set.
Definition: DqPtrsNode.cc:78
Node * findNode(const int &tag)
Returns (if it exists) a pointer to the node cuyo tag is being passed as parameter.
Definition: DqPtrsNode.cc:88
FiberSet operator+(const FiberSet &, const FiberSet &)
Return the union of both containers.
Definition: FiberSet.cc:65
DqPtrsNode & operator=(const DqPtrsNode &)
Assignment operator.
Definition: DqPtrsNode.cc:56
bool InNodeTag(const int) const
Returns true if the node identified by the tag being passed as parameter, belongs to the set...
Definition: DqPtrsNode.cc:169
DqPtrsNode(CommandEntity *owr=nullptr)
Constructor.
Definition: DqPtrsNode.cc:37
size_t getNumLiveNodes(void) const
Returns the number of nodes of the set which are active.
Definition: DqPtrsNode.cc:129
void numera(void)
Set indices to the objects to allow its use in VTK.
Definition: DqPtrsNode.cc:157
Geometric transformation that can be applied to the components of a set.
Definition: TrfGeom.h:49
Container with a KDTree.
Definition: DqPtrsKDTree.h:47
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
FiberSet operator-(const FiberSet &, const FiberSet &)
Return the fibers in a that are not in b.
Definition: FiberSet.cc:73
size_t getNumDeadNodes(void) const
Returns the number of nodes of the set which are inactive.
Definition: DqPtrsNode.cc:143
Mesh node.
Definition: Node.h:110
void mueve(const Vector3d &)
Desplaza los nodes of the set.
Definition: DqPtrsNode.cc:70
DqPtrsNode & operator+=(const DqPtrsNode &)
+= operator.
Definition: DqPtrsNode.cc:63