xc
PntPtrArray.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 //PntPtrArray.h
28 //Point matrix.
29 
30 #ifndef PNTPTRARRAY_H
31 #define PNTPTRARRAY_H
32 
33 #include "PtrArrayBase.h"
34 #include "xc_basic/src/matrices/m_int.h"
35 #include <vector>
36 
37 class Pos3d;
38 class MatrixRange;
39 class Vector3d;
40 
41 namespace XC{
42 class Pnt;
43 class SFreedom_Constraint;
44 class MultiBlockTopology;
45 
49 class PntPtrArray: public PtrArrayBase<Pnt>
50  {
51  protected:
52 
53 
54  friend class MultiBlockTopology;
55  public:
57  PntPtrArray(const size_t &f=0,const size_t &c=0)
58  : PtrArrayBase<Pnt>(f,c) {}
59  m_int getTags(void) const;
60 
61  const MultiBlockTopology *getMultiBlockTopology(void) const;
63 
64  void setPnt(const size_t &,const size_t &,const int &);
65  Pnt *getPnt(const size_t &,const size_t &);
66 
67  Pnt *findPoint(const size_t &);
68  const Pnt *findPoint(const size_t &) const;
69  Pnt *getNearestPnt(const Pos3d &p);
70  const Pnt *getNearestPnt(const Pos3d &p) const;
71  std::deque<size_t> copyPoints(const MatrixRange &,const std::vector<size_t> &,const Vector3d &);
72 
73  Pos3d getCentroide(void) const;
74 
75 
76  };
77 
78 } //end of XC namespace
79 
80 #endif
m_int getTags(void) const
Returns an array with the point identifiers.
Definition: PntPtrArray.cc:192
Model geometry manager.
Definition: MultiBlockTopology.h:68
Pointers to points in a matrix structure.
Definition: PntPtrArray.h:49
PntPtrArray(const size_t &f=0, const size_t &c=0)
Constructor.
Definition: PntPtrArray.h:57
const MultiBlockTopology * getMultiBlockTopology(void) const
Returns a pointer to the MultiBlockTopology object.
Definition: PntPtrArray.cc:100
Point (KPoint).
Definition: Pnt.h:49
Pos3d getCentroide(void) const
Return the framework centroid.
Definition: PntPtrArray.cc:208
Pnt * getNearestPnt(const Pos3d &p)
Return the point closest to the point being passed as parameter.
Definition: PntPtrArray.cc:160
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Pnt * findPoint(const size_t &)
Returns (if it exists) a pointer to point identified by the tag is being passed as parameter...
Definition: PntPtrArray.cc:77
Base class for matrices of pointers to nodes, elements and points.
Definition: PtrArrayBase.h:49
std::deque< size_t > copyPoints(const MatrixRange &, const std::vector< size_t > &, const Vector3d &)
Copy the points from the range being passed as parameter, and places the at the positions of the matr...
Definition: PntPtrArray.cc:237