69 unsigned int numSegPoints = 6;
77 basisKeyDir1, segGeom.get());
79 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
80 CollExp.push_back(Exp);
90 for (
int i = 0; i < coeffs.size(); ++i)
97 Exp->BwdTrans(coeffs, phys1);
100 double epsilon = 1.0e-8;
101 for (
int i = 0; i < phys1.size(); ++i)
103 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
121 unsigned int numSegPoints = 6;
129 basisKeyDir1, segGeom.get());
131 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
134 for (
int i = 0; i < nelmts; ++i)
136 CollExp.push_back(Exp);
147 for (
int i = 0; i < coeffs.size(); ++i)
154 for (
int i = 0; i < nelmts; ++i)
156 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
157 tmp = phys1 + i * Exp->GetTotPoints());
161 double epsilon = 1.0e-8;
162 for (
int i = 0; i < phys1.size(); ++i)
164 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
182 unsigned int numSegPoints = 6;
190 basisKeyDir1, segGeom.get());
192 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
193 CollExp.push_back(Exp);
203 for (
int i = 0; i < coeffs.size(); ++i)
210 Exp->BwdTrans(coeffs, phys1);
213 double epsilon = 1.0e-8;
214 for (
int i = 0; i < phys1.size(); ++i)
216 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
234 unsigned int numSegPoints = 6;
242 basisKeyDir1, segGeom.get());
244 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
247 for (
int i = 0; i < nelmts; ++i)
249 CollExp.push_back(Exp);
260 for (
int i = 0; i < coeffs.size(); ++i)
267 for (
int i = 0; i < nelmts; ++i)
269 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
270 tmp = phys1 + i * Exp->GetTotPoints());
274 double epsilon = 1.0e-8;
275 for (
int i = 0; i < phys1.size(); ++i)
277 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
295 unsigned int numSegPoints = 6;
303 basisKeyDir1, segGeom.get());
305 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
308 for (
int i = 0; i < nelmts; ++i)
310 CollExp.push_back(Exp);
321 for (
int i = 0; i < coeffs.size(); ++i)
328 for (
int i = 0; i < nelmts; ++i)
330 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
331 tmp = phys1 + i * Exp->GetTotPoints());
335 double epsilon = 1.0e-8;
336 for (
int i = 0; i < phys1.size(); ++i)
338 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
356 unsigned int numSegPoints = 6;
364 basisKeyDir1, segGeom.get());
366 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
369 for (
int i = 0; i < nelmts; ++i)
371 CollExp.push_back(Exp);
383 for (
int i = 0; i < coeffs.size(); ++i)
390 for (
int i = 0; i < nelmts; ++i)
392 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
393 tmp = phys1 + i * Exp->GetTotPoints());
397 double epsilon = 1.0e-8;
398 for (
int i = 0; i < phys1.size(); ++i)
400 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
425 basisKeyDir1, segGeom.get());
427 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
430 for (
int i = 0; i < nelmts; ++i)
432 CollExp.push_back(Exp);
442 const int nq = Exp->GetTotPoints();
443 const int nc = Exp->GetNcoeffs();
449 Exp->GetCoords(xc, yc);
451 for (
int i = 0; i < nq; ++i)
453 phys[i] = sin(xc[i]);
455 Exp->IProductWRTBase(phys, coeffs1);
457 for (
int i = 1; i < nelmts; ++i)
460 Exp->IProductWRTBase(phys + i * nq, tmp = coeffs1 + i * nc);
464 double epsilon = 1.0e-8;
465 for (
int i = 0; i < coeffs1.size(); ++i)
467 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
492 basisKeyDir1, segGeom.get());
494 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
497 for (
int i = 0; i < nelmts; ++i)
499 CollExp.push_back(Exp);
509 const int nq = Exp->GetTotPoints();
510 const int nc = Exp->GetNcoeffs();
516 Exp->GetCoords(xc, yc);
518 for (
int i = 0; i < nq; ++i)
520 phys[i] = sin(xc[i]);
522 Exp->IProductWRTBase(phys, coeffs1);
524 for (
int i = 1; i < nelmts; ++i)
527 Exp->IProductWRTBase(phys + i * nq, tmp = coeffs1 + i * nc);
531 double epsilon = 1.0e-8;
532 for (
int i = 0; i < coeffs1.size(); ++i)
534 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
559 basisKeyDir1, segGeom.get());
561 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
564 for (
int i = 0; i < nelmts; ++i)
566 CollExp.push_back(Exp);
576 const int nq = Exp->GetTotPoints();
577 const int nc = Exp->GetNcoeffs();
583 Exp->GetCoords(xc, yc);
585 for (
int i = 0; i < nq; ++i)
587 phys[i] = sin(xc[i]);
589 Exp->IProductWRTBase(phys, coeffs1);
591 for (
int i = 1; i < nelmts; ++i)
594 Exp->IProductWRTBase(phys + i * nq, tmp = coeffs1 + i * nc);
598 double epsilon = 1.0e-8;
599 for (
int i = 0; i < coeffs1.size(); ++i)
601 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
626 basisKeyDir1, segGeom.get());
628 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
631 for (
int i = 0; i < nelmts; ++i)
633 CollExp.push_back(Exp);
644 const int nq = Exp->GetTotPoints();
645 const int nc = Exp->GetNcoeffs();
651 Exp->GetCoords(xc, yc);
653 for (
int i = 0; i < nq; ++i)
655 phys[i] = sin(xc[i]);
657 Exp->IProductWRTBase(phys, coeffs1);
659 for (
int i = 1; i < nelmts; ++i)
662 Exp->IProductWRTBase(phys + i * nq, tmp = coeffs1 + i * nc);
666 double epsilon = 1.0e-8;
667 for (
int i = 0; i < coeffs1.size(); ++i)
669 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
694 basisKeyDir1, segGeom.get());
696 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
697 CollExp.push_back(Exp);
706 const int nq = Exp->GetTotPoints();
712 Exp->GetCoords(xc, yc);
714 for (
int i = 0; i < nq; ++i)
716 phys[i] = sin(xc[i]);
719 Exp->PhysDeriv(phys, diff1);
722 double epsilon = 1.0e-8;
723 for (
int i = 0; i < diff1.size(); ++i)
725 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
750 basisKeyDir1, segGeom.get());
754 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
755 for (
int i = 0; i < nelmts; ++i)
757 CollExp.push_back(Exp);
767 const int nq = Exp->GetTotPoints();
775 for (
int i = 0; i < nq; ++i)
777 phys[i] = sin(xc[i]);
779 Exp->PhysDeriv(phys, diff1);
781 for (
int i = 1; i < nelmts; ++i)
784 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq);
789 double epsilon = 1.0e-8;
790 for (
int i = 0; i < diff1.size(); ++i)
792 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
793 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
794 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
819 basisKeyDir1, segGeom.get());
821 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
822 CollExp.push_back(Exp);
831 const int nq = Exp->GetTotPoints();
839 for (
int i = 0; i < nq; ++i)
841 phys[i] = sin(xc[i]);
844 Exp->PhysDeriv(phys, diff1);
847 double epsilon = 1.0e-8;
848 for (
int i = 0; i < diff1.size(); ++i)
850 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
875 basisKeyDir1, segGeom.get());
879 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
880 for (
int i = 0; i < nelmts; ++i)
882 CollExp.push_back(Exp);
892 const int nq = Exp->GetTotPoints();
900 for (
int i = 0; i < nq; ++i)
902 phys[i] = sin(xc[i]);
904 Exp->PhysDeriv(phys, diff1);
906 for (
int i = 1; i < nelmts; ++i)
909 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq);
914 double epsilon = 1.0e-8;
915 for (
int i = 0; i < diff1.size(); ++i)
917 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
918 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
919 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
944 basisKeyDir1, segGeom.get());
948 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
949 for (
int i = 0; i < nelmts; ++i)
951 CollExp.push_back(Exp);
961 const int nq = Exp->GetTotPoints();
969 for (
int i = 0; i < nq; ++i)
971 phys[i] = sin(xc[i]);
973 Exp->PhysDeriv(phys, diff1);
975 for (
int i = 1; i < nelmts; ++i)
978 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq);
983 double epsilon = 1.0e-8;
984 for (
int i = 0; i < diff1.size(); ++i)
986 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
987 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
988 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1013 basisKeyDir1, segGeom.get());
1017 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1018 for (
int i = 0; i < nelmts; ++i)
1020 CollExp.push_back(Exp);
1031 const int nq = Exp->GetTotPoints();
1039 for (
int i = 0; i < nq; ++i)
1041 phys[i] = sin(xc[i]);
1043 Exp->PhysDeriv(phys, diff1);
1045 for (
int i = 1; i < nelmts; ++i)
1048 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq);
1053 double epsilon = 1.0e-8;
1054 for (
int i = 0; i < diff1.size(); ++i)
1056 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
1057 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
1058 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1083 basisKeyDir1, segGeom.get());
1087 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1088 for (
int i = 0; i < nelmts; ++i)
1090 CollExp.push_back(Exp);
1101 const int nq = Exp->GetTotPoints();
1107 Exp->GetCoords(xc, yc);
1109 for (
int i = 0; i < nq; ++i)
1111 phys[i] = sin(xc[i]) * cos(yc[i]);
1113 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nelmts * nq);
1115 for (
int i = 1; i < nelmts; ++i)
1118 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq,
1119 tmp1 = diff1 + (nelmts + i) * nq);
1123 tmp = diff2 + nelmts * nq);
1125 double epsilon = 1.0e-8;
1126 for (
int i = 0; i < diff1.size(); ++i)
1128 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
1129 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
1130 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1155 basisKeyDir1, segGeom.get());
1159 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1160 for (
int i = 0; i < nelmts; ++i)
1162 CollExp.push_back(Exp);
1173 const int nq = Exp->GetTotPoints();
1179 Exp->GetCoords(xc, yc, zc);
1181 for (
int i = 0; i < nq; ++i)
1183 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1185 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nelmts * nq,
1186 tmp1 = diff1 + 2 * nelmts * nq);
1188 for (
int i = 1; i < nelmts; ++i)
1191 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq,
1192 tmp1 = diff1 + (nelmts + i) * nq,
1193 tmp2 = diff1 + (2 * nelmts + i) * nq);
1197 tmp = diff2 + nelmts * nq, tmp1 = diff2 + 2 * nelmts * nq);
1199 double epsilon = 1.0e-8;
1200 for (
int i = 0; i < diff1.size(); ++i)
1202 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
1203 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
1204 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1222 unsigned int numSegPoints = 6;
1230 basisKeyDir1, segGeom.get());
1232 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1233 CollExp.push_back(Exp);
1242 const int nq = Exp->GetTotPoints();
1243 const int nm = Exp->GetNcoeffs();
1252 for (
int i = 0; i < nq; ++i)
1254 phys1[i] = sin(xc[i]);
1258 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1262 double epsilon = 1.0e-8;
1263 for (
int i = 0; i < coeffs1.size(); ++i)
1265 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1266 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1267 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1285 unsigned int numSegPoints = 6;
1293 basisKeyDir1, segGeom.get());
1295 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1298 for (
int i = 0; i < nelmts; ++i)
1300 CollExp.push_back(Exp);
1310 const int nq = Exp->GetTotPoints();
1311 const int nm = Exp->GetNcoeffs();
1319 for (
int i = 0; i < nq; ++i)
1321 phys1[i] = sin(xc[i]);
1323 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1325 for (
int i = 1; i < nelmts; ++i)
1330 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1335 double epsilon = 1.0e-8;
1336 for (
int i = 0; i < coeffs1.size(); ++i)
1338 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1339 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1340 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1358 unsigned int numSegPoints = 6;
1366 basisKeyDir1, segGeom.get());
1368 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1369 CollExp.push_back(Exp);
1378 const int nq = Exp->GetTotPoints();
1379 const int nm = Exp->GetNcoeffs();
1388 for (
int i = 0; i < nq; ++i)
1390 phys1[i] = sin(xc[i]);
1394 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1398 double epsilon = 1.0e-8;
1399 for (
int i = 0; i < coeffs1.size(); ++i)
1401 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1402 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1403 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1421 unsigned int numSegPoints = 6;
1429 basisKeyDir1, segGeom.get());
1431 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1434 for (
int i = 0; i < nelmts; ++i)
1436 CollExp.push_back(Exp);
1446 const int nq = Exp->GetTotPoints();
1447 const int nm = Exp->GetNcoeffs();
1455 for (
int i = 0; i < nq; ++i)
1457 phys1[i] = sin(xc[i]);
1459 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1461 for (
int i = 1; i < nelmts; ++i)
1466 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1471 double epsilon = 1.0e-8;
1472 for (
int i = 0; i < coeffs1.size(); ++i)
1474 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1475 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1476 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1494 unsigned int numSegPoints = 6;
1502 basisKeyDir1, segGeom.get());
1504 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1505 CollExp.push_back(Exp);
1514 const int nq = Exp->GetTotPoints();
1515 const int nm = Exp->GetNcoeffs();
1524 for (
int i = 0; i < nq; ++i)
1526 phys1[i] = sin(xc[i]);
1530 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1534 double epsilon = 1.0e-8;
1535 for (
int i = 0; i < coeffs1.size(); ++i)
1537 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1538 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1539 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1557 unsigned int numSegPoints = 6;
1565 basisKeyDir1, segGeom.get());
1567 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1570 for (
int i = 0; i < nelmts; ++i)
1572 CollExp.push_back(Exp);
1582 const int nq = Exp->GetTotPoints();
1583 const int nm = Exp->GetNcoeffs();
1591 for (
int i = 0; i < nq; ++i)
1593 phys1[i] = sin(xc[i]);
1595 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1597 for (
int i = 1; i < nelmts; ++i)
1602 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1607 double epsilon = 1.0e-8;
1608 for (
int i = 0; i < coeffs1.size(); ++i)
1610 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1611 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1612 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1617 TestSegIProductWRTDerivBase_SumFac_UniformP_MultiElmt_CoordimTwo)
1631 unsigned int numSegPoints = 6;
1639 basisKeyDir1, segGeom.get());
1641 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1644 for (
int i = 0; i < nelmts; ++i)
1646 CollExp.push_back(Exp);
1656 const int nq = Exp->GetTotPoints();
1657 const int nm = Exp->GetNcoeffs();
1664 Exp->GetCoords(xc, yc);
1666 for (
int i = 0; i < nq; ++i)
1668 phys1[i] = sin(xc[i]);
1669 phys2[i] = cos(yc[i]);
1671 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1672 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
1674 for (
int i = 1; i < nelmts; ++i)
1680 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1681 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
1683 Vmath::Vadd(nelmts * nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
1687 double epsilon = 1.0e-8;
1688 for (
int i = 0; i < coeffs1.size(); ++i)
1690 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1691 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1692 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1710 unsigned int numSegPoints = 6;
1718 basisKeyDir1, segGeom.get());
1720 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1723 for (
int i = 0; i < nelmts; ++i)
1725 CollExp.push_back(Exp);
1736 const int nq = Exp->GetTotPoints();
1737 const int nm = Exp->GetNcoeffs();
1745 for (
int i = 0; i < nq; ++i)
1747 phys1[i] = sin(xc[i]);
1749 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1751 for (
int i = 1; i < nelmts; ++i)
1756 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1761 double epsilon = 1.0e-8;
1762 for (
int i = 0; i < coeffs1.size(); ++i)
1764 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1765 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1766 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1771 TestSegIProductWRTDerivBase_MatrixFree_UniformP_MultiElmt_CoordimTwo)
1785 unsigned int numSegPoints = 6;
1793 basisKeyDir1, segGeom.get());
1795 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1798 for (
int i = 0; i < nelmts; ++i)
1800 CollExp.push_back(Exp);
1811 const int nq = Exp->GetTotPoints();
1812 const int nm = Exp->GetNcoeffs();
1819 Exp->GetCoords(xc, yc);
1821 for (
int i = 0; i < nq; ++i)
1823 phys1[i] = sin(xc[i]);
1824 phys2[i] = cos(yc[i]);
1826 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1827 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
1829 for (
int i = 1; i < nelmts; ++i)
1835 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1836 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
1838 Vmath::Vadd(nelmts * nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
1842 double epsilon = 1.0e-8;
1843 for (
int i = 0; i < coeffs1.size(); ++i)
1845 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1846 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1847 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1865 unsigned int numSegPoints = 6;
1873 basisKeyDir1, segGeom.get());
1875 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1876 CollExp.push_back(Exp);
1888 const int nq = Exp->GetTotPoints();
1893 Exp->GetCoords(xc, yc);
1895 for (
int i = 0; i < nq; ++i)
1897 phys[i] = pow(xc[i], 3) + pow(yc[i], 3);
1909 double epsilon = 1.0e-8;
1911 for (
int i = 0; i < nq1; ++i)
1913 NekDouble exact = pow(xc1[i], 3) + pow(yc1[i], 3);
1914 phys1[i] = (fabs(phys1[i]) < 1e-14) ? 0.0 : phys1[i];
1915 exact = (fabs(exact) < 1e-14) ? 0.0 : exact;
1916 BOOST_CHECK_CLOSE(phys1[i], exact, epsilon);
1934 unsigned int numSegPoints = 6;
1942 basisKeyDir1, segGeom.get());
1944 std::vector<LocalRegions::ExpansionSharedPtr> CollExp;
1945 CollExp.push_back(Exp);
1957 const int nq = Exp->GetTotPoints();
1962 Exp->GetCoords(xc, yc);
1964 for (
int i = 0; i < nq; ++i)
1966 yc[i] = (fabs(yc[i]) < 1e-14) ? 0.0 : yc[i];
1967 phys[i] = pow(xc[i], 3) + pow(yc[i], 3);
1979 double epsilon = 1.0e-8;
1981 for (
int i = 0; i < nq1; ++i)
1983 xc1[i] = (fabs(xc1[i]) < 1e-14) ? 0.0 : xc1[i];
1984 yc1[i] = (fabs(yc1[i]) < 1e-14) ? 0.0 : yc1[i];
1985 NekDouble exact = pow(xc1[i], 3) + pow(yc1[i], 3);
1986 phys1[i] = (fabs(phys1[i]) < 1e-14) ? 0.0 : phys1[i];
1987 exact = (fabs(exact) < 1e-14) ? 0.0 : exact;
1988 BOOST_CHECK_CLOSE(phys1[i], exact, epsilon);