39#include <boost/test/tools/floating_point_comparison.hpp>
40#include <boost/test/unit_test.hpp>
44namespace PrismCollectionTests
151 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
155 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
156 for (
int i = 0; i < nelmts; ++i)
158 CollExp.push_back(Exp);
172 for (
int i = 0; i < nelmts; ++i)
174 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
175 tmp = phys1 + i * Exp->GetTotPoints());
179 double epsilon = 1.0e-8;
180 for (
int i = 0; i < phys1.size(); ++i)
182 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
230 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
234 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
235 for (
int i = 0; i < nelmts; ++i)
237 CollExp.push_back(Exp);
252 for (
int i = 0; i < nelmts; ++i)
254 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
255 tmp = phys1 + i * Exp->GetTotPoints());
259 double epsilon = 1.0e-8;
260 for (
int i = 0; i < phys1.size(); ++i)
262 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
310 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
314 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
315 for (
int i = 0; i < nelmts; ++i)
317 CollExp.push_back(Exp);
332 for (
int i = 0; i < nelmts; ++i)
334 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
335 tmp = phys1 + i * Exp->GetTotPoints());
339 double epsilon = 1.0e-8;
340 for (
int i = 0; i < phys1.size(); ++i)
342 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
390 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
394 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
395 for (
int i = 0; i < nelmts; ++i)
397 CollExp.push_back(Exp);
412 for (
int i = 0; i < nelmts; ++i)
414 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
415 tmp = phys1 + i * Exp->GetTotPoints());
419 double epsilon = 1.0e-8;
420 for (
int i = 0; i < phys1.size(); ++i)
422 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
444 unsigned int numQuadPoints = 5;
445 unsigned int numModes = 4;
466 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
476 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
478 unsigned int nelmts = 2;
480 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
481 for (
unsigned int i = 0; i < nelmts; ++i)
483 CollExp.push_back(Exp);
501 for (
unsigned int i = 0; i < nelmts; ++i)
503 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
504 tmp = physRef + i * Exp->GetTotPoints());
508 double epsilon = 1.0e-8;
509 for (
unsigned int i = 0; i < physRef.size(); ++i)
511 BOOST_CHECK_CLOSE(physRef[i], phys[i], epsilon);
533 unsigned int numQuadPoints = 8;
534 unsigned int numModes = 4;
555 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
565 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
567 unsigned int nelmts = 2;
569 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
570 for (
unsigned int i = 0; i < nelmts; ++i)
572 CollExp.push_back(Exp);
590 for (
unsigned int i = 0; i < nelmts; ++i)
592 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
593 tmp = physRef + i * Exp->GetTotPoints());
597 double epsilon = 1.0e-8;
598 for (
unsigned int i = 0; i < physRef.size(); ++i)
600 BOOST_CHECK_CLOSE(physRef[i], phys[i], epsilon);
648 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
652 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
653 for (
int i = 0; i < nelmts; ++i)
655 CollExp.push_back(Exp);
670 for (
int i = 0; i < nelmts; ++i)
672 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
673 tmp = phys1 + i * Exp->GetTotPoints());
677 double epsilon = 1.0e-8;
678 for (
int i = 0; i < phys1.size(); ++i)
680 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
727 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
731 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
732 for (
int i = 0; i < nelmts; ++i)
734 CollExp.push_back(Exp);
749 for (
int i = 0; i < nelmts; ++i)
751 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
752 tmp = phys1 + i * Exp->GetTotPoints());
756 double epsilon = 1.0e-8;
757 for (
int i = 0; i < phys1.size(); ++i)
759 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
807 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
811 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
812 for (
int i = 0; i < nelmts; ++i)
814 CollExp.push_back(Exp);
824 const int nq = Exp->GetTotPoints();
831 Exp->GetCoords(xc, yc, zc);
833 for (
int i = 0; i < nq; ++i)
835 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
837 Exp->IProductWRTBase(phys, coeffs1);
839 for (
int i = 1; i < nelmts; ++i)
842 Exp->IProductWRTBase(phys + i * nq,
843 tmp = coeffs1 + i * Exp->GetNcoeffs());
848 double epsilon = 1.0e-8;
849 for (
int i = 0; i < coeffs1.size(); ++i)
852 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
853 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
854 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
902 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
906 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
907 for (
int i = 0; i < nelmts; ++i)
909 CollExp.push_back(Exp);
919 const int nq = Exp->GetTotPoints();
926 Exp->GetCoords(xc, yc, zc);
928 for (
int i = 0; i < nq; ++i)
930 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
932 Exp->IProductWRTBase(phys, coeffs1);
934 for (
int i = 1; i < nelmts; ++i)
937 Exp->IProductWRTBase(phys + i * nq,
938 tmp = coeffs1 + i * Exp->GetNcoeffs());
943 double epsilon = 1.0e-8;
944 for (
int i = 0; i < coeffs1.size(); ++i)
947 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
948 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
949 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
997 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1001 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1002 for (
int i = 0; i < nelmts; ++i)
1004 CollExp.push_back(Exp);
1014 const int nq = Exp->GetTotPoints();
1021 Exp->GetCoords(xc, yc, zc);
1023 for (
int i = 0; i < nq; ++i)
1025 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1027 Exp->IProductWRTBase(phys, coeffs1);
1029 for (
int i = 1; i < nelmts; ++i)
1032 Exp->IProductWRTBase(phys + i * nq,
1033 tmp = coeffs1 + i * Exp->GetNcoeffs());
1038 double epsilon = 1.0e-8;
1039 for (
int i = 0; i < coeffs1.size(); ++i)
1042 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1043 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1044 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1049 TestPrismIProductWRTBase_MatrixFree_UniformP_Undeformed_MultiElmt)
1067 unsigned int numQuadPoints = 5;
1068 unsigned int numModes = 4;
1089 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1099 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1101 unsigned int nelmts = 2;
1103 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1104 for (
unsigned int i = 0; i < nelmts; ++i)
1106 CollExp.push_back(Exp);
1119 const int nq = Exp->GetTotPoints();
1126 Exp->GetCoords(xc, yc, zc);
1128 for (
int i = 0; i < nq; ++i)
1130 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1132 Exp->IProductWRTBase(phys, coeffsRef);
1134 for (
int i = 1; i < nelmts; ++i)
1137 Exp->IProductWRTBase(phys + i * nq,
1138 tmp = coeffsRef + i * Exp->GetNcoeffs());
1143 double epsilon = 1.0e-8;
1144 for (
int i = 0; i < coeffsRef.size(); ++i)
1147 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
1148 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
1149 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1154 TestPrismIProductWRTBase_MatrixFree_UniformP_Deformed_MultiElmt)
1172 unsigned int numQuadPoints = 5;
1173 unsigned int numModes = 4;
1194 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1204 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1206 unsigned int nelmts = 2;
1208 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1209 for (
unsigned int i = 0; i < nelmts; ++i)
1211 CollExp.push_back(Exp);
1224 const int nq = Exp->GetTotPoints();
1231 Exp->GetCoords(xc, yc, zc);
1233 for (
int i = 0; i < nq; ++i)
1235 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1237 Exp->IProductWRTBase(phys, coeffsRef);
1239 for (
int i = 1; i < nelmts; ++i)
1242 Exp->IProductWRTBase(phys + i * nq,
1243 tmp = coeffsRef + i * Exp->GetNcoeffs());
1248 double epsilon = 1.0e-8;
1249 for (
int i = 0; i < coeffsRef.size(); ++i)
1252 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
1253 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
1254 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1259 TestPrismIProductWRTBase_MatrixFree_UniformP_Deformed_OverInt_MultiElmt)
1277 unsigned int numQuadPoints = 8;
1278 unsigned int numModes = 4;
1299 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1309 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1311 unsigned int nelmts = 2;
1313 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1314 for (
unsigned int i = 0; i < nelmts; ++i)
1316 CollExp.push_back(Exp);
1329 const int nq = Exp->GetTotPoints();
1336 Exp->GetCoords(xc, yc, zc);
1338 for (
int i = 0; i < nq; ++i)
1340 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1342 Exp->IProductWRTBase(phys, coeffsRef);
1344 for (
int i = 1; i < nelmts; ++i)
1347 Exp->IProductWRTBase(phys + i * nq,
1348 tmp = coeffsRef + i * Exp->GetNcoeffs());
1353 double epsilon = 1.0e-8;
1354 for (
int i = 0; i < coeffsRef.size(); ++i)
1357 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
1358 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
1359 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1407 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1411 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1412 for (
int i = 0; i < nelmts; ++i)
1414 CollExp.push_back(Exp);
1424 const int nq = Exp->GetTotPoints();
1431 Exp->GetCoords(xc, yc, zc);
1433 for (
int i = 0; i < nq; ++i)
1435 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1437 Exp->IProductWRTBase(phys, coeffs1);
1439 for (
int i = 1; i < nelmts; ++i)
1442 Exp->IProductWRTBase(phys + i * nq,
1443 tmp = coeffs1 + i * Exp->GetNcoeffs());
1448 double epsilon = 1.0e-8;
1449 for (
int i = 0; i < coeffs1.size(); ++i)
1452 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1453 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1454 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1502 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1506 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1507 for (
int i = 0; i < nelmts; ++i)
1509 CollExp.push_back(Exp);
1519 const int nq = Exp->GetTotPoints();
1526 Exp->GetCoords(xc, yc, zc);
1528 for (
int i = 0; i < nq; ++i)
1530 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1532 Exp->IProductWRTBase(phys, coeffs1);
1534 for (
int i = 1; i < nelmts; ++i)
1537 Exp->IProductWRTBase(phys + i * nq,
1538 tmp = coeffs1 + i * Exp->GetNcoeffs());
1543 double epsilon = 1.0e-8;
1544 for (
int i = 0; i < coeffs1.size(); ++i)
1547 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1548 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1549 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1597 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1601 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1602 for (
int i = 0; i < nelmts; ++i)
1604 CollExp.push_back(Exp);
1614 const int nq = Exp->GetTotPoints();
1621 Exp->GetCoords(xc, yc, zc);
1623 for (
int i = 0; i < nq; ++i)
1625 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1627 Exp->IProductWRTBase(phys, coeffs1);
1629 for (
int i = 1; i < nelmts; ++i)
1632 Exp->IProductWRTBase(phys + i * nq,
1633 tmp = coeffs1 + i * Exp->GetNcoeffs());
1638 double epsilon = 1.0e-8;
1639 for (
int i = 0; i < coeffs1.size(); ++i)
1642 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1643 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1644 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1683 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1692 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1696 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1697 for (
int i = 0; i < nelmts; ++i)
1699 CollExp.push_back(Exp);
1709 const int nq = Exp->GetTotPoints();
1715 Exp->GetCoords(xc, yc, zc);
1717 for (
int i = 0; i < nq; ++i)
1719 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1721 Exp->PhysDeriv(phys, diff1, tmp1 = diff1 + (nelmts)*nq,
1722 tmp2 = diff1 + (2 * nelmts) * nq);
1724 for (
int i = 1; i < nelmts; ++i)
1727 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
1728 tmp1 = diff1 + (nelmts + i) * nq,
1729 tmp2 = diff1 + (2 * nelmts + i) * nq);
1733 tmp = diff2 + nelmts * nq, tmp2 = diff2 + 2 * nelmts * nq);
1735 double epsilon = 1.0e-8;
1736 for (
int i = 0; i < diff1.size(); ++i)
1738 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1777 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1786 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1790 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1791 for (
int i = 0; i < nelmts; ++i)
1793 CollExp.push_back(Exp);
1803 const int nq = Exp->GetTotPoints();
1809 Exp->GetCoords(xc, yc, zc);
1811 for (
int i = 0; i < nq; ++i)
1813 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1815 Exp->PhysDeriv(phys, diff1, tmp1 = diff1 + (nelmts)*nq,
1816 tmp2 = diff1 + (2 * nelmts) * nq);
1818 for (
int i = 1; i < nelmts; ++i)
1821 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
1822 tmp1 = diff1 + (nelmts + i) * nq,
1823 tmp2 = diff1 + (2 * nelmts + i) * nq);
1827 tmp = diff2 + nelmts * nq, tmp2 = diff2 + 2 * nelmts * nq);
1829 double epsilon = 1.0e-8;
1830 for (
int i = 0; i < diff1.size(); ++i)
1833 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
1834 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
1835 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1874 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1883 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1887 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1888 for (
int i = 0; i < nelmts; ++i)
1890 CollExp.push_back(Exp);
1900 const int nq = Exp->GetTotPoints();
1906 Exp->GetCoords(xc, yc, zc);
1908 for (
int i = 0; i < nq; ++i)
1910 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1912 Exp->PhysDeriv(phys, diff1, tmp1 = diff1 + (nelmts)*nq,
1913 tmp2 = diff1 + (2 * nelmts) * nq);
1915 for (
int i = 1; i < nelmts; ++i)
1918 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
1919 tmp1 = diff1 + (nelmts + i) * nq,
1920 tmp2 = diff1 + (2 * nelmts + i) * nq);
1924 tmp = diff2 + nelmts * nq, tmp2 = diff2 + 2 * nelmts * nq);
1926 double epsilon = 1.0e-8;
1927 for (
int i = 0; i < diff1.size(); ++i)
1929 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1968 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1977 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
1981 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1982 for (
int i = 0; i < nelmts; ++i)
1984 CollExp.push_back(Exp);
1994 const int nq = Exp->GetTotPoints();
2000 Exp->GetCoords(xc, yc, zc);
2002 for (
int i = 0; i < nq; ++i)
2004 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2006 Exp->PhysDeriv(phys, diff1, tmp1 = diff1 + (nelmts)*nq,
2007 tmp2 = diff1 + (2 * nelmts) * nq);
2009 for (
int i = 1; i < nelmts; ++i)
2012 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
2013 tmp1 = diff1 + (nelmts + i) * nq,
2014 tmp2 = diff1 + (2 * nelmts + i) * nq);
2018 tmp = diff2 + nelmts * nq, tmp2 = diff2 + 2 * nelmts * nq);
2020 double epsilon = 1.0e-8;
2021 for (
int i = 0; i < diff1.size(); ++i)
2024 diff1[i] = (fabs(diff1[i]) < 1e-14) ? 0.0 : diff1[i];
2025 diff2[i] = (fabs(diff2[i]) < 1e-14) ? 0.0 : diff2[i];
2026 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
2065 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2074 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2078 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2079 for (
int i = 0; i < nelmts; ++i)
2081 CollExp.push_back(Exp);
2091 const int nq = Exp->GetTotPoints();
2097 Exp->GetCoords(xc, yc, zc);
2099 for (
int i = 0; i < nq; ++i)
2101 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2103 Exp->PhysDeriv(phys, tmp = diff1, tmp1 = diff1 + (nelmts)*nq,
2104 tmp2 = diff1 + (2 * nelmts) * nq);
2105 for (
int i = 1; i < nelmts; ++i)
2108 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
2109 tmp1 = diff1 + (nelmts + i) * nq,
2110 tmp2 = diff1 + (2 * nelmts + i) * nq);
2114 tmp = diff2 + nelmts * nq, tmp2 = diff2 + 2 * nelmts * nq);
2116 double epsilon = 1.0e-8;
2117 for (
int i = 0; i < diff1.size(); ++i)
2119 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
2141 unsigned int numQuadPoints = 5;
2142 unsigned int numModes = 2;
2163 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2173 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2177 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2178 for (
int i = 0; i < nelmts; ++i)
2180 CollExp.push_back(Exp);
2193 const int nq = Exp->GetTotPoints();
2199 Exp->GetCoords(xc, yc, zc);
2201 for (
int i = 0; i < nq; ++i)
2203 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2205 Exp->PhysDeriv(phys, diffRef, tmp1 = diffRef + (nelmts)*nq,
2206 tmp2 = diffRef + (2 * nelmts) * nq);
2208 for (
int i = 1; i < nelmts; ++i)
2211 Exp->PhysDeriv(phys, tmp = diffRef + i * nq,
2212 tmp1 = diffRef + (nelmts + i) * nq,
2213 tmp2 = diffRef + (2 * nelmts + i) * nq);
2217 tmp = diff + nelmts * nq, tmp2 = diff + 2 * nelmts * nq);
2219 double epsilon = 1.0e-8;
2220 for (
int i = 0; i < diffRef.size(); ++i)
2222 diffRef[i] = (
std::abs(diffRef[i]) < 1e-14) ? 0.0 : diffRef[i];
2223 diff[i] = (
std::abs(diff[i]) < 1e-14) ? 0.0 : diff[i];
2224 BOOST_CHECK_CLOSE(diffRef[i], diff[i], epsilon);
2229 TestPrismIProductWRTDerivBase_IterPerExp_UniformP_MultiElmt)
2264 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2273 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2277 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2278 for (
int i = 0; i < nelmts; ++i)
2280 CollExp.push_back(Exp);
2290 const int nq = Exp->GetTotPoints();
2291 const int nm = Exp->GetNcoeffs();
2300 Exp->GetCoords(xc, yc, zc);
2302 for (
int i = 0; i < nq; ++i)
2304 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2305 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2306 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2308 for (
int i = 1; i < nelmts; ++i)
2316 for (
int i = 0; i < nelmts; ++i)
2318 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2319 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2320 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2321 tmp = coeffs1 + i * nm, 1);
2322 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2323 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2324 tmp = coeffs1 + i * nm, 1);
2330 double epsilon = 1.0e-8;
2331 for (
int i = 0; i < coeffs1.size(); ++i)
2333 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2334 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2335 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2374 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2383 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2387 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2388 for (
int i = 0; i < nelmts; ++i)
2390 CollExp.push_back(Exp);
2400 const int nq = Exp->GetTotPoints();
2401 const int nm = Exp->GetNcoeffs();
2410 Exp->GetCoords(xc, yc, zc);
2412 for (
int i = 0; i < nq; ++i)
2414 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2415 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2416 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2418 for (
int i = 1; i < nelmts; ++i)
2426 for (
int i = 0; i < nelmts; ++i)
2428 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2429 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2430 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2431 tmp = coeffs1 + i * nm, 1);
2432 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2433 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2434 tmp = coeffs1 + i * nm, 1);
2440 double epsilon = 1.0e-8;
2441 for (
int i = 0; i < coeffs1.size(); ++i)
2443 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2444 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2445 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2484 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2493 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2497 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2498 for (
int i = 0; i < nelmts; ++i)
2500 CollExp.push_back(Exp);
2510 const int nq = Exp->GetTotPoints();
2511 const int nm = Exp->GetNcoeffs();
2520 Exp->GetCoords(xc, yc, zc);
2522 for (
int i = 0; i < nq; ++i)
2524 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2525 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2526 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2528 for (
int i = 1; i < nelmts; ++i)
2536 for (
int i = 0; i < nelmts; ++i)
2538 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2539 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2540 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2541 tmp = coeffs1 + i * nm, 1);
2542 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2543 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2544 tmp = coeffs1 + i * nm, 1);
2550 double epsilon = 1.0e-8;
2551 for (
int i = 0; i < coeffs1.size(); ++i)
2553 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2554 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2555 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2560 TestPrismIProductWRTDerivBase_IterPerExp_VariableP_MultiElmt)
2595 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2604 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2608 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2609 for (
int i = 0; i < nelmts; ++i)
2611 CollExp.push_back(Exp);
2621 const int nq = Exp->GetTotPoints();
2622 const int nm = Exp->GetNcoeffs();
2631 Exp->GetCoords(xc, yc, zc);
2633 for (
int i = 0; i < nq; ++i)
2635 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2636 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2637 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2639 for (
int i = 1; i < nelmts; ++i)
2647 for (
int i = 0; i < nelmts; ++i)
2649 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2650 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2651 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2652 tmp = coeffs1 + i * nm, 1);
2653 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2654 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2655 tmp = coeffs1 + i * nm, 1);
2661 double epsilon = 1.0e-8;
2662 for (
int i = 0; i < coeffs1.size(); ++i)
2664 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2665 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2666 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2705 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2714 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2718 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2719 for (
int i = 0; i < nelmts; ++i)
2721 CollExp.push_back(Exp);
2731 const int nq = Exp->GetTotPoints();
2732 const int nm = Exp->GetNcoeffs();
2741 Exp->GetCoords(xc, yc, zc);
2743 for (
int i = 0; i < nq; ++i)
2745 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2746 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2747 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2749 for (
int i = 1; i < nelmts; ++i)
2757 for (
int i = 0; i < nelmts; ++i)
2759 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2760 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2761 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2762 tmp = coeffs1 + i * nm, 1);
2763 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2764 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2765 tmp = coeffs1 + i * nm, 1);
2771 double epsilon = 1.0e-8;
2772 for (
int i = 0; i < coeffs1.size(); ++i)
2774 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2775 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2776 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2815 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2824 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2828 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2829 for (
int i = 0; i < nelmts; ++i)
2831 CollExp.push_back(Exp);
2841 const int nq = Exp->GetTotPoints();
2842 const int nm = Exp->GetNcoeffs();
2851 Exp->GetCoords(xc, yc, zc);
2853 for (
int i = 0; i < nq; ++i)
2855 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2856 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2857 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2859 for (
int i = 1; i < nelmts; ++i)
2867 for (
int i = 0; i < nelmts; ++i)
2869 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2870 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2871 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2872 tmp = coeffs1 + i * nm, 1);
2873 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2874 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2875 tmp = coeffs1 + i * nm, 1);
2881 double epsilon = 1.0e-8;
2882 for (
int i = 0; i < coeffs1.size(); ++i)
2884 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2885 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2886 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2891 TestPrismIProductWRTDerivBase_MatriFree_UniformP_Undeformed_MultiElmt)
2909 unsigned int numQuadPoints = 7;
2910 unsigned int numModes = 6;
2931 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2941 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
2943 unsigned int nelmts = 1;
2945 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2946 for (
unsigned int i = 0; i < nelmts; ++i)
2948 CollExp.push_back(Exp);
2961 const int nq = Exp->GetTotPoints();
2962 const int nm = Exp->GetNcoeffs();
2971 Exp->GetCoords(xc, yc, zc);
2973 for (
int i = 0; i < nq; ++i)
2975 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2976 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2977 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2979 for (
int i = 1; i < nelmts; ++i)
2987 for (
int i = 0; i < nelmts; ++i)
2989 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffsRef + i * nm);
2990 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs + i * nm);
2991 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
2992 tmp = coeffsRef + i * nm, 1);
2993 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs + i * nm);
2994 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
2995 tmp = coeffsRef + i * nm, 1);
3001 double epsilon = 1.0e-8;
3002 for (
int i = 0; i < coeffsRef.size(); ++i)
3004 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3005 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3006 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3011 TestPrismIProductWRTDerivBase_MatriFree_UniformP_Deformed_MultiElmt)
3029 unsigned int numQuadPoints = 7;
3030 unsigned int numModes = 6;
3051 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3061 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
3063 unsigned int nelmts = 1;
3065 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3066 for (
unsigned int i = 0; i < nelmts; ++i)
3068 CollExp.push_back(Exp);
3081 const int nq = Exp->GetTotPoints();
3082 const int nm = Exp->GetNcoeffs();
3091 Exp->GetCoords(xc, yc, zc);
3093 for (
int i = 0; i < nq; ++i)
3095 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
3096 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
3097 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
3099 for (
int i = 1; i < nelmts; ++i)
3107 for (
int i = 0; i < nelmts; ++i)
3109 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffsRef + i * nm);
3110 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs + i * nm);
3111 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
3112 tmp = coeffsRef + i * nm, 1);
3113 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs + i * nm);
3114 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
3115 tmp = coeffsRef + i * nm, 1);
3121 double epsilon = 1.0e-8;
3122 for (
int i = 0; i < coeffsRef.size(); ++i)
3124 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3125 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3126 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3131 TestPrismIProductWRTDerivBase_MatriFree_UniformP_Deformed_OverInt_MultiElmt)
3149 unsigned int numQuadPoints = 12;
3150 unsigned int numModes = 6;
3171 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3181 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
3183 unsigned int nelmts = 1;
3185 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3186 for (
unsigned int i = 0; i < nelmts; ++i)
3188 CollExp.push_back(Exp);
3201 const int nq = Exp->GetTotPoints();
3202 const int nm = Exp->GetNcoeffs();
3211 Exp->GetCoords(xc, yc, zc);
3213 for (
int i = 0; i < nq; ++i)
3215 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
3216 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
3217 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
3219 for (
int i = 1; i < nelmts; ++i)
3227 for (
int i = 0; i < nelmts; ++i)
3229 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffsRef + i * nm);
3230 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs + i * nm);
3231 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
3232 tmp = coeffsRef + i * nm, 1);
3233 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs + i * nm);
3234 Vmath::Vadd(nm, coeffsRef + i * nm, 1, coeffs + i * nm, 1,
3235 tmp = coeffsRef + i * nm, 1);
3241 double epsilon = 1.0e-8;
3242 for (
int i = 0; i < coeffsRef.size(); ++i)
3244 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3245 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3246 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3268 unsigned int numQuadPoints = 7;
3269 unsigned int numModes = 6;
3290 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3300 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
3304 basisKeyDir1, basisKeyDir1, basisKeyDir1);
3308 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3309 for (
int i = 0; i < nelmts; ++i)
3311 CollExp.push_back(Exp);
3330 const int nm = Exp->GetNcoeffs();
3335 for (
int i = 0; i < nm; ++i)
3340 for (
int i = 1; i < nelmts; ++i)
3342 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3348 for (
int i = 0; i < nelmts; ++i)
3351 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3356 double epsilon = 1.0e-8;
3357 for (
int i = 0; i < coeffsRef.size(); ++i)
3359 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3360 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3361 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3383 unsigned int numQuadPoints = 7;
3384 unsigned int numModes = 6;
3405 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3415 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
3419 basisKeyDir1, basisKeyDir1, basisKeyDir1);
3423 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3424 for (
int i = 0; i < nelmts; ++i)
3426 CollExp.push_back(Exp);
3439 const int nm = Exp->GetNcoeffs();
3444 for (
int i = 0; i < nm; ++i)
3449 for (
int i = 1; i < nelmts; ++i)
3451 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3457 for (
int i = 0; i < nelmts; ++i)
3460 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3465 double epsilon = 1.0e-8;
3466 for (
int i = 0; i < coeffsRef.size(); ++i)
3468 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3469 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3470 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3492 unsigned int numQuadPoints = 10;
3493 unsigned int numModes = 6;
3514 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3524 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
3528 basisKeyDir1, basisKeyDir1, basisKeyDir1);
3532 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3533 for (
int i = 0; i < nelmts; ++i)
3535 CollExp.push_back(Exp);
3548 const int nm = Exp->GetNcoeffs();
3553 for (
int i = 0; i < nm; ++i)
3558 for (
int i = 1; i < nelmts; ++i)
3560 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3566 for (
int i = 0; i < nelmts; ++i)
3569 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3574 double epsilon = 1.0e-8;
3575 for (
int i = 0; i < coeffsRef.size(); ++i)
3577 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3578 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3579 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3601 unsigned int numQuadPoints = 7;
3602 unsigned int numModes = 6;
3623 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3633 basisKeyDir1, basisKeyDir2, basisKeyDir3, prismGeom);
3637 basisKeyDir1, basisKeyDir1, basisKeyDir1);
3641 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3642 for (
int i = 0; i < nelmts; ++i)
3644 CollExp.push_back(Exp);
3663 const int nm = Exp->GetNcoeffs();
3668 for (
int i = 0; i < nm; ++i)
3673 for (
int i = 1; i < nelmts; ++i)
3675 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3681 for (
int i = 0; i < nelmts; ++i)
3684 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3689 double epsilon = 1.0e-8;
3690 for (
int i = 0; i < coeffsRef.size(); ++i)
3692 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3693 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3694 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], 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)
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 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< PrismExp > PrismExpSharedPtr
SpatialDomains::PrismGeomSharedPtr CreatePrism(SpatialDomains::PointGeomSharedPtr v0, SpatialDomains::PointGeomSharedPtr v1, SpatialDomains::PointGeomSharedPtr v2, SpatialDomains::PointGeomSharedPtr v3, SpatialDomains::PointGeomSharedPtr v4, SpatialDomains::PointGeomSharedPtr v5)
BOOST_AUTO_TEST_CASE(TestPrismBwdTrans_IterPerExp_UniformP_MultiElmt)
SpatialDomains::SegGeomSharedPtr CreateSegGeom(unsigned int id, SpatialDomains::PointGeomSharedPtr v0, SpatialDomains::PointGeomSharedPtr v1)
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
std::shared_ptr< PrismGeom > PrismGeomSharedPtr
std::shared_ptr< SegGeom > SegGeomSharedPtr
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::shared_ptr< TriGeom > TriGeomSharedPtr
std::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
std::map< ConstFactorType, NekDouble > ConstFactorMap
StdRegions::ConstFactorMap factors
The above copyright notice and this permission notice shall be included.
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)