xc
PntPtrArray3d.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 //PntPtrArray3d.h
28 //Vector of point matrices
29 
30 #ifndef PNTPTRARRAY3d_H
31 #define PNTPTRARRAY3d_H
32 
33 #include "xc_utils/src/kernel/CommandEntity.h"
34 #include "PntPtrArray.h"
35 #include "PtrArray3dBase.h"
36 #include "utility/matrix/Vector.h"
37 
38 #include "xc_basic/src/matrices/Indices3dArray.h"
39 
40 class ExprAlgebra;
41 class Intervalo1D;
42 class RangoIndice;
43 class Array3dRange;
44 
45 namespace XC{
46 
50 class PntPtrArray3d: public PtrArray3dBase<PntPtrArray>
51  {
52  protected:
53 
54 
55  friend class Framework3d;
56  PntPtrArray3d(const size_t n_layers= 0);
57  PntPtrArray3d(const size_t ,const size_t ,const size_t );
58  public:
59  inline virtual ~PntPtrArray3d(void) {}
60  Pnt *findPoint(const int &tag);
61  const Pnt *findPoint(const int &tag) const;
62  Pnt *getNearestPnt(const Pos3d &p);
63  const Pnt *getNearestPnt(const Pos3d &p) const;
64 
65  const MultiBlockTopology *getMultiBlockTopology(void) const;
67 
68  std::deque<size_t> copyPoints(const Array3dRange &,const std::vector<size_t> &,const Vector3d &);
69  PntPtrArray3d getPointsOnRange(const Array3dRange &);
70  Pnt *getPoint(const VIndices &i);
71  PntPtrArray3d getPoints(const Indices3dArray &);
72  PntPtrArray getPoints(const IndicesMatrix &);
73  PntPtrArray3d getCellPoints(const size_t &,const size_t &,const size_t &,const Indices3dArray &);
74  PntPtrArray getCellPoints(const size_t &,const size_t &,const IndicesMatrix &);
75 
76  Pos3d getCentroide(void) const;
77 
78  void setPnt(const size_t &,const size_t &,const size_t &,const int &);
79  Pnt *getPnt(const size_t &,const size_t &,const size_t &);
80 
81 
82  void Print(std::ostream &os) const;
83  };
84 
85 
86 std::ostream &operator<<(std::ostream &os,const PntPtrArray3d &);
87 
88 std::vector<size_t> getIdPointsQuad(const PntPtrArray3d::constant_i_layer_const_ref &,const size_t &j,const size_t &k);
89 
90 } //end of XC namespace.
91 
92 #endif
Pnt * getPoint(const VIndices &i)
Return the points which indices are being passed as parameter.
Definition: PntPtrArray3d.cc:240
Pnt * getNearestPnt(const Pos3d &p)
Return the point closest to the one being passed as parameter.
Definition: PntPtrArray3d.cc:153
std::vector< size_t > getIdPointsQuad(const PntPtrArray3d::constant_i_layer_const_ref &, const size_t &j, const size_t &k)
Return the indexes of the points (j,k),(j+1,k),(j+1,k+1),(j,k+1).
Definition: PntPtrArray3d.cc:378
const MultiBlockTopology * getMultiBlockTopology(void) const
Returns a pointer to the MultiBlockTopology object.
Definition: PntPtrArray3d.cc:120
PntPtrArray3d getPoints(const Indices3dArray &)
Return the points which indices are being passed as parameter.
Definition: PntPtrArray3d.cc:256
Model geometry manager.
Definition: MultiBlockTopology.h:68
Three-dimenstional array of point pointers.
Definition: PntPtrArray3d.h:50
PntPtrArray3d getPointsOnRange(const Array3dRange &)
Return the points del rango being passed as parameter.
Definition: PntPtrArray3d.cc:219
Pointers to points in a matrix structure.
Definition: PntPtrArray.h:49
std::deque< size_t > copyPoints(const Array3dRange &, 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: PntPtrArray3d.cc:196
PntPtrArray3d(const size_t n_layers=0)
Default constructor.
Definition: PntPtrArray3d.cc:50
Point (KPoint).
Definition: Pnt.h:49
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Pnt * findPoint(const int &tag)
Returns (if it exists) a pointer to the point identified by the tag being passed as parameter...
Definition: PntPtrArray3d.cc:106
Three dimensional framework container.
Definition: Framework3d.h:42
Three-dimensional array of object pointers.
Definition: PtrArray3dBase.h:55
Pos3d getCentroide(void) const
Return the framework centroid.
Definition: PntPtrArray3d.cc:85
PntPtrArray3d getCellPoints(const size_t &, const size_t &, const size_t &, const Indices3dArray &)
Return the cell builded by the points obtained from the positions of the tritrix that result for addi...
Definition: PntPtrArray3d.cc:301