xc
PntPtrArray.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 //PntPtrArray.h
29 //Point matrix.
30 
31 #ifndef PNTPTRARRAY_H
32 #define PNTPTRARRAY_H
33 
34 #include "PtrArrayBase.h"
35 #include "utility/matrices/m_int.h"
36 #include <vector>
37 
38 class Pos3d;
39 class MatrixRange;
40 class Vector3d;
41 
42 namespace XC{
43 class Pnt;
44 class SFreedom_Constraint;
45 class MultiBlockTopology;
46 
50 class PntPtrArray: public PtrArrayBase<Pnt>
51  {
52  protected:
53 
54  friend class MultiBlockTopology;
55  public:
57  PntPtrArray(const size_t &f=0,const size_t &c=0, const value_type &def_value= nullptr)
58  : PtrArrayBase<Pnt>(f,c,def_value) {}
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  std::deque<Pnt *> getLoop(const std::vector<size_t> &rowIndexes, const std::vector<size_t> &columnIndexes) const;
68 
69  Pnt *findPoint(const size_t &);
70  const Pnt *findPoint(const size_t &) const;
71  Pnt *getNearestPnt(const Pos3d &p);
72  const Pnt *getNearestPnt(const Pos3d &p) const;
73  std::deque<size_t> copyPoints(const MatrixRange &,const std::vector<size_t> &,const Vector3d &);
74 
75  Pos3d getCentroid(void) const;
76 
77 
78  };
79 
80 } //end of XC namespace
81 
82 #endif
Pos3d getCentroid(void) const
Return the framework centroid.
Definition: PntPtrArray.cc:211
m_int getTags(void) const
Returns an array with the point identifiers.
Definition: PntPtrArray.cc:195
Matrix which element type has estructura de anillo respecto a las operaciones + y *...
Definition: ZMatrix.h:37
Model geometry manager.
Definition: MultiBlockTopology.h:68
Pointers to points in a matrix structure.
Definition: PntPtrArray.h:50
const MultiBlockTopology * getMultiBlockTopology(void) const
Returns a pointer to the MultiBlockTopology object.
Definition: PntPtrArray.cc:103
Rango de variación de un índice, se emplea en BoxConstRef.
Definition: MatrixRange.h:29
Point (KPoint).
Definition: Pnt.h:50
PntPtrArray(const size_t &f=0, const size_t &c=0, const value_type &def_value=nullptr)
Constructor.
Definition: PntPtrArray.h:57
Pnt * getNearestPnt(const Pos3d &p)
Return the point closest to the point being passed as parameter.
Definition: PntPtrArray.cc:163
Posición en tres dimensiones.
Definition: Pos3d.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
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:80
Base class for matrices of pointers to nodes, elements and points.
Definition: PtrArrayBase.h:50
std::deque< Pnt * > getLoop(const std::vector< size_t > &rowIndexes, const std::vector< size_t > &columnIndexes) const
Return a loop passing through the contour defined by the indexes.
Definition: PntPtrArray.cc:239
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:299
Vector en tres dimensiones.
Definition: Vector3d.h:39