xc
PntMap.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 //PntMap.h
28 
29 #ifndef MAPPUNTOS_H
30 #define MAPPUNTOS_H
31 
32 #include "EntityMap.h"
33 #include <map>
34 
35 class Pos3d;
36 class Line3d;
37 class Plane;
38 class Vector3d;
39 
40 namespace XC {
41 
42 class Preprocessor;
43 class MultiBlockTopology;
44 class Pnt;
45 class SetEstruct;
46 class TrfGeom;
47 
49 //
51 class PntMap: public EntityMap<Pnt>
52  {
53  private:
54  void UpdateSets(Pnt *) const;
55  protected:
56 
57 
58  Pnt *Crea(void);
59  public:
60  PntMap(MultiBlockTopology *mbt= nullptr);
61 
62  Vector3d getVector(const Indice &i,const Indice &j) const;
63  Line3d getRecta(const Indice &i,const Indice &j) const;
64  Plane getPlane(const Indice &i,const Indice &j,const Indice &k) const;
65 
66  Pnt *New(void);
67  Pnt *New(const Pos3d &);
68  Pnt *New(const size_t &,const Pos3d &);
69 
70  Pnt *Copy(const Pnt *,const Vector3d &v);
71  void Copy(const std::vector<PntMap::Indice> &);
72  void Transforma(const TrfGeom &trf,const std::vector<PntMap::Indice> &);
73  double Dist(const Indice &i,const Indice &j) const;
74 
75 
76  };
77 
78 } //end of XC namespace
79 #endif
Geometric entities container (points, lines, surfaces,...).
Definition: EntityMap.h:42
Model geometry manager.
Definition: MultiBlockTopology.h:68
double Dist(const Indice &i, const Indice &j) const
Return the distance between the points which identifiers are being passed as parameters.
Definition: PntMap.cc:242
PntMap(MultiBlockTopology *mbt=nullptr)
Constructor.
Definition: PntMap.cc:43
Vector3d getVector(const Indice &i, const Indice &j) const
Return the vector defined by the points which indices are being passed as parameters.
Definition: PntMap.cc:64
Point container.
Definition: PntMap.h:51
Point (KPoint).
Definition: Pnt.h:49
Pnt * Copy(const Pnt *, const Vector3d &v)
Creates a new point, copy from the point argument with the corresponding name according to the value ...
Definition: PntMap.cc:178
Pnt * New(void)
Creates a new point.
Definition: PntMap.cc:132
Geometric transformation that can be applied to the components of a set.
Definition: TrfGeom.h:49
void Transforma(const TrfGeom &trf, const std::vector< PntMap::Indice > &)
Applies the transformation to the points identified by the indices being passed as parameter...
Definition: PntMap.cc:227
Line3d getRecta(const Indice &i, const Indice &j) const
Return the line defined by the points which indices are being passed as parameters.
Definition: PntMap.cc:81
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Pnt * Crea(void)
Creates a new point.
Definition: PntMap.cc:120
Plane getPlane(const Indice &i, const Indice &j, const Indice &k) const
Return the plane defined by the points which indices are being passed as parameters.
Definition: PntMap.cc:98