NeoPZ
tpzgeoelmapped.cpp
Go to the documentation of this file.
1 
6 #include "tpzgeoelmapped.h"
7 
8 #include "tpzgeoelrefpattern.h"
9 #include "TPZGeoCube.h"
10 #include "pzshapecube.h"
11 #include "TPZRefCube.h"
12 #include "pzshapelinear.h"
13 #include "TPZGeoLinear.h"
14 #include "TPZRefLinear.h"
15 #include "pzrefquad.h"
16 #include "pzshapequad.h"
17 #include "pzgeoquad.h"
18 #include "pzshapetriang.h"
19 #include "pzreftriangle.h"
20 #include "pzgeotriangle.h"
21 #include "pzshapeprism.h"
22 #include "pzrefprism.h"
23 #include "pzgeoprism.h"
24 #include "pzshapetetra.h"
25 #include "pzreftetrahedra.h"
26 #include "pzgeotetrahedra.h"
27 #include "pzshapepiram.h"
28 #include "pzrefpyram.h"
29 #include "pzgeopyramid.h"
30 #include "pzgeopoint.h"
31 #include "pzrefpoint.h"
32 #include "pzshapepoint.h"
33 
34 using namespace pzgeom;
35 using namespace pzrefine;
36 using namespace pzshape;
37 
38 
40 template<class TBase>
42  TPZVec<int64_t>& nodeindexes,
43  int matid,
44  int64_t& index)
45 {
46  TPZGeoMesh &mesh = *(this->Mesh());
47  return mesh.CreateGeoElementMapped(type,nodeindexes,matid,index);
48 }
49 
50 template<class TBase>
52 {
53  if(&DestMesh == this->Mesh())
54  {
55  return new TPZGeoElMapped<TBase>(*this);
56  }
57  else
58  {
59  return new TPZGeoElMapped<TBase>(DestMesh,*this);
60  }
61 }
62 
65 template<class TBase>
67  std::map<int64_t,int64_t> &gl2lcNdIdx,
68  std::map<int64_t,int64_t> &gl2lcElIdx) const
69 {
70  return new TPZGeoElMapped<TBase>(DestMesh,*this,gl2lcNdIdx,gl2lcElIdx);
71 }
72 
73 template <class TBase>
75 TBase(destmesh,copy), fCornerCo(copy.fCornerCo)
76 {
77 
78 }
79 
80 template <class TBase>
81 TPZGeoElMapped<TBase>::TPZGeoElMapped(TPZGeoMesh &destmesh, const TPZGeoElMapped<TBase> &copy, std::map<int64_t,int64_t> &gl2lcNdIdx,
82  std::map<int64_t,int64_t> &gl2lcElIdx) :
83 TPZRegisterClassId(&TPZGeoElMapped::ClassId),TBase(destmesh,copy,gl2lcNdIdx,gl2lcElIdx),
84  fCornerCo(copy.fCornerCo)
85 {
86 
87 }
88 
89 
90 
91 #include "TPZGeoCube.h"
92 #include "TPZGeoLinear.h"
93 #include "pzgeoquad.h"
94 #include "pzgeotriangle.h"
95 #include "pzgeoprism.h"
96 #include "pzgeotetrahedra.h"
97 #include "pzgeopyramid.h"
98 #include "pzgeopoint.h"
99 #include "pzgmesh.h"
100 #include "pzgeoel.h"
101 #include "TPZGeoElement.h"
102 
103 #include "pzvec.h"
104 #include "pzmanvector.h"
105 #include "tpzgeoelrefpattern.h"
106 
107 
108 
109 
110 using namespace pzgeom;
111 
113 #define INSERTCLASS(TCL,CLID) \
114 template class \
115 TPZRestoreClass< TPZGeoElMapped<TPZGeoElRefPattern<TCL > >>; \
116 template class TPZGeoElMapped< TPZGeoElRefPattern<TCL> >;
117 
118 INSERTCLASS(TPZGeoPoint,TPZGEOELREFPATMAPPEDPOINTID)
119 INSERTCLASS(TPZGeoLinear,TPZGEOELREFPATMAPPEDLINEID)
120 INSERTCLASS(TPZGeoTriangle,TPZGEOELREFPATMAPPEDTRIANGLEID)
121 INSERTCLASS(TPZGeoQuad,TPZGEOELREFPATMAPPEDQUADRILATERALID)
122 INSERTCLASS(TPZGeoCube,TPZGEOELREFPATMAPPEDCUBEID)
123 INSERTCLASS(TPZGeoPrism,TPZGEOELREFPATMAPPEDPRISMID)
124 INSERTCLASS(TPZGeoTetrahedra,TPZGEOELREFPATMAPPEDTETRAHEDRAID)
125 INSERTCLASS(TPZGeoPyramid,TPZGEOELREFPATMAPPEDPYRAMIDID)
virtual TPZGeoEl * ClonePatchEl(TPZGeoMesh &DestMesh, std::map< int64_t, int64_t > &gl2lcNdIdx, std::map< int64_t, int64_t > &gl2lcElIdx) const override
Contains TPZShapeTetra class which implements the shape functions of a tetrahedral element...
Templated vector implementation.
groups all classes dedicated to the computation of shape functions
Definition: pzshapeextend.h:16
Contains the TPZRefQuad class which implements the uniform refinement of a geometric quadrilateral el...
Implements the geometry of a one dimensional linear element. Geometry.
Definition: TPZGeoLinear.h:30
This class implements a geometric element which uses its ancestral to compute its jacobian...
Contains TPZShapeLinear class which implements the shape functions of a linear one-dimensional elemen...
Contains the TPZRefPyramid class which implements the uniform refinement of a geometric hexahedral el...
Contains declaration of TPZGeoElMapped class which implements a geometric element using its ancestral...
Contains TPZShapeCube class which implements the shape functions of a hexaedral element.
Contains the TPZRefPrism class which implements the uniform refinement of a geometric prism element...
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
Contains the TPZGeoTetrahedra class which implements the geometry of a tetrahedral element...
Free store vector implementation.
TPZFNMatrix< Geo::Dimension *Geo::NNodes > fCornerCo
Implements the geometry of a quadrilateral element. Geometry.
Definition: pzgeoquad.h:26
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &nodeindexes, int matid, int64_t &index) override
Creates a geometric element according to the type of the father element.
Contains declaration of TPZGeoElRefPattern class which implements a generic geometric element which i...
#define INSERTCLASS(TCL, CLID)
Macro to define templates to TPZGeoElMapped for all the geometric element types.
Groups all classes which model the h refinement These classes are used as template arguments of...
Definition: pzrefpoint.cpp:15
Contains TPZShapePoint class which implements the shape function associated with a point...
Implements the geometry of pyramid element. Geometry.
Definition: pzgeopyramid.h:24
int ClassId() const override
Contains the TPZGeoCube class which implements the geometry of hexahedra element. ...
Contains the TPZGeoPoint class which implements the geometry of a point element or 0-D element...
virtual TPZGeoEl * Clone(TPZGeoMesh &DestMesh) const override
Implements the geometry of a point element. Geometry.
Definition: pzgeopoint.h:39
Implements the geometry of a triangle element. Geometry.
Definition: pzgeotriangle.h:28
Contains TPZShapePrism class which implements the shape functions of a prism element.
Contains the TPZRefTriangle class which implements the uniform refinement of a geometric triangular e...
Implements the geometry of a tetrahedral element. Geometry.
Contains the TPZRefTetrahedra class which implements the uniform refinement of a geometric tetrahedra...
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
MElementType
Define the element types.
Definition: pzeltype.h:52
virtual TPZGeoEl * CreateGeoElementMapped(MElementType type, TPZVec< int64_t > &nodeindexes, int matid, int64_t &index)
Generic method for creating a geometric element. Putting this method centrally facilitates the modifi...
Definition: pzgmesh.cpp:1229
Contains the TPZRefLinear class which implements the uniform refinement of a geometric linear element...
Implements the geometry of a prism element. Geometry.
Definition: pzgeoprism.h:27
Contains TPZShapePiram class which implements the shape functions of a pyramid element.
Contains the TPZGeoPyramid class which implements the geometry of pyramid element.
Contains the TPZGeoPrism class which implements the geometry of a prism element.
Contains declaration of TPZGeoElement class which implements a generic geometric element with a unifo...
Groups all classes which model the geometry.
Definition: pzgeopoint.cpp:18
Implements the geometry of hexahedra element. Geometry.
Definition: TPZGeoCube.h:28
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
Contains the TPZRefCube class which implements the uniform refinement of a geometric hexahedral eleme...
Contains the TPZRefPoint class which implements the uniform refinement of a geometric point element...
Contains TPZShapeTriang class which implements the shape functions of a triangular element...