xc
PntPtrArray3d.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 //PntPtrArray3d.h
29 //Vector of point matrices
30 
31 #ifndef PNTPTRARRAY3d_H
32 #define PNTPTRARRAY3d_H
33 
34 #include "utility/kernel/CommandEntity.h"
35 #include "PntPtrArray.h"
36 #include "PtrArray3dBase.h"
37 #include "utility/matrix/Vector.h"
38 #include "utility/matrices/3d_arrays/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 &);
70  Pnt *getPoint(const VIndices &i);
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 getCentroid(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:239
Pnt * getNearestPnt(const Pos3d &p)
Return the point closest to the position argument.
Definition: PntPtrArray3d.cc:152
Definition: vectorZ.h:39
Pos3d getCentroid(void) const
Return the framework centroid.
Definition: PntPtrArray3d.cc:84
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:377
const MultiBlockTopology * getMultiBlockTopology(void) const
Returns a pointer to the MultiBlockTopology object.
Definition: PntPtrArray3d.cc:119
PntPtrArray3d getPoints(const Indices3dArray &)
Return the points which indices are being passed as parameter.
Definition: PntPtrArray3d.cc:255
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:218
Pointers to points in a matrix structure.
Definition: PntPtrArray.h:50
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:195
Integration interval in one dimension.
Definition: num_integration.h:32
PntPtrArray3d(const size_t n_layers=0)
Default constructor.
Definition: PntPtrArray3d.cc:49
Point (KPoint).
Definition: Pnt.h:50
Reference to a layer of the array which points have constant I index.
Definition: ConstantILayerConstRef.h:34
Posición en tres dimensiones.
Definition: Pos3d.h:44
Expresión algebraica.
Definition: ExprAlgebra.h:32
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Clase base para las «tritrices» de posiciones.
Definition: Indices3dArray.h:32
Rangos de variación de tres índices, se emplea en BoxConstRef.
Definition: Array3dRange.h:32
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:105
Matrix of indices.
Definition: IndicesMatrix.h:39
Three dimensional framework container.
Definition: Framework3d.h:42
Rango de variación de un índice, se emplea en BoxConstRef.
Definition: RangoIndice.h:30
Vector en tres dimensiones.
Definition: Vector3d.h:39
Three-dimensional array of object pointers.
Definition: PtrArray3dBase.h:43
PntPtrArray3d getCellPoints(const size_t &, const size_t &, const size_t &, const Indices3dArray &)
Return the cell built by the points obtained from the positions of the tritrix that result for adding...
Definition: PntPtrArray3d.cc:300