/*********************************************************************/ /* File: recurisve_pol_trig.cpp */ /* Author: Almedin Becirovic */ /* Date: 14. Apr. 2003 */ /*********************************************************************/ #include namespace ngfem { using namespace ngfem; double TrigExtensionOptimal :: coefs[SIZE][5]; bool TrigExtensionOptimal :: initialized = 0; TrigExtensionOptimal :: TrigExtensionOptimal () { // cout<<"TrigEXOpt"< int TetShapesFaceOpt1 :: Calc3 (int n, Sx x, Sy y, Sz z, T & values) { int ii = 0, i, j, k; ArrayMem polx(n+1), poly(n+1); const IntegrationRule & rule = GetIntegrationRules().SelectIntegrationRule (ET_TRIG, n); for (int ix = 0; ix <= n-3; ix++) for (j = 0; j <= n-3-ix; j++) values[ii++] = 0; for (i = 0; i < rule.GetNIP(); i++) { ii = 0; const IntegrationPoint & ip = rule.GetIP(i); Sx hx = x + z * (-1+2*ip(0)+ip(1)); Sy hy = y + z * ip(1); Sx bub = hy * (1-hx-hy) * (1+hx-hy); ScaledJacobiPolynomial (n-3, x, 1-y, 2, 2, polx); Sx fac = 2 * bub * ip.Weight(); // / (z*z); for (int ix = 0; ix <= n-3; ix++) { ScaledJacobiPolynomial (n-3, 2*y-1, 1, 2*ix+5, 2, poly); for (j = 0; j <= n-3-ix; j++) values[ii++] += fac * polx[ix] * poly[j]; } } return ii; } template <> int TetShapesFaceOpt1 :: Calc3 (int n, double x, double y, double z, double *& values); template <> int TetShapesFaceOpt1 :: Calc3, AutoDiff<3>, AutoDiff<3>, AutoDiff<3>*> (int n, AutoDiff<3> x, AutoDiff<3> y, AutoDiff<3> z, AutoDiff<3> *& values); */ }