27 fOrder = ComputingCubatureRuleForPyramid(order);
31 fLocationKsi.Resize(0);
32 fLocationEta.Resize(0);
33 fLocationZeta.Resize(0);
39 if (i>=0 && i<fNumInt){
40 Points[0] = fLocationKsi[i];
41 Points[1] = fLocationEta[i];
42 Points[2] = fLocationZeta[i];
46 PZError <<
"ERROR(TPZIntRuleP3D::loc) Out of bounds!!\n";
54 PZError <<
"ERROR(TPZIntRuleP3D::w) Out of bounds!!\n";
62 return 0.5L * (ksi + 1.0L);
66 return ((1.0L - zeta)*ksi);
77 fLocationKsi.Resize(0);
78 fLocationEta.Resize(0);
79 fLocationZeta.Resize(0);
81 long double wi, wj, wk, xi, xj, xk;
90 int plane_order = (int)(0.51*(order+2));
91 int zeta_order = plane_order + 1;
92 fNumInt = plane_order * plane_order * zeta_order;
94 fWeight.
Resize(fNumInt,0.0L);
95 fLocationKsi.Resize(fNumInt,0.0L);
96 fLocationEta.Resize(fNumInt,0.0L);
97 fLocationZeta.Resize(fNumInt,0.0L);
101 leg_w.
Resize(plane_order,0.0L);
102 leg_x.
Resize(plane_order,0.0L);
107 jacobi_w.
Resize(zeta_order,0.0L);
108 jacobi_x.
Resize(zeta_order,0.0L);
115 for(k=0;k<zeta_order;k++) {
116 xk = (jacobi_x[k] + 1.0L) / 2.0L;
117 wk = jacobi_w[k] / 2.0L;
118 for(j=0;j<plane_order;j++) {
121 for ( i = 0; i < plane_order; i++ )
125 fWeight[l] = wi * wj * wk / 4.0L / volume;
126 fLocationKsi[l] = xi * ( 1.0L - xk );
127 fLocationEta[l] = xj * ( 1.0L - xk );
128 fLocationZeta[l] = xk;
134 for(k=0;k<fNumInt;k++)
136 fWeight[k] *= volume;
143 out <<
"\nQuadrature For Pyramid - " <<
" \tNumber of points : " << fNumInt << std::endl;
144 for(i=0;i<fNumInt;i++) {
145 out << i <<
" : \t" << fLocationKsi[i] <<
" \t" << fLocationEta[i] <<
" \t" << fLocationZeta[i] <<
" \t" << fWeight[i] << std::endl;
TPZIntRuleP3D(int &order)
Constructor of cubature rule for pyramid.
Templated vector implementation.
int ComputingGaussJacobiQuadrature(int order, long double alpha, long double beta)
Computes the points and weights for Gauss Lobatto Quadrature over the parametric 1D element It is to...
long double TransformM1AndP1ToM1PZAndP1MZ(long double zeta, long double ksi)
Auxiliar function to compute the linear transformation from [-1,1] to [-(1-z),(1-z)] ; Tz(ksi) = (1-z...
long double TransformM1AndP1ToZeroP1(long double ksi)
Auxiliar function to compute the linear transformation [-1,1] into [0,1] : T(ksi) = 1/2 * ksi + 1/2...
void Print(std::ostream &out=std::cout)
Prints the number of integration points, all points and weights (as one dimension) ...
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
Contains the TPZIntRuleP3D class which defines the integration rule for pyramid.
REAL W(int i) const
Returns weight for the ith point.
int ComputingCubatureRuleForPyramid(int order)
Computes the points and weights for pyramid cubature rule as first version of PZ. ...
~TPZIntRuleP3D()
Default destructor.
Contains the TPZGaussRule class which implements the Gaussian quadrature.
void Loc(int i, TPZVec< REAL > &pos) const
Returns location of the ith point.
Implements the Gaussian quadrature. Numerical Integration Abstract class.
int ComputingGaussLegendreQuadrature(int order)
Computes the points and weights for Gauss Legendre Quadrature over the parametric 1D element [-1...
#define PZError
Defines the output device to error messages and the DebugStop() function.