NeoPZ
tpzquadratictrig.h
Go to the documentation of this file.
1 
6 #ifndef TPZQUADRATICTRIG_H
7 #define TPZQUADRATICTRIG_H
8 
9 #include "pznoderep.h"
10 #include "tpztriangle.h"
11 
12 class TPZGeoMesh;
13 
14 namespace pzgeom {
15 
22  class TPZQuadraticTrig : public pzgeom::TPZNodeRep<6,pztopology::TPZTriangle> {
23 
24  public:
27  enum {NNodes = 6};
28 
29  public:
30 int ClassId() const override;
31 
32 
33  //irtual void ParametricDomainNodeCoord(int node, TPZVec<REAL> &nodeCoord);
34 
36  static bool IsLinearMapping(int side)
37  {
38  return false;
39  }
40 
45  }
49  }
51  TPZQuadraticTrig(const TPZQuadraticTrig &cp,std::map<int64_t,int64_t> & gl2lcNdMap) : TPZRegisterClassId(&TPZQuadraticTrig::ClassId),
52  pzgeom::TPZNodeRep<NNodes,pztopology::TPZTriangle>(cp,gl2lcNdMap) {
53  }
57  }
61  }
63  static std::string TypeName() { return "Triangle";}
64 
65  // /**
66  // * @brief Method which creates a geometric boundary condition
67  // * element based on the current geometric element,
68  // * a side and a boundary condition number
69  // */
70  // static TPZGeoEl * CreateBCGeoEl(TPZGeoEl *orig,int side,int bc);
71 
73  static void Shape(TPZVec<REAL> &loc,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi){
74  TShape(loc, phi, dphi);
75  }
76 
77 
78  /* brief compute the coordinate of a point given in parameter space */
79 // template<class T>
80 // void X(const TPZGeoEl &gel,TPZVec<T> &loc,TPZVec<T> &result) const
81 // {
82 // TPZFNMatrix<3*NNodes> coord(3,NNodes);
83 // CornerCoordinates(gel, coord);
84 // X(coord,loc,result);
85 // }
86 
88 // template<class T>
89 // void GradX(const TPZGeoEl &gel, TPZVec<T> &loc, TPZFMatrix<T> &gradx) const
90 // {
91 // TPZFNMatrix<3*NNodes> coord(3,NNodes);
92 // CornerCoordinates(gel, coord);
93 // GradX(coord,loc,gradx);
94 // }
95 
96  template<class T>
97  static void TShape(const TPZVec<T> &param,TPZFMatrix<T> &phi,TPZFMatrix<T> &dphi);
98 
99  template<class T>
100  static void X(const TPZFMatrix<REAL> &coord, TPZVec<T> &par, TPZVec< T > &result);
101 
103  template<class T>
104  static void GradX(const TPZFMatrix<REAL> &nodes,TPZVec<T> &loc, TPZFMatrix<T> &gradx);
105 
106  public:
107  // /** @brief Creates a geometric element according to the type of the father element */
108  // static TPZGeoEl *CreateGeoElement(TPZGeoMesh &mesh, MElementType type,
109  // TPZVec<int64_t>& nodeindexes,
110  // int matid, int64_t& index);
111 
112  static void InsertExampleElement(TPZGeoMesh &gmesh, int matid, TPZVec<REAL> &lowercorner, TPZVec<REAL> &size);
113 
114  };
115 
116 };
117 
118 #endif
static std::string TypeName()
Returns the type name of the element.
Defines the topology of a triangle element. Topology Sides 0 to 2 are vertices, sides 3 to 5 are line...
Definition: tpztriangle.h:35
static void InsertExampleElement(TPZGeoMesh &gmesh, int matid, TPZVec< REAL > &lowercorner, TPZVec< REAL > &size)
Creates a geometric element according to the type of the father element.
pztopology::TPZTriangle Top
TPZTriangle()
Default constructor.
Definition: tpztriangle.h:46
TPZQuadraticTrig(const TPZQuadraticTrig &cp, TPZGeoMesh &)
Copy constructor.
Defines a triangular geometric element with quadratic map. Geometry.
Contains the TPZTriangle class which defines the topology of a triangle.
int ClassId() const override
CreateGeoElement -> TPZQuadraticTrig.
Groups all classes defining the structure of the master element.
Definition: PrismExtend.cpp:15
static bool IsLinearMapping(int side)
It is a quadratic mapping.
static void Shape(TPZVec< REAL > &loc, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Method which creates a geometric boundary condition element based on the current geometric element...
Contains the TPZNodeRep class which implements ... Clase intermediaria que guarda.
static void GradX(const TPZFMatrix< REAL > &nodes, TPZVec< T > &loc, TPZFMatrix< T > &gradx)
Compute gradient of X mapping from element nodes and local parametric coordinates.
Implements ... Geometry Topology.
Definition: pznoderep.h:40
TPZQuadraticTrig()
Default constructor.
TPZQuadraticTrig(const TPZQuadraticTrig &cp, std::map< int64_t, int64_t > &gl2lcNdMap)
Copy constructor for node map given.
TPZQuadraticTrig(TPZVec< int64_t > &nodeindexes)
Constructor for node indexes given.
static void X(const TPZFMatrix< REAL > &coord, TPZVec< T > &par, TPZVec< T > &result)
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
static void TShape(const TPZVec< T > &param, TPZFMatrix< T > &phi, TPZFMatrix< T > &dphi)
Compute gradient of x mapping from local parametric coordinates.
TPZQuadraticTrig(const TPZQuadraticTrig &cp)
Copy constructor.
Groups all classes which model the geometry.
Definition: pzgeopoint.cpp:18