NeoPZ
pzshapelinear.h
Go to the documentation of this file.
1 
6 #ifndef SHAPELINEARHPP
7 #define SHAPELINEARHPP
8 
9 #include "pzfmatrix.h"
10 #include "pzstack.h"
11 #include "pztrnsform.h"
12 #include "tpzline.h"
13 #include "pzshtmat.h"
14 
15 #ifdef _AUTODIFF
16 #include "fadType.h"
17 #endif
18 
20 namespace pzshape {
21 
34 
35  public:
36 
48  static void (*fOrthogonal)(REAL x,int num,TPZFMatrix<REAL> & phi,TPZFMatrix<REAL> & dphi);
49 
57  static void Chebyshev(REAL x,int num,TPZFMatrix<REAL> & phi,TPZFMatrix<REAL> & dphi);
58 
66  static void Expo(REAL x,int num,TPZFMatrix<REAL> & phi,TPZFMatrix<REAL> & dphi);
67 
75  static void Legendre(REAL x,int num,TPZFMatrix<REAL> & phi,TPZFMatrix<REAL> & dphi);
76 
80  static void Jacobi(REAL x,int num,TPZFMatrix<REAL> & phi,TPZFMatrix<REAL> & dphi);
81 
85  static REAL JacobiA;
86  static REAL JacobiB;
87 
91  static void Hermite(REAL x,int num,TPZFMatrix<REAL> & phi,TPZFMatrix<REAL> & dphi);
92 
97  static void Legendre(REAL x,int num,TPZFMatrix<REAL> & phi,TPZFMatrix<REAL> & dphi, int nderiv);
98 
99 #ifdef _AUTODIFF
100 
107  static void (*FADfOrthogonal)(FADREAL& x,int num,TPZVec<FADREAL> &phi);
115  static void Chebyshev(FADREAL & x,int num,TPZVec<FADREAL> &phi);
116 #endif
117 
120 public:
121 
135  static void Shape(TPZVec<REAL> &pt, TPZVec<int64_t> &id, TPZVec<int> &order,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi);
136 
137  static void ShapeCorner(TPZVec<REAL> &pt,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi);
138 
139  static void SideShape(int side, TPZVec<REAL> &pt, TPZVec<int64_t> &id, TPZVec<int> &order,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi);
140 
144  static void ShapeOrder(TPZVec<int64_t> &id, TPZVec<int> &order, TPZGenMatrix<int> &shapeorders);//, TPZVec<int64_t> &sides
145 
150  static void SideShapeOrder(int side, TPZVec<int64_t> &id, int order, TPZGenMatrix<int> &shapeorders);
151 
152 
168  static void ShapeInternal(TPZVec<REAL> &x,int ord,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi,int transformation_index);
169 
185  static void ShapeInternal(TPZVec<REAL> &x,int ord,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi);
186 
193  static void ShapeGenerating(TPZVec<REAL> &pt, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi);
194 
195 #ifdef _AUTODIFF
196 
210  static void ShapeInternal(FADREAL & x,int num,TPZVec<FADREAL> & phi,int transformation_index);
211 #endif
212 
223  static void TransformPoint1d(int transid,REAL in,REAL &out);
224 #ifdef _AUTODIFF
225 
232  /*
233  * The transformation applied to compensate for odd/even brokerage between elements can also
234  * be viewed by the transformation of a variational parameter.
235  */
236  static void TransformPoint1d(int transid,FADREAL & in,FADREAL &out);
237 #endif
238 
246  static void TransformDerivative1d(int transid,int num,TPZFMatrix<REAL> &in);
247 
256  static int GetTransformId1d(TPZVec<int64_t> &id);
257 
265  static int NConnectShapeF(int side, int order);
266 
273  static int NShapeF(TPZVec<int> &order);
274  static void TransformPoint1d(int transid,double &val) ;
275  static TPZTransform<REAL> ParametricTransform(int transid);
276  static void ShapeInternal(int side, TPZVec<REAL> &x, int order,TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi);
277 
278  };
279 
280 };
281 
282 #endif
283 
static void Legendre(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Legendre orthogonal polynomial, computes num orthogonal functions at the point x. ...
static void Chebyshev(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Chebyshev orthogonal polynomial, computes num orthogonal functions at the point x.
static void(* fOrthogonal)(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Pointer to function which returns num orthogonal functions at the point x.
Definition: pzshapelinear.h:48
static void Hermite(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Hermite orthogonal polynomials.
static void SideShape(int side, TPZVec< REAL > &pt, TPZVec< int64_t > &id, TPZVec< int > &order, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
static void ShapeInternal(TPZVec< REAL > &x, int ord, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, int transformation_index)
Computes the values of the orthogonal shapefunctions before multiplying them by the corner shapefunct...
groups all classes dedicated to the computation of shape functions
Definition: pzshapeextend.h:16
static void Shape(TPZVec< REAL > &pt, TPZVec< int64_t > &id, TPZVec< int > &order, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Functions which computes the shapefunctions of a one-d element.
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
REAL val(STATE &number)
Returns value of the variable.
Definition: pzartdiff.h:23
static int NShapeF(TPZVec< int > &order)
Total number of shapefunctions, considering the order of interpolation of the element.
static void Expo(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Exponential polynomial, computes num orthogonal functions at the point x.
static void SideShapeOrder(int side, TPZVec< int64_t > &id, int order, TPZGenMatrix< int > &shapeorders)
returns the polynomial order in the natural ksi, eta of the internal shapefunctions of a side ...
Contains TPZMatrixclass which implements full matrix (using column major representation).
static void TransformDerivative1d(int transid, int num, TPZFMatrix< REAL > &in)
Applies the transformation on the values of the derivatives of the shape functions of the internal sh...
static void Jacobi(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Jacobi orthogonal polynomials.
static TPZTransform< REAL > ParametricTransform(int transid)
static REAL JacobiA
Jacobi parameters orthogonal polynomials.
Definition: pzshapelinear.h:85
Defines the topology of a line element. Topology Sides 0 and 1 are vertices, side 2 is the line...
Definition: tpzline.h:38
Implements generic class which holds a matrix of objects. Matrix.
Definition: pzshtmat.h:18
A simple stack.
static void ShapeOrder(TPZVec< int64_t > &id, TPZVec< int > &order, TPZGenMatrix< int > &shapeorders)
returns the polynomial order in the natural ksi, eta of the side associated with each shapefunction ...
static void ShapeCorner(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
static void ShapeGenerating(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Computes the generating shape functions for a quadrilateral element.
Contains TPZGenMatrix class which implements generic class which holds a matrix of objects...
Contains the TPZTransform<> class which implements an affine transformation between points in paramet...
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
Contains the TPZLine class which defines the topology of a line element.
static int GetTransformId1d(TPZVec< int64_t > &id)
Computes the id of the transformation which will be applied on the parameter of the element ...
static void TransformPoint1d(int transid, REAL in, REAL &out)
Computes the transformation applied to the variational parameter of the one-d element.
static int NConnectShapeF(int side, int order)
Number of shapefunctions of the connect associated with the side, considering the order of interpolat...
Implements the shape functions of a linear (1D) element. Shape.
Definition: pzshapelinear.h:33