70 unsigned int numSegPoints = 6;
78 basisKeyDir1, segGeom.get());
80 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
81 CollExp.push_back(Exp);
91 for (
int i = 0; i < coeffs.size(); ++i)
98 Exp->BwdTrans(coeffs, phys1);
101 double epsilon = 1.0e-8;
102 for (
int i = 0; i < phys1.size(); ++i)
104 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
122 unsigned int numSegPoints = 6;
130 basisKeyDir1, segGeom.get());
132 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
135 for (
int i = 0; i < nelmts; ++i)
137 CollExp.push_back(Exp);
148 for (
int i = 0; i < coeffs.size(); ++i)
155 for (
int i = 0; i < nelmts; ++i)
157 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
158 tmp = phys1 + i * Exp->GetTotPoints());
162 double epsilon = 1.0e-8;
163 for (
int i = 0; i < phys1.size(); ++i)
165 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
183 unsigned int numSegPoints = 6;
191 basisKeyDir1, segGeom.get());
193 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
194 CollExp.push_back(Exp);
204 for (
int i = 0; i < coeffs.size(); ++i)
211 Exp->BwdTrans(coeffs, phys1);
214 double epsilon = 1.0e-8;
215 for (
int i = 0; i < phys1.size(); ++i)
217 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
235 unsigned int numSegPoints = 6;
243 basisKeyDir1, segGeom.get());
245 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
248 for (
int i = 0; i < nelmts; ++i)
250 CollExp.push_back(Exp);
261 for (
int i = 0; i < coeffs.size(); ++i)
268 for (
int i = 0; i < nelmts; ++i)
270 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
271 tmp = phys1 + i * Exp->GetTotPoints());
275 double epsilon = 1.0e-8;
276 for (
int i = 0; i < phys1.size(); ++i)
278 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
296 unsigned int numSegPoints = 6;
304 basisKeyDir1, segGeom.get());
306 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
309 for (
int i = 0; i < nelmts; ++i)
311 CollExp.push_back(Exp);
322 for (
int i = 0; i < coeffs.size(); ++i)
329 for (
int i = 0; i < nelmts; ++i)
331 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
332 tmp = phys1 + i * Exp->GetTotPoints());
336 double epsilon = 1.0e-8;
337 for (
int i = 0; i < phys1.size(); ++i)
339 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
357 unsigned int numSegPoints = 6;
365 basisKeyDir1, segGeom.get());
367 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
370 for (
int i = 0; i < nelmts; ++i)
372 CollExp.push_back(Exp);
384 for (
int i = 0; i < coeffs.size(); ++i)
391 for (
int i = 0; i < nelmts; ++i)
393 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
394 tmp = phys1 + i * Exp->GetTotPoints());
398 double epsilon = 1.0e-8;
399 for (
int i = 0; i < phys1.size(); ++i)
401 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
426 basisKeyDir1, segGeom.get());
428 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
431 for (
int i = 0; i < nelmts; ++i)
433 CollExp.push_back(Exp);
443 const int nq = Exp->GetTotPoints();
444 const int nc = Exp->GetNcoeffs();
450 Exp->GetCoords(xc, yc);
452 for (
int i = 0; i < nq; ++i)
454 phys[i] = sin(xc[i]);
456 Exp->IProductWRTBase(phys, coeffs1);
458 for (
int i = 1; i < nelmts; ++i)
461 Exp->IProductWRTBase(phys + i * nq, tmp = coeffs1 + i * nc);
465 double epsilon = 1.0e-8;
466 for (
int i = 0; i < coeffs1.size(); ++i)
468 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
493 basisKeyDir1, segGeom.get());
495 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
498 for (
int i = 0; i < nelmts; ++i)
500 CollExp.push_back(Exp);
510 const int nq = Exp->GetTotPoints();
511 const int nc = Exp->GetNcoeffs();
517 Exp->GetCoords(xc, yc);
519 for (
int i = 0; i < nq; ++i)
521 phys[i] = sin(xc[i]);
523 Exp->IProductWRTBase(phys, coeffs1);
525 for (
int i = 1; i < nelmts; ++i)
528 Exp->IProductWRTBase(phys + i * nq, tmp = coeffs1 + i * nc);
532 double epsilon = 1.0e-8;
533 for (
int i = 0; i < coeffs1.size(); ++i)
535 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
560 basisKeyDir1, segGeom.get());
562 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
565 for (
int i = 0; i < nelmts; ++i)
567 CollExp.push_back(Exp);
577 const int nq = Exp->GetTotPoints();
578 const int nc = Exp->GetNcoeffs();
584 Exp->GetCoords(xc, yc);
586 for (
int i = 0; i < nq; ++i)
588 phys[i] = sin(xc[i]);
590 Exp->IProductWRTBase(phys, coeffs1);
592 for (
int i = 1; i < nelmts; ++i)
595 Exp->IProductWRTBase(phys + i * nq, tmp = coeffs1 + i * nc);
599 double epsilon = 1.0e-8;
600 for (
int i = 0; i < coeffs1.size(); ++i)
602 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
627 basisKeyDir1, segGeom.get());
629 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
632 for (
int i = 0; i < nelmts; ++i)
634 CollExp.push_back(Exp);
645 const int nq = Exp->GetTotPoints();
646 const int nc = Exp->GetNcoeffs();
652 Exp->GetCoords(xc, yc);
654 for (
int i = 0; i < nq; ++i)
656 phys[i] = sin(xc[i]);
658 Exp->IProductWRTBase(phys, coeffs1);
660 for (
int i = 1; i < nelmts; ++i)
663 Exp->IProductWRTBase(phys + i * nq, tmp = coeffs1 + i * nc);
667 double epsilon = 1.0e-8;
668 for (
int i = 0; i < coeffs1.size(); ++i)
670 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
695 basisKeyDir1, segGeom.get());
697 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
698 CollExp.push_back(Exp);
707 const int nq = Exp->GetTotPoints();
713 Exp->GetCoords(xc, yc);
715 for (
int i = 0; i < nq; ++i)
717 phys[i] = sin(xc[i]);
720 Exp->PhysDeriv(phys, diff1);
723 double epsilon = 1.0e-8;
724 for (
int i = 0; i < diff1.size(); ++i)
726 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
751 basisKeyDir1, segGeom.get());
755 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
756 for (
int i = 0; i < nelmts; ++i)
758 CollExp.push_back(Exp);
768 const int nq = Exp->GetTotPoints();
776 for (
int i = 0; i < nq; ++i)
778 phys[i] = sin(xc[i]);
780 Exp->PhysDeriv(phys, diff1);
782 for (
int i = 1; i < nelmts; ++i)
785 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq);
790 double epsilon = 1.0e-8;
791 for (
int i = 0; i < diff1.size(); ++i)
793 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
794 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
795 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
820 basisKeyDir1, segGeom.get());
822 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
823 CollExp.push_back(Exp);
832 const int nq = Exp->GetTotPoints();
840 for (
int i = 0; i < nq; ++i)
842 phys[i] = sin(xc[i]);
845 Exp->PhysDeriv(phys, diff1);
848 double epsilon = 1.0e-8;
849 for (
int i = 0; i < diff1.size(); ++i)
851 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
876 basisKeyDir1, segGeom.get());
880 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
881 for (
int i = 0; i < nelmts; ++i)
883 CollExp.push_back(Exp);
893 const int nq = Exp->GetTotPoints();
901 for (
int i = 0; i < nq; ++i)
903 phys[i] = sin(xc[i]);
905 Exp->PhysDeriv(phys, diff1);
907 for (
int i = 1; i < nelmts; ++i)
910 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq);
915 double epsilon = 1.0e-8;
916 for (
int i = 0; i < diff1.size(); ++i)
918 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
919 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
920 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
945 basisKeyDir1, segGeom.get());
949 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
950 for (
int i = 0; i < nelmts; ++i)
952 CollExp.push_back(Exp);
962 const int nq = Exp->GetTotPoints();
970 for (
int i = 0; i < nq; ++i)
972 phys[i] = sin(xc[i]);
974 Exp->PhysDeriv(phys, diff1);
976 for (
int i = 1; i < nelmts; ++i)
979 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq);
984 double epsilon = 1.0e-8;
985 for (
int i = 0; i < diff1.size(); ++i)
987 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
988 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
989 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1014 basisKeyDir1, segGeom.get());
1018 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1019 for (
int i = 0; i < nelmts; ++i)
1021 CollExp.push_back(Exp);
1032 const int nq = Exp->GetTotPoints();
1040 for (
int i = 0; i < nq; ++i)
1042 phys[i] = sin(xc[i]);
1044 Exp->PhysDeriv(phys, diff1);
1046 for (
int i = 1; i < nelmts; ++i)
1049 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq);
1054 double epsilon = 1.0e-8;
1055 for (
int i = 0; i < diff1.size(); ++i)
1057 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
1058 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
1059 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1084 basisKeyDir1, segGeom.get());
1088 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1089 for (
int i = 0; i < nelmts; ++i)
1091 CollExp.push_back(Exp);
1102 const int nq = Exp->GetTotPoints();
1108 Exp->GetCoords(xc, yc);
1110 for (
int i = 0; i < nq; ++i)
1112 phys[i] = sin(xc[i]) * cos(yc[i]);
1114 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nelmts * nq);
1116 for (
int i = 1; i < nelmts; ++i)
1119 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq,
1120 tmp1 = diff1 + (nelmts + i) * nq);
1124 tmp = diff2 + nelmts * nq);
1126 double epsilon = 1.0e-8;
1127 for (
int i = 0; i < diff1.size(); ++i)
1129 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
1130 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
1131 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1156 basisKeyDir1, segGeom.get());
1160 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1161 for (
int i = 0; i < nelmts; ++i)
1163 CollExp.push_back(Exp);
1174 const int nq = Exp->GetTotPoints();
1180 Exp->GetCoords(xc, yc, zc);
1182 for (
int i = 0; i < nq; ++i)
1184 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1186 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nelmts * nq,
1187 tmp1 = diff1 + 2 * nelmts * nq);
1189 for (
int i = 1; i < nelmts; ++i)
1192 Exp->PhysDeriv(phys + i * nq, tmp = diff1 + i * nq,
1193 tmp1 = diff1 + (nelmts + i) * nq,
1194 tmp2 = diff1 + (2 * nelmts + i) * nq);
1198 tmp = diff2 + nelmts * nq, tmp1 = diff2 + 2 * nelmts * nq);
1200 double epsilon = 1.0e-8;
1201 for (
int i = 0; i < diff1.size(); ++i)
1203 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
1204 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
1205 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1223 unsigned int numSegPoints = 6;
1231 basisKeyDir1, segGeom.get());
1233 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1234 CollExp.push_back(Exp);
1243 const int nq = Exp->GetTotPoints();
1244 const int nm = Exp->GetNcoeffs();
1253 for (
int i = 0; i < nq; ++i)
1255 phys1[i] = sin(xc[i]);
1259 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1263 double epsilon = 1.0e-8;
1264 for (
int i = 0; i < coeffs1.size(); ++i)
1266 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1267 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1268 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1286 unsigned int numSegPoints = 6;
1294 basisKeyDir1, segGeom.get());
1296 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1299 for (
int i = 0; i < nelmts; ++i)
1301 CollExp.push_back(Exp);
1311 const int nq = Exp->GetTotPoints();
1312 const int nm = Exp->GetNcoeffs();
1320 for (
int i = 0; i < nq; ++i)
1322 phys1[i] = sin(xc[i]);
1324 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1326 for (
int i = 1; i < nelmts; ++i)
1331 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1336 double epsilon = 1.0e-8;
1337 for (
int i = 0; i < coeffs1.size(); ++i)
1339 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1340 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1341 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1359 unsigned int numSegPoints = 6;
1367 basisKeyDir1, segGeom.get());
1369 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1370 CollExp.push_back(Exp);
1379 const int nq = Exp->GetTotPoints();
1380 const int nm = Exp->GetNcoeffs();
1389 for (
int i = 0; i < nq; ++i)
1391 phys1[i] = sin(xc[i]);
1395 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1399 double epsilon = 1.0e-8;
1400 for (
int i = 0; i < coeffs1.size(); ++i)
1402 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1403 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1404 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1422 unsigned int numSegPoints = 6;
1430 basisKeyDir1, segGeom.get());
1432 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1435 for (
int i = 0; i < nelmts; ++i)
1437 CollExp.push_back(Exp);
1447 const int nq = Exp->GetTotPoints();
1448 const int nm = Exp->GetNcoeffs();
1456 for (
int i = 0; i < nq; ++i)
1458 phys1[i] = sin(xc[i]);
1460 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1462 for (
int i = 1; i < nelmts; ++i)
1467 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1472 double epsilon = 1.0e-8;
1473 for (
int i = 0; i < coeffs1.size(); ++i)
1475 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1476 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1477 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1495 unsigned int numSegPoints = 6;
1503 basisKeyDir1, segGeom.get());
1505 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1506 CollExp.push_back(Exp);
1515 const int nq = Exp->GetTotPoints();
1516 const int nm = Exp->GetNcoeffs();
1525 for (
int i = 0; i < nq; ++i)
1527 phys1[i] = sin(xc[i]);
1531 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1535 double epsilon = 1.0e-8;
1536 for (
int i = 0; i < coeffs1.size(); ++i)
1538 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1539 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1540 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1558 unsigned int numSegPoints = 6;
1566 basisKeyDir1, segGeom.get());
1568 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1571 for (
int i = 0; i < nelmts; ++i)
1573 CollExp.push_back(Exp);
1583 const int nq = Exp->GetTotPoints();
1584 const int nm = Exp->GetNcoeffs();
1592 for (
int i = 0; i < nq; ++i)
1594 phys1[i] = sin(xc[i]);
1596 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1598 for (
int i = 1; i < nelmts; ++i)
1603 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1608 double epsilon = 1.0e-8;
1609 for (
int i = 0; i < coeffs1.size(); ++i)
1611 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1612 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1613 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1618 TestSegIProductWRTDerivBase_SumFac_UniformP_MultiElmt_CoordimTwo)
1632 unsigned int numSegPoints = 6;
1640 basisKeyDir1, segGeom.get());
1642 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1645 for (
int i = 0; i < nelmts; ++i)
1647 CollExp.push_back(Exp);
1657 const int nq = Exp->GetTotPoints();
1658 const int nm = Exp->GetNcoeffs();
1665 Exp->GetCoords(xc, yc);
1667 for (
int i = 0; i < nq; ++i)
1669 phys1[i] = sin(xc[i]);
1670 phys2[i] = cos(yc[i]);
1672 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1673 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
1675 for (
int i = 1; i < nelmts; ++i)
1681 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1682 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
1684 Vmath::Vadd(nelmts * nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
1688 double epsilon = 1.0e-8;
1689 for (
int i = 0; i < coeffs1.size(); ++i)
1691 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1692 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1693 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1711 unsigned int numSegPoints = 6;
1719 basisKeyDir1, segGeom.get());
1721 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1724 for (
int i = 0; i < nelmts; ++i)
1726 CollExp.push_back(Exp);
1737 const int nq = Exp->GetTotPoints();
1738 const int nm = Exp->GetNcoeffs();
1746 for (
int i = 0; i < nq; ++i)
1748 phys1[i] = sin(xc[i]);
1750 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1752 for (
int i = 1; i < nelmts; ++i)
1757 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1762 double epsilon = 1.0e-8;
1763 for (
int i = 0; i < coeffs1.size(); ++i)
1765 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1766 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1767 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1772 TestSegIProductWRTDerivBase_MatrixFree_UniformP_MultiElmt_CoordimTwo)
1786 unsigned int numSegPoints = 6;
1794 basisKeyDir1, segGeom.get());
1796 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1799 for (
int i = 0; i < nelmts; ++i)
1801 CollExp.push_back(Exp);
1812 const int nq = Exp->GetTotPoints();
1813 const int nm = Exp->GetNcoeffs();
1820 Exp->GetCoords(xc, yc);
1822 for (
int i = 0; i < nq; ++i)
1824 phys1[i] = sin(xc[i]);
1825 phys2[i] = cos(yc[i]);
1827 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
1828 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
1830 for (
int i = 1; i < nelmts; ++i)
1836 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
1837 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
1839 Vmath::Vadd(nelmts * nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
1843 double epsilon = 1.0e-8;
1844 for (
int i = 0; i < coeffs1.size(); ++i)
1846 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1847 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1848 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1866 unsigned int numSegPoints = 6;
1874 basisKeyDir1, segGeom.get());
1876 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1877 CollExp.push_back(Exp);
1889 const int nq = Exp->GetTotPoints();
1894 Exp->GetCoords(xc, yc);
1896 for (
int i = 0; i < nq; ++i)
1898 phys[i] = pow(xc[i], 3) + pow(yc[i], 3);
1910 double epsilon = 1.0e-8;
1912 for (
int i = 0; i < nq1; ++i)
1914 NekDouble exact = pow(xc1[i], 3) + pow(yc1[i], 3);
1915 phys1[i] = (fabs(phys1[i]) < 1e-14) ? 0.0 : phys1[i];
1916 exact = (fabs(exact) < 1e-14) ? 0.0 : exact;
1917 BOOST_CHECK_CLOSE(phys1[i], exact, epsilon);
1935 unsigned int numSegPoints = 6;
1943 basisKeyDir1, segGeom.get());
1945 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1946 CollExp.push_back(Exp);
1958 const int nq = Exp->GetTotPoints();
1963 Exp->GetCoords(xc, yc);
1965 for (
int i = 0; i < nq; ++i)
1967 yc[i] = (fabs(yc[i]) < 1e-14) ? 0.0 : yc[i];
1968 phys[i] = pow(xc[i], 3) + pow(yc[i], 3);
1980 double epsilon = 1.0e-8;
1982 for (
int i = 0; i < nq1; ++i)
1984 xc1[i] = (fabs(xc1[i]) < 1e-14) ? 0.0 : xc1[i];
1985 yc1[i] = (fabs(yc1[i]) < 1e-14) ? 0.0 : yc1[i];
1986 NekDouble exact = pow(xc1[i], 3) + pow(yc1[i], 3);
1987 phys1[i] = (fabs(phys1[i]) < 1e-14) ? 0.0 : phys1[i];
1988 exact = (fabs(exact) < 1e-14) ? 0.0 : exact;
1989 BOOST_CHECK_CLOSE(phys1[i], exact, epsilon);