41#include <boost/test/tools/floating_point_comparison.hpp>
42#include <boost/test/unit_test.hpp>
96 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
106 basisKeyDir1, basisKeyDir2, triGeom);
108 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
109 CollExp.push_back(Exp);
122 Exp->BwdTrans(coeffs, phys1);
125 double epsilon = 1.0e-8;
126 for (
int i = 0; i < phys1.size(); ++i)
128 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
153 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
163 basisKeyDir1, basisKeyDir2, triGeom);
165 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
166 CollExp.push_back(Exp);
179 Exp->BwdTrans(coeffs, phys1);
182 double epsilon = 1.0e-8;
183 for (
int i = 0; i < phys1.size(); ++i)
185 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
210 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
220 basisKeyDir1, basisKeyDir2, triGeom);
224 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
225 for (
int i = 0; i < nelmts; ++i)
227 CollExp.push_back(Exp);
241 for (
int i = 0; i < nelmts; ++i)
243 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
244 tmp = phys1 + i * Exp->GetTotPoints());
249 double epsilon = 1.0e-8;
250 for (
int i = 0; i < phys1.size(); ++i)
252 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
277 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
287 basisKeyDir1, basisKeyDir2, triGeom);
289 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
290 CollExp.push_back(Exp);
303 Exp->BwdTrans(coeffs, phys1);
306 double epsilon = 1.0e-8;
307 for (
int i = 0; i < phys1.size(); ++i)
309 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
334 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
344 basisKeyDir1, basisKeyDir2, triGeom);
346 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
347 CollExp.push_back(Exp);
360 Exp->BwdTrans(coeffs, phys1);
363 double epsilon = 1.0e-8;
364 for (
int i = 0; i < phys1.size(); ++i)
366 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
381 unsigned int numQuadPoints = 5;
382 unsigned int numModes = 4;
393 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
403 basisKeyDir1, basisKeyDir2, triGeom);
405 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
406 CollExp.push_back(Exp);
421 Exp->BwdTrans(coeffs, physRef);
424 double epsilon = 1.0e-8;
425 for (
int i = 0; i < physRef.size(); ++i)
427 BOOST_CHECK_CLOSE(physRef[i], phys[i], epsilon);
442 unsigned int numQuadPoints = 8;
443 unsigned int numModes = 4;
454 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
464 basisKeyDir1, basisKeyDir2, triGeom);
466 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
467 CollExp.push_back(Exp);
482 Exp->BwdTrans(coeffs, physRef);
485 double epsilon = 1.0e-8;
486 for (
int i = 0; i < physRef.size(); ++i)
488 BOOST_CHECK_CLOSE(physRef[i], phys[i], epsilon);
513 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
523 basisKeyDir1, basisKeyDir2, triGeom);
525 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
528 for (
int i = 0; i < nelmts; ++i)
530 CollExp.push_back(Exp);
544 for (
int i = 0; i < nelmts; ++i)
546 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
547 tmp = phys1 + i * Exp->GetTotPoints());
551 double epsilon = 1.0e-8;
552 for (
int i = 0; i < phys1.size(); ++i)
554 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
579 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
589 basisKeyDir1, basisKeyDir2, triGeom);
591 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
594 for (
int i = 0; i < nelmts; ++i)
596 CollExp.push_back(Exp);
610 for (
int i = 0; i < nelmts; ++i)
612 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
613 tmp = phys1 + i * Exp->GetTotPoints());
617 double epsilon = 1.0e-8;
618 for (
int i = 0; i < phys1.size(); ++i)
620 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
645 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
655 basisKeyDir1, basisKeyDir2, triGeom);
659 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
660 for (
int i = 0; i < nelmts; ++i)
662 CollExp.push_back(Exp);
676 for (
int i = 0; i < nelmts; ++i)
678 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
679 tmp = phys1 + i * Exp->GetTotPoints());
683 double epsilon = 1.0e-8;
684 for (
int i = 0; i < phys1.size(); ++i)
686 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
711 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
721 basisKeyDir1, basisKeyDir2, triGeom);
725 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
726 for (
int i = 0; i < nelmts; ++i)
728 CollExp.push_back(Exp);
742 for (
int i = 0; i < nelmts; ++i)
744 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
745 tmp = phys1 + i * Exp->GetTotPoints());
749 double epsilon = 1.0e-8;
750 for (
int i = 0; i < phys1.size(); ++i)
752 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
777 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
787 basisKeyDir1, basisKeyDir2, triGeom);
789 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
790 CollExp.push_back(Exp);
799 const int nq = Exp->GetTotPoints();
806 Exp->GetCoords(xc, yc);
808 for (
int i = 0; i < nq; ++i)
810 phys[i] = sin(xc[i]) * cos(yc[i]);
813 Exp->IProductWRTBase(phys, coeffs1);
816 double epsilon = 1.0e-8;
817 for (
int i = 0; i < coeffs1.size(); ++i)
819 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
844 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
854 basisKeyDir1, basisKeyDir2, triGeom);
856 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
857 CollExp.push_back(Exp);
866 const int nq = Exp->GetTotPoints();
873 Exp->GetCoords(xc, yc);
875 for (
int i = 0; i < nq; ++i)
877 phys[i] = sin(xc[i]) * cos(yc[i]);
880 Exp->IProductWRTBase(phys, coeffs1);
883 double epsilon = 1.0e-8;
884 for (
int i = 0; i < coeffs1.size(); ++i)
886 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
911 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
921 basisKeyDir1, basisKeyDir2, triGeom);
925 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
926 for (
int i = 0; i < nelmts; ++i)
928 CollExp.push_back(Exp);
938 const int nq = Exp->GetTotPoints();
945 Exp->GetCoords(xc, yc);
947 for (
int i = 0; i < nq; ++i)
949 phys[i] = sin(xc[i]) * cos(yc[i]);
951 Exp->IProductWRTBase(phys, coeffs1);
953 for (
int i = 1; i < nelmts; ++i)
956 Exp->IProductWRTBase(phys + i * nq,
957 tmp = coeffs1 + i * Exp->GetNcoeffs());
962 double epsilon = 1.0e-8;
963 for (
int i = 0; i < coeffs1.size(); ++i)
965 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
990 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1000 basisKeyDir1, basisKeyDir2, triGeom);
1002 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1003 CollExp.push_back(Exp);
1012 const int nq = Exp->GetTotPoints();
1019 Exp->GetCoords(xc, yc);
1021 for (
int i = 0; i < nq; ++i)
1023 phys[i] = sin(xc[i]) * cos(yc[i]);
1026 Exp->IProductWRTBase(phys, coeffs1);
1029 double epsilon = 1.0e-8;
1030 for (
int i = 0; i < coeffs1.size(); ++i)
1032 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1057 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1067 basisKeyDir1, basisKeyDir2, triGeom);
1069 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1070 CollExp.push_back(Exp);
1079 const int nq = Exp->GetTotPoints();
1086 Exp->GetCoords(xc, yc);
1088 for (
int i = 0; i < nq; ++i)
1090 phys[i] = sin(xc[i]) * cos(yc[i]);
1093 Exp->IProductWRTBase(phys, coeffs1);
1096 double epsilon = 1.0e-8;
1097 for (
int i = 0; i < coeffs1.size(); ++i)
1099 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1114 unsigned int numQuadPoints = 5;
1115 unsigned int numModes = 4;
1126 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1135 basisKeyDir1, basisKeyDir2, triGeom);
1137 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1138 CollExp.push_back(Exp);
1149 const int nq = Exp->GetTotPoints();
1156 Exp->GetCoords(xc, yc);
1158 for (
int i = 0; i < nq; ++i)
1160 phys[i] = sin(xc[i]) * cos(yc[i]);
1163 Exp->IProductWRTBase(phys, coeffsRef);
1166 double epsilon = 1.0e-8;
1167 for (
int i = 0; i < coeffsRef.size(); ++i)
1169 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1184 unsigned int numQuadPoints = 5;
1185 unsigned int numModes = 4;
1196 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1205 basisKeyDir1, basisKeyDir2, triGeom);
1207 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1208 CollExp.push_back(Exp);
1219 const int nq = Exp->GetTotPoints();
1226 Exp->GetCoords(xc, yc);
1228 for (
int i = 0; i < nq; ++i)
1230 phys[i] = sin(xc[i]) * cos(yc[i]);
1233 Exp->IProductWRTBase(phys, coeffsRef);
1236 double epsilon = 1.0e-8;
1237 for (
int i = 0; i < coeffsRef.size(); ++i)
1239 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1244 TestTriIProductWRTBase_MatrixFree_UniformP_Deformed_OverInt)
1255 unsigned int numQuadPoints = 8;
1256 unsigned int numModes = 4;
1267 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1276 basisKeyDir1, basisKeyDir2, triGeom);
1278 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1279 CollExp.push_back(Exp);
1290 const int nq = Exp->GetTotPoints();
1297 Exp->GetCoords(xc, yc);
1299 for (
int i = 0; i < nq; ++i)
1301 phys[i] = sin(xc[i]) * cos(yc[i]);
1304 Exp->IProductWRTBase(phys, coeffsRef);
1307 double epsilon = 1.0e-8;
1308 for (
int i = 0; i < coeffsRef.size(); ++i)
1310 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1335 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1345 basisKeyDir1, basisKeyDir2, triGeom);
1349 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1350 for (
int i = 0; i < nelmts; ++i)
1352 CollExp.push_back(Exp);
1362 const int nq = Exp->GetTotPoints();
1369 Exp->GetCoords(xc, yc);
1371 for (
int i = 0; i < nq; ++i)
1373 phys[i] = sin(xc[i]) * cos(yc[i]);
1375 Exp->IProductWRTBase(phys, coeffs1);
1377 for (
int i = 1; i < nelmts; ++i)
1380 Exp->IProductWRTBase(phys + i * nq,
1381 tmp = coeffs1 + i * Exp->GetNcoeffs());
1386 double epsilon = 1.0e-8;
1387 for (
int i = 0; i < coeffs1.size(); ++i)
1389 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1414 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1424 basisKeyDir1, basisKeyDir2, triGeom);
1426 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1427 CollExp.push_back(Exp);
1436 const int nq = Exp->GetTotPoints();
1442 Exp->GetCoords(xc, yc);
1444 for (
int i = 0; i < nq; ++i)
1446 phys[i] = sin(xc[i]) * cos(yc[i]);
1449 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nq);
1452 double epsilon = 1.0e-8;
1453 for (
int i = 0; i < diff1.size(); ++i)
1455 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1480 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1490 basisKeyDir1, basisKeyDir2, triGeom);
1492 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1493 CollExp.push_back(Exp);
1502 const int nq = Exp->GetTotPoints();
1508 Exp->GetCoords(xc, yc);
1510 for (
int i = 0; i < nq; ++i)
1512 phys[i] = sin(xc[i]) * cos(yc[i]);
1515 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nq);
1518 double epsilon = 1.0e-8;
1519 for (
int i = 0; i < diff1.size(); ++i)
1521 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1546 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1556 basisKeyDir1, basisKeyDir2, triGeom);
1560 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1561 for (
int i = 0; i < nelmts; ++i)
1563 CollExp.push_back(Exp);
1573 const int nq = Exp->GetTotPoints();
1579 Exp->GetCoords(xc, yc);
1581 for (
int i = 0; i < nq; ++i)
1583 phys[i] = sin(xc[i]) * cos(yc[i]);
1585 Exp->PhysDeriv(phys, diff1, tmp1 = diff1 + (nelmts)*nq);
1587 for (
int i = 1; i < nelmts; ++i)
1590 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
1591 tmp1 = diff1 + (nelmts + i) * nq);
1595 tmp = diff2 + nelmts * nq);
1597 double epsilon = 1.0e-8;
1598 for (
int i = 0; i < diff1.size(); ++i)
1600 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1625 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1635 basisKeyDir1, basisKeyDir2, triGeom);
1637 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1638 CollExp.push_back(Exp);
1647 const int nq = Exp->GetTotPoints();
1653 Exp->GetCoords(xc, yc);
1655 for (
int i = 0; i < nq; ++i)
1657 phys[i] = sin(xc[i]) * cos(yc[i]);
1660 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nq);
1663 double epsilon = 1.0e-8;
1664 for (
int i = 0; i < diff1.size(); ++i)
1666 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1691 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1701 basisKeyDir1, basisKeyDir2, triGeom);
1705 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1706 for (
int i = 0; i < nelmts; ++i)
1708 CollExp.push_back(Exp);
1718 const int nq = Exp->GetTotPoints();
1724 Exp->GetCoords(xc, yc);
1726 for (
int i = 0; i < nq; ++i)
1728 phys[i] = sin(xc[i]) * cos(yc[i]);
1730 Exp->PhysDeriv(phys, tmp = diff1, tmp1 = diff1 + (nelmts)*nq);
1732 for (
int i = 1; i < nelmts; ++i)
1735 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
1736 tmp1 = diff1 + (nelmts + i) * nq);
1740 tmp = diff2 + nelmts * nq);
1742 double epsilon = 1.0e-8;
1743 for (
int i = 0; i < diff1.size(); ++i)
1745 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1770 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1780 basisKeyDir1, basisKeyDir2, triGeom);
1782 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1783 CollExp.push_back(Exp);
1792 const int nq = Exp->GetTotPoints();
1798 Exp->GetCoords(xc, yc);
1800 for (
int i = 0; i < nq; ++i)
1802 phys[i] = sin(xc[i]) * cos(yc[i]);
1805 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nq);
1808 double epsilon = 1.0e-8;
1809 for (
int i = 0; i < diff1.size(); ++i)
1811 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1836 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1846 basisKeyDir1, basisKeyDir2, triGeom);
1850 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1851 for (
int i = 0; i < nelmts; ++i)
1853 CollExp.push_back(Exp);
1863 const int nq = Exp->GetTotPoints();
1869 Exp->GetCoords(xc, yc);
1871 for (
int i = 0; i < nq; ++i)
1873 phys[i] = sin(xc[i]) * cos(yc[i]);
1875 Exp->PhysDeriv(phys, tmp = diff1, tmp1 = diff1 + (nelmts)*nq);
1876 for (
int i = 1; i < nelmts; ++i)
1879 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
1880 tmp1 = diff1 + (nelmts + i) * nq);
1884 tmp = diff2 + nelmts * nq);
1886 double epsilon = 1.0e-8;
1887 for (
int i = 0; i < diff1.size(); ++i)
1889 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1904 unsigned int numQuadPoints = 5;
1905 unsigned int numModes = 2;
1916 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1925 basisKeyDir1, basisKeyDir2, triGeom);
1927 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1928 CollExp.push_back(Exp);
1940 const int nq = Exp->GetTotPoints();
1946 Exp->GetCoords(xc, yc);
1948 for (
int i = 0; i < nq; ++i)
1950 phys[i] = sin(xc[i]) * cos(yc[i]);
1953 Exp->PhysDeriv(phys, diffRef, tmp = diffRef + nq);
1956 double epsilon = 1.0e-8;
1957 for (
int i = 0; i < diffRef.size(); ++i)
1959 BOOST_CHECK_CLOSE(diffRef[i], diff[i], epsilon);
1974 unsigned int numQuadPoints = 5;
1975 unsigned int numModes = 2;
1986 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1995 basisKeyDir1, basisKeyDir2, triGeom);
1997 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1998 CollExp.push_back(Exp);
2010 const int nq = Exp->GetTotPoints();
2016 Exp->GetCoords(xc, yc);
2018 for (
int i = 0; i < nq; ++i)
2020 phys[i] = sin(xc[i]) * cos(yc[i]);
2023 Exp->PhysDeriv(phys, diffRef, tmp = diffRef + nq);
2026 double epsilon = 1.0e-8;
2027 for (
int i = 0; i < diffRef.size(); ++i)
2029 BOOST_CHECK_CLOSE(diffRef[i], diff[i], epsilon);
2044 unsigned int numQuadPoints = 5;
2045 unsigned int numModes = 2;
2056 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2065 basisKeyDir1, basisKeyDir2, triGeom);
2067 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2068 CollExp.push_back(Exp);
2080 const int nq = Exp->GetTotPoints();
2086 Exp->GetCoords(xc, yc, zc);
2088 for (
int i = 0; i < nq; ++i)
2090 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2093 Exp->PhysDeriv(phys, diffRef, tmp = diffRef + nq, tmp1 = diffRef + 2 * nq);
2095 tmp1 = diff + 2 * nq);
2097 double epsilon = 1.0e-8;
2098 for (
int i = 0; i < diffRef.size(); ++i)
2100 BOOST_CHECK_CLOSE(diffRef[i], diff[i], epsilon);
2125 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2135 basisKeyDir1, basisKeyDir2, triGeom);
2137 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2138 CollExp.push_back(Exp);
2147 const int nq = Exp->GetTotPoints();
2148 const int nm = Exp->GetNcoeffs();
2156 Exp->GetCoords(xc, yc);
2158 for (
int i = 0; i < nq; ++i)
2160 phys1[i] = sin(xc[i]) * cos(yc[i]);
2161 phys2[i] = cos(xc[i]) * sin(yc[i]);
2165 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
2166 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
2167 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2171 double epsilon = 1.0e-8;
2172 for (
int i = 0; i < coeffs1.size(); ++i)
2174 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2175 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2176 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2201 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2211 basisKeyDir1, basisKeyDir2, triGeom);
2215 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2216 for (
int i = 0; i < nelmts; ++i)
2218 CollExp.push_back(Exp);
2228 const int nq = Exp->GetTotPoints();
2229 const int nm = Exp->GetNcoeffs();
2236 Exp->GetCoords(xc, yc);
2238 for (
int i = 0; i < nq; ++i)
2240 phys1[i] = sin(xc[i]) * cos(yc[i]);
2241 phys2[i] = cos(xc[i]) * sin(yc[i]);
2243 for (
int i = 1; i < nelmts; ++i)
2249 for (
int i = 0; i < nelmts; ++i)
2252 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2253 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp1 = coeffs2 + i * nm);
2254 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2255 tmp = coeffs1 + i * nm, 1);
2260 double epsilon = 1.0e-8;
2261 for (
int i = 0; i < coeffs1.size(); ++i)
2263 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2264 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2265 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2280 unsigned int numQuadPoints = 5;
2281 unsigned int numModes = 4;
2292 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2301 basisKeyDir1, basisKeyDir2, triGeom);
2302 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2303 CollExp.push_back(Exp);
2315 const int nq = Exp->GetTotPoints();
2316 const int nm = Exp->GetNcoeffs();
2324 Exp->GetCoords(xc, yc);
2326 for (
int i = 0; i < nq; ++i)
2328 phys1[i] = sin(xc[i]) * cos(yc[i]);
2329 phys2[i] = cos(xc[i]) * sin(yc[i]);
2333 Exp->IProductWRTDerivBase(0, phys1, coeffsRef);
2334 Exp->IProductWRTDerivBase(1, phys2, coeffs);
2335 Vmath::Vadd(nm, coeffsRef, 1, coeffs, 1, coeffsRef, 1);
2339 double epsilon = 1.0e-8;
2340 for (
int i = 0; i < coeffsRef.size(); ++i)
2342 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
2343 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
2344 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
2349 TestTriIProductWRTDerivBase_MatrixFree_UniformP_Undeformed_MultiElmt)
2360 unsigned int numQuadPoints = 5;
2361 unsigned int numModes = 4;
2372 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2381 basisKeyDir1, basisKeyDir2, triGeom);
2385 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2386 for (
int i = 0; i < nelmts; ++i)
2388 CollExp.push_back(Exp);
2401 const int nq = Exp->GetTotPoints();
2402 const int nm = Exp->GetNcoeffs();
2410 Exp->GetCoords(xc, yc);
2412 for (
int i = 0; i < nq; ++i)
2414 phys1[i] = sin(xc[i]) * cos(yc[i]);
2415 phys2[i] = cos(xc[i]) * sin(yc[i]);
2418 for (
int i = 1; i < nelmts; ++i)
2424 for (
int i = 0; i < nelmts; ++i)
2427 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffsRef + i * nm);
2428 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs + i * nm);
2429 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
2430 tmp = coeffsRef + i * nm, 1);
2435 double epsilon = 1.0e-8;
2436 for (
int i = 0; i < coeffsRef.size(); ++i)
2438 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
2439 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
2440 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
2455 unsigned int numQuadPoints = 5;
2456 unsigned int numModes = 4;
2467 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2476 basisKeyDir1, basisKeyDir2, triGeom);
2479 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2480 for (
int i = 0; i < nelmts; ++i)
2482 CollExp.push_back(Exp);
2495 const int nq = Exp->GetTotPoints();
2496 const int nm = Exp->GetNcoeffs();
2503 Exp->GetCoords(xc, yc);
2505 for (
int i = 0; i < nq; ++i)
2507 phys1[i] = sin(xc[i]) * cos(yc[i]);
2508 phys2[i] = cos(xc[i]) * sin(yc[i]);
2511 for (
int i = 1; i < nelmts; ++i)
2517 for (
int i = 0; i < nelmts; ++i)
2520 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffsRef + i * nm);
2521 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs + i * nm);
2522 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
2523 tmp = coeffsRef + i * nm, 1);
2532 double epsilon = 1.0e-8;
2533 for (
int i = 0; i < coeffsRef.size(); ++i)
2535 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
2536 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
2537 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
2542 TestTriIProductWRTDerivBase_MatrixFree_UniformP_Deformed_MultiElmt_ThreeD)
2553 unsigned int numQuadPoints = 5;
2554 unsigned int numModes = 4;
2565 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2574 basisKeyDir1, basisKeyDir2, triGeom);
2577 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2578 for (
int i = 0; i < nelmts; ++i)
2580 CollExp.push_back(Exp);
2593 const int nq = Exp->GetTotPoints();
2594 const int nm = Exp->GetNcoeffs();
2603 Exp->GetCoords(xc, yc, zc);
2605 for (
int i = 0; i < nq; ++i)
2607 phys1[i] = sin(xc[i]) * cos(yc[i]);
2608 phys2[i] = cos(xc[i]) * sin(yc[i]);
2609 phys3[i] = cos(xc[i]) * sin(zc[i]);
2612 for (
int i = 1; i < nelmts; ++i)
2619 for (
int i = 0; i < nelmts; ++i)
2622 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffsRef + i * nm);
2623 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs + i * nm);
2624 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
2625 tmp = coeffsRef + i * nm, 1);
2626 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs + i * nm);
2627 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
2628 tmp = coeffsRef + i * nm, 1);
2639 double epsilon = 1.0e-8;
2640 for (
int i = 0; i < coeffsRef.size(); ++i)
2642 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
2643 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
2644 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
2649 TestTriIProductWRTDerivBase_MatrixFree_UniformP_Deformed_OverInt)
2660 unsigned int numQuadPoints = 8;
2661 unsigned int numModes = 4;
2672 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2681 basisKeyDir1, basisKeyDir2, triGeom);
2682 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2683 CollExp.push_back(Exp);
2695 const int nq = Exp->GetTotPoints();
2696 const int nm = Exp->GetNcoeffs();
2704 Exp->GetCoords(xc, yc);
2706 for (
int i = 0; i < nq; ++i)
2708 phys1[i] = sin(xc[i]) * cos(yc[i]);
2709 phys2[i] = cos(xc[i]) * sin(yc[i]);
2713 Exp->IProductWRTDerivBase(0, phys1, coeffsRef);
2714 Exp->IProductWRTDerivBase(1, phys2, coeffs);
2715 Vmath::Vadd(nm, coeffsRef, 1, coeffs, 1, coeffsRef, 1);
2719 double epsilon = 1.0e-8;
2720 for (
int i = 0; i < coeffsRef.size(); ++i)
2722 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
2723 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
2724 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
2749 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2759 basisKeyDir1, basisKeyDir2, triGeom);
2761 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2762 CollExp.push_back(Exp);
2771 const int nq = Exp->GetTotPoints();
2772 const int nm = Exp->GetNcoeffs();
2780 Exp->GetCoords(xc, yc);
2782 for (
int i = 0; i < nq; ++i)
2784 phys1[i] = sin(xc[i]) * cos(yc[i]);
2785 phys2[i] = cos(xc[i]) * sin(yc[i]);
2789 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
2790 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
2791 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2795 double epsilon = 1.0e-8;
2796 for (
int i = 0; i < coeffs1.size(); ++i)
2798 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2799 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2800 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2825 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2835 basisKeyDir1, basisKeyDir2, triGeom);
2839 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2840 for (
int i = 0; i < nelmts; ++i)
2842 CollExp.push_back(Exp);
2852 const int nq = Exp->GetTotPoints();
2853 const int nm = Exp->GetNcoeffs();
2860 Exp->GetCoords(xc, yc);
2862 for (
int i = 0; i < nq; ++i)
2864 phys1[i] = sin(xc[i]) * cos(yc[i]);
2865 phys2[i] = cos(xc[i]) * sin(yc[i]);
2867 for (
int i = 1; i < nelmts; ++i)
2873 for (
int i = 0; i < nelmts; ++i)
2876 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2877 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp1 = coeffs2 + i * nm);
2878 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2879 tmp = coeffs1 + i * nm, 1);
2884 double epsilon = 1.0e-8;
2885 for (
int i = 0; i < coeffs1.size(); ++i)
2887 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2888 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2889 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2914 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2924 basisKeyDir1, basisKeyDir2, triGeom);
2926 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2927 CollExp.push_back(Exp);
2936 const int nq = Exp->GetTotPoints();
2937 const int nm = Exp->GetNcoeffs();
2945 Exp->GetCoords(xc, yc);
2947 for (
int i = 0; i < nq; ++i)
2949 phys1[i] = sin(xc[i]) * cos(yc[i]);
2950 phys2[i] = cos(xc[i]) * sin(yc[i]);
2954 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
2955 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
2956 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2960 double epsilon = 1.0e-8;
2961 for (
int i = 0; i < coeffs1.size(); ++i)
2963 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2964 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2965 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2990 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3000 basisKeyDir1, basisKeyDir2, triGeom);
3004 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3005 for (
int i = 0; i < nelmts; ++i)
3007 CollExp.push_back(Exp);
3017 const int nq = Exp->GetTotPoints();
3018 const int nm = Exp->GetNcoeffs();
3025 Exp->GetCoords(xc, yc);
3027 for (
int i = 0; i < nq; ++i)
3029 phys1[i] = sin(xc[i]) * cos(yc[i]);
3030 phys2[i] = cos(xc[i]) * sin(yc[i]);
3032 for (
int i = 1; i < nelmts; ++i)
3038 for (
int i = 0; i < nelmts; ++i)
3041 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
3042 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp1 = coeffs2 + i * nm);
3043 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
3044 tmp = coeffs1 + i * nm, 1);
3049 double epsilon = 1.0e-8;
3050 for (
int i = 0; i < coeffs1.size(); ++i)
3052 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
3053 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
3054 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
3059 TestTriIProductWRTDerivBase_SumFac_VariableP_MultiElmt_threedim)
3080 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3090 basisKeyDir1, basisKeyDir2, triGeom);
3094 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3095 for (
int i = 0; i < nelmts; ++i)
3097 CollExp.push_back(Exp);
3107 const int nq = Exp->GetTotPoints();
3108 const int nm = Exp->GetNcoeffs();
3116 Exp->GetCoords(xc, yc, zc);
3118 for (
int i = 0; i < nq; ++i)
3120 phys1[i] = sin(xc[i]) * cos(yc[i]);
3121 phys2[i] = cos(xc[i]) * sin(yc[i]);
3122 phys3[i] = cos(xc[i]) * sin(zc[i]);
3124 for (
int i = 1; i < nelmts; ++i)
3131 for (
int i = 0; i < nelmts; ++i)
3134 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
3135 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp1 = coeffs2 + i * nm);
3136 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
3137 tmp = coeffs1 + i * nm, 1);
3138 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp1 = coeffs2 + i * nm);
3139 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
3140 tmp = coeffs1 + i * nm, 1);
3146 double epsilon = 1.0e-8;
3147 for (
int i = 0; i < coeffs1.size(); ++i)
3149 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
3150 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
3151 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
3166 unsigned int numQuadPoints = 5;
3167 unsigned int numModes = 4;
3179 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3189 basisKeyDir1, basisKeyDir2, triGeom);
3193 basisKeyDir1, basisKeyDir2);
3197 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3199 for (
int i = 0; i < nelmts; ++i)
3201 CollExp.push_back(Exp);
3217 const int nm = Exp->GetNcoeffs();
3222 for (
int i = 0; i < nm; ++i)
3227 for (
int i = 1; i < nelmts; ++i)
3229 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3235 for (
int i = 0; i < nelmts; ++i)
3238 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3243 double epsilon = 1.0e-8;
3244 for (
int i = 0; i < coeffsRef.size(); ++i)
3246 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3247 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3248 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3263 unsigned int numQuadPoints = 5;
3264 unsigned int numModes = 4;
3276 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3286 basisKeyDir1, basisKeyDir2, triGeom);
3290 basisKeyDir1, basisKeyDir2);
3294 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3296 for (
int i = 0; i < nelmts; ++i)
3298 CollExp.push_back(Exp);
3311 const int nm = Exp->GetNcoeffs();
3316 for (
int i = 0; i < nm; ++i)
3321 for (
int i = 1; i < nelmts; ++i)
3323 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3329 for (
int i = 0; i < nelmts; ++i)
3332 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3337 double epsilon = 1.0e-8;
3338 for (
int i = 0; i < coeffsRef.size(); ++i)
3340 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3341 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3342 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3357 unsigned int numQuadPoints = 8;
3358 unsigned int numModes = 4;
3370 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3380 basisKeyDir1, basisKeyDir2, triGeom);
3384 basisKeyDir1, basisKeyDir2);
3388 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3390 for (
int i = 0; i < nelmts; ++i)
3392 CollExp.push_back(Exp);
3405 const int nm = Exp->GetNcoeffs();
3410 for (
int i = 0; i < nm; ++i)
3415 for (
int i = 1; i < nelmts; ++i)
3417 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3423 for (
int i = 0; i < nelmts; ++i)
3426 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3431 double epsilon = 1.0e-8;
3432 for (
int i = 0; i < coeffsRef.size(); ++i)
3434 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3435 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3436 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3451 unsigned int numQuadPoints = 5;
3452 unsigned int numModes = 4;
3464 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3474 basisKeyDir1, basisKeyDir2, triGeom);
3478 basisKeyDir1, basisKeyDir2);
3482 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3484 for (
int i = 0; i < nelmts; ++i)
3486 CollExp.push_back(Exp);
3502 const int nm = Exp->GetNcoeffs();
3507 for (
int i = 0; i < nm; ++i)
3512 for (
int i = 1; i < nelmts; ++i)
3514 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3520 for (
int i = 0; i < nelmts; ++i)
3523 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3528 double epsilon = 1.0e-8;
3529 for (
int i = 0; i < coeffsRef.size(); ++i)
3531 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3532 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3533 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3548 unsigned int numQuadPoints = 5;
3549 unsigned int numModes = 4;
3561 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3571 basisKeyDir1, basisKeyDir2, triGeom);
3573 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3574 CollExp.push_back(Exp);
3586 const int nq = Exp->GetTotPoints();
3591 Exp->GetCoords(xc, yc);
3593 for (
int i = 0; i < nq; ++i)
3595 phys[i] = pow(xc[i], 3) + pow(yc[i], 3);
3607 double epsilon = 1.0e-8;
3609 for (
int i = 0; i < nq1; ++i)
3611 NekDouble exact = pow(xc1[i], 3) + pow(yc1[i], 3);
3612 phys1[i] = (fabs(phys1[i]) < 1e-14) ? 0.0 : phys1[i];
3613 exact = (fabs(exact) < 1e-14) ? 0.0 : exact;
3614 BOOST_CHECK_CLOSE(phys1[i], exact, epsilon);
3629 unsigned int numQuadPoints = 5;
3630 unsigned int numModes = 4;
3642 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3652 basisKeyDir1, basisKeyDir2, triGeom);
3654 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3655 CollExp.push_back(Exp);
3667 const int nq = Exp->GetTotPoints();
3672 Exp->GetCoords(xc, yc);
3674 for (
int i = 0; i < nq; ++i)
3676 phys[i] = pow(xc[i], 3) + pow(yc[i], 3);
3688 double epsilon = 1.0e-8;
3690 for (
int i = 0; i < nq1; ++i)
3692 NekDouble exact = pow(xc1[i], 3) + pow(yc1[i], 3);
3693 phys1[i] = (fabs(phys1[i]) < 1e-14) ? 0.0 : phys1[i];
3694 exact = (fabs(exact) < 1e-14) ? 0.0 : exact;
3695 BOOST_CHECK_CLOSE(phys1[i], exact, epsilon);
COLLECTIONS_EXPORT void Initialise(const OperatorType opType, StdRegions::FactorMap factors=StdRegions::NullFactorMap)
void ApplyOperator(const OperatorType &op, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &output)
int GetOutputSize(const OperatorType &op, bool defaultOut=true)
COLLECTIONS_EXPORT OperatorImpMap GetOperatorImpMap(StdRegions::StdExpansionSharedPtr pExp)
Get Operator Implementation Map from XMl or using default;.
Describes the specification for a Basis.
Defines a specification for a set of points.
static void PrintElapsedRegions()
Print elapsed time and call count for each region with default serial communicator.
void AccumulateRegion(std::string, int iolevel=0)
Accumulate elapsed time for a region.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
static const int kNedges
Get the orientation of face1.
std::map< OperatorType, ImplementationType > OperatorImpMap
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ eModified_A
Principle Modified Functions .
std::shared_ptr< TriExp > TriExpSharedPtr
std::shared_ptr< SegGeom > SegGeomSharedPtr
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::shared_ptr< TriGeom > TriGeomSharedPtr
std::shared_ptr< StdTriExp > StdTriExpSharedPtr
std::map< ConstFactorType, NekDouble > ConstFactorMap
SpatialDomains::SegGeomSharedPtr CreateSegGeom(unsigned int id, SpatialDomains::PointGeomSharedPtr v0, SpatialDomains::PointGeomSharedPtr v1)
SpatialDomains::TriGeomSharedPtr CreateTri(SpatialDomains::PointGeomSharedPtr v0, SpatialDomains::PointGeomSharedPtr v1, SpatialDomains::PointGeomSharedPtr v2)
BOOST_AUTO_TEST_CASE(TestTriBwdTrans_StdMat_UniformP)
StdRegions::ConstFactorMap factors
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > abs(scalarT< T > in)