39#include <boost/test/tools/floating_point_comparison.hpp>
40#include <boost/test/unit_test.hpp>
115 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
124 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
134 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
136 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
137 CollExp.push_back(Exp);
150 Exp->BwdTrans(coeffs, phys1);
153 double epsilon = 1.0e-8;
154 for (
int i = 0; i < phys1.size(); ++i)
156 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
183 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
192 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
202 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
206 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
207 for (
int i = 0; i < nelmts; ++i)
209 CollExp.push_back(Exp);
223 for (
int i = 0; i < nelmts; ++i)
225 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
226 tmp = phys1 + i * Exp->GetTotPoints());
231 double epsilon = 1.0e-8;
232 for (
int i = 0; i < phys1.size(); ++i)
234 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
261 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
270 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
280 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
282 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
283 CollExp.push_back(Exp);
292 const int nq = Exp->GetTotPoints();
299 Exp->GetCoords(xc, yc, zc);
301 for (
int i = 0; i < nq; ++i)
303 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
306 Exp->IProductWRTBase(phys, coeffs1);
309 double epsilon = 1.0e-8;
310 for (
int i = 0; i < coeffs1.size(); ++i)
312 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
339 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
350 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
360 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
364 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
365 for (
int i = 0; i < nelmts; ++i)
367 CollExp.push_back(Exp);
377 const int nq = Exp->GetTotPoints();
384 Exp->GetCoords(xc, yc, zc);
386 for (
int i = 0; i < nq; ++i)
388 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
390 Exp->IProductWRTBase(phys, coeffs1);
392 for (
int i = 1; i < nelmts; ++i)
395 Exp->IProductWRTBase(phys + i * nq,
396 tmp = coeffs1 + i * Exp->GetNcoeffs());
400 double epsilon = 1.0e-4;
401 for (
int i = 0; i < coeffs1.size(); ++i)
404 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
405 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
406 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
433 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
442 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
452 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
454 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
455 CollExp.push_back(Exp);
468 Exp->BwdTrans(coeffs, phys1);
471 double epsilon = 1.0e-8;
472 for (
int i = 0; i < phys1.size(); ++i)
474 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
501 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
510 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
520 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
524 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
525 for (
int i = 0; i < nelmts; ++i)
527 CollExp.push_back(Exp);
541 for (
int i = 0; i < nelmts; ++i)
543 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
544 tmp = phys1 + i * Exp->GetTotPoints());
549 double epsilon = 1.0e-8;
550 for (
int i = 0; i < phys1.size(); ++i)
552 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
579 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
588 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
598 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
600 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
601 CollExp.push_back(Exp);
614 Exp->BwdTrans(coeffs, phys1);
617 double epsilon = 1.0e-8;
618 for (
int i = 0; i < phys1.size(); ++i)
620 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
647 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
656 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
666 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
670 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
671 for (
int i = 0; i < nelmts; ++i)
673 CollExp.push_back(Exp);
687 for (
int i = 0; i < nelmts; ++i)
689 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
690 tmp = phys1 + i * Exp->GetTotPoints());
695 double epsilon = 1.0e-8;
696 for (
int i = 0; i < phys1.size(); ++i)
698 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
725 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
734 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
744 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
748 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
749 for (
int i = 0; i < nelmts; ++i)
751 CollExp.push_back(Exp);
765 for (
int i = 0; i < nelmts; ++i)
767 Exp->BwdTrans(coeffs + i * Exp->GetNcoeffs(),
768 tmp = phys1 + i * Exp->GetTotPoints());
773 double epsilon = 1.0e-8;
774 for (
int i = 0; i < phys1.size(); ++i)
776 BOOST_CHECK_CLOSE(phys1[i], phys2[i], epsilon);
793 unsigned int numQuadPoints = 5;
794 unsigned int numModes = 4;
806 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
815 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
825 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
827 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
828 CollExp.push_back(Exp);
843 Exp->BwdTrans(coeffs, physRef);
846 double epsilon = 1.0e-8;
847 for (
int i = 0; i < physRef.size(); ++i)
849 BOOST_CHECK_CLOSE(physRef[i], phys[i], epsilon);
866 unsigned int numQuadPoints = 8;
867 unsigned int numModes = 4;
879 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
888 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
898 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
900 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
901 CollExp.push_back(Exp);
916 Exp->BwdTrans(coeffs, physRef);
919 double epsilon = 1.0e-8;
920 for (
int i = 0; i < physRef.size(); ++i)
922 BOOST_CHECK_CLOSE(physRef[i], phys[i], epsilon);
949 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
958 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
968 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
970 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
971 CollExp.push_back(Exp);
980 const int nq = Exp->GetTotPoints();
987 Exp->GetCoords(xc, yc, zc);
989 for (
int i = 0; i < nq; ++i)
991 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
994 Exp->IProductWRTBase(phys, coeffs1);
997 double epsilon = 1.0e-8;
998 for (
int i = 0; i < coeffs1.size(); ++i)
1000 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1027 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1036 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1046 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1050 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1051 for (
int i = 0; i < nelmts; ++i)
1053 CollExp.push_back(Exp);
1063 const int nq = Exp->GetTotPoints();
1070 Exp->GetCoords(xc, yc, zc);
1072 for (
int i = 0; i < nq; ++i)
1074 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1076 Exp->IProductWRTBase(phys, coeffs1);
1078 for (
int i = 1; i < nelmts; ++i)
1081 Exp->IProductWRTBase(phys + i * nq,
1082 tmp = coeffs1 + i * Exp->GetNcoeffs());
1086 double epsilon = 1.0e-4;
1087 for (
int i = 0; i < coeffs1.size(); ++i)
1090 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1091 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1092 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1119 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1128 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1138 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1140 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1141 CollExp.push_back(Exp);
1150 const int nq = Exp->GetTotPoints();
1157 Exp->GetCoords(xc, yc, zc);
1159 for (
int i = 0; i < nq; ++i)
1161 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1164 Exp->IProductWRTBase(phys, coeffs1);
1167 double epsilon = 1.0e-8;
1168 for (
int i = 0; i < coeffs1.size(); ++i)
1170 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1197 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1208 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1218 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1222 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1223 for (
int i = 0; i < nelmts; ++i)
1225 CollExp.push_back(Exp);
1235 const int nq = Exp->GetTotPoints();
1242 Exp->GetCoords(xc, yc, zc);
1244 for (
int i = 0; i < nq; ++i)
1246 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1248 Exp->IProductWRTBase(phys, coeffs1);
1250 for (
int i = 1; i < nelmts; ++i)
1253 Exp->IProductWRTBase(phys + i * nq,
1254 tmp = coeffs1 + i * Exp->GetNcoeffs());
1258 double epsilon = 1.0e-4;
1259 for (
int i = 0; i < coeffs1.size(); ++i)
1262 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
1263 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
1264 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
1281 unsigned int numQuadPoints = 5;
1282 unsigned int numModes = 4;
1294 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1303 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1313 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1315 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1316 CollExp.push_back(Exp);
1327 const int nq = Exp->GetTotPoints();
1334 Exp->GetCoords(xc, yc, zc);
1336 for (
int i = 0; i < nq; ++i)
1338 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1341 Exp->IProductWRTBase(phys, coeffsRef);
1344 double epsilon = 1.0e-8;
1345 for (
int i = 0; i < coeffsRef.size(); ++i)
1347 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1364 unsigned int numQuadPoints = 5;
1365 unsigned int numModes = 4;
1377 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1386 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1396 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1398 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1399 CollExp.push_back(Exp);
1410 const int nq = Exp->GetTotPoints();
1417 Exp->GetCoords(xc, yc, zc);
1419 for (
int i = 0; i < nq; ++i)
1421 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1424 Exp->IProductWRTBase(phys, coeffsRef);
1427 double epsilon = 1.0e-8;
1428 for (
int i = 0; i < coeffsRef.size(); ++i)
1430 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1435 TestTetIProductWRTBase_MatrixFree_UniformP_Deformed_OverInt)
1448 unsigned int numQuadPoints = 8;
1449 unsigned int numModes = 4;
1461 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1470 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1480 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1482 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1483 CollExp.push_back(Exp);
1494 const int nq = Exp->GetTotPoints();
1501 Exp->GetCoords(xc, yc, zc);
1503 for (
int i = 0; i < nq; ++i)
1505 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1508 Exp->IProductWRTBase(phys, coeffsRef);
1511 double epsilon = 1.0e-8;
1512 for (
int i = 0; i < coeffsRef.size(); ++i)
1514 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
1541 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1550 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1560 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1562 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1563 CollExp.push_back(Exp);
1572 const int nq = Exp->GetTotPoints();
1578 Exp->GetCoords(xc, yc, zc);
1580 for (
int i = 0; i < nq; ++i)
1582 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1585 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nq, tmp1 = diff1 + 2 * nq);
1587 tmp2 = diff2 + 2 * nq);
1589 double epsilon = 1.0e-8;
1590 for (
int i = 0; i < diff1.size(); ++i)
1592 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1619 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1628 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1638 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1642 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1643 for (
int i = 0; i < nelmts; ++i)
1645 CollExp.push_back(Exp);
1655 const int nq = Exp->GetTotPoints();
1661 Exp->GetCoords(xc, yc, zc);
1663 for (
int i = 0; i < nq; ++i)
1665 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1667 Exp->PhysDeriv(phys, diff1, tmp1 = diff1 + (nelmts)*nq,
1668 tmp2 = diff1 + (2 * nelmts) * nq);
1670 for (
int i = 1; i < nelmts; ++i)
1673 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
1674 tmp1 = diff1 + (nelmts + i) * nq,
1675 tmp2 = diff1 + (2 * nelmts + i) * nq);
1679 tmp = diff2 + nelmts * nq, tmp2 = diff2 + 2 * nelmts * nq);
1681 double epsilon = 1.0e-8;
1682 for (
int i = 0; i < diff1.size(); ++i)
1684 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1711 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1720 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1730 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1732 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1733 CollExp.push_back(Exp);
1742 const int nq = Exp->GetTotPoints();
1748 Exp->GetCoords(xc, yc, zc);
1750 for (
int i = 0; i < nq; ++i)
1752 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1755 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nq, tmp1 = diff1 + 2 * nq);
1757 tmp2 = diff2 + 2 * nq);
1759 double epsilon = 1.0e-8;
1760 for (
int i = 0; i < diff1.size(); ++i)
1762 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1789 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1798 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1808 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1812 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1813 for (
int i = 0; i < nelmts; ++i)
1815 CollExp.push_back(Exp);
1825 const int nq = Exp->GetTotPoints();
1831 Exp->GetCoords(xc, yc, zc);
1833 for (
int i = 0; i < nq; ++i)
1835 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1837 Exp->PhysDeriv(phys, diff1, tmp1 = diff1 + (nelmts)*nq,
1838 tmp2 = diff1 + (2 * nelmts) * nq);
1840 for (
int i = 1; i < nelmts; ++i)
1843 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
1844 tmp1 = diff1 + (nelmts + i) * nq,
1845 tmp2 = diff1 + (2 * nelmts + i) * nq);
1849 tmp = diff2 + nelmts * nq, tmp2 = diff2 + 2 * nelmts * nq);
1851 double epsilon = 1.0e-8;
1852 for (
int i = 0; i < diff1.size(); ++i)
1854 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1881 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1890 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1900 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1902 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1903 CollExp.push_back(Exp);
1912 const int nq = Exp->GetTotPoints();
1918 Exp->GetCoords(xc, yc, zc);
1920 for (
int i = 0; i < nq; ++i)
1922 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
1925 Exp->PhysDeriv(phys, diff1, tmp = diff1 + nq, tmp1 = diff1 + 2 * nq);
1927 tmp2 = diff2 + 2 * nq);
1929 double epsilon = 1.0e-8;
1930 for (
int i = 0; i < diff1.size(); ++i)
1932 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
1959 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
1968 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
1978 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
1982 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
1983 for (
int i = 0; i < nelmts; ++i)
1985 CollExp.push_back(Exp);
1995 const int nq = Exp->GetTotPoints();
2001 Exp->GetCoords(xc, yc, zc);
2003 for (
int i = 0; i < nq; ++i)
2005 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2007 Exp->PhysDeriv(phys, diff1, tmp1 = diff1 + (nelmts)*nq,
2008 tmp2 = diff1 + (2 * nelmts) * nq);
2010 for (
int i = 1; i < nelmts; ++i)
2013 Exp->PhysDeriv(phys, tmp = diff1 + i * nq,
2014 tmp1 = diff1 + (nelmts + i) * nq,
2015 tmp2 = diff1 + (2 * nelmts + i) * nq);
2019 tmp = diff2 + nelmts * nq, tmp2 = diff2 + 2 * nelmts * nq);
2021 double epsilon = 1.0e-8;
2022 for (
int i = 0; i < diff1.size(); ++i)
2024 BOOST_CHECK_CLOSE(diff1[i], diff2[i], epsilon);
2041 unsigned int numQuadPoints = 5;
2042 unsigned int numModes = 4;
2054 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2063 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2073 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2075 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2076 CollExp.push_back(Exp);
2087 const int nq = Exp->GetTotPoints();
2093 Exp->GetCoords(xc, yc, zc);
2095 for (
int i = 0; i < nq; ++i)
2097 phys[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2100 Exp->PhysDeriv(phys, diffRef, tmp = diffRef + nq, tmp1 = diffRef + 2 * nq);
2102 tmp2 = diff + 2 * nq);
2104 double epsilon = 1.0e-8;
2105 for (
int i = 0; i < diffRef.size(); ++i)
2107 BOOST_CHECK_CLOSE(diffRef[i], diff[i], epsilon);
2134 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2143 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2153 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2155 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2156 CollExp.push_back(Exp);
2165 const int nq = Exp->GetTotPoints();
2166 const int nm = Exp->GetNcoeffs();
2175 Exp->GetCoords(xc, yc, zc);
2177 for (
int i = 0; i < nq; ++i)
2179 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2180 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2181 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2185 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
2186 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
2187 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2188 Exp->IProductWRTDerivBase(2, phys3, coeffs2);
2189 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2194 double epsilon = 1.0e-8;
2195 for (
int i = 0; i < coeffs1.size(); ++i)
2197 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2198 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2199 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2226 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2237 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2247 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2251 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2252 for (
int i = 0; i < nelmts; ++i)
2254 CollExp.push_back(Exp);
2264 const int nq = Exp->GetTotPoints();
2265 const int nm = Exp->GetNcoeffs();
2274 Exp->GetCoords(xc, yc, zc);
2276 for (
int i = 0; i < nq; ++i)
2278 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2279 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2280 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2282 for (
int i = 1; i < nelmts; ++i)
2290 for (
int i = 0; i < nelmts; ++i)
2292 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2293 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2294 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2295 tmp = coeffs1 + i * nm, 1);
2296 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2297 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2298 tmp = coeffs1 + i * nm, 1);
2304 double epsilon = 1.0e-8;
2305 for (
int i = 0; i < coeffs1.size(); ++i)
2307 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2308 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2309 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2336 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2345 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2355 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2357 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2358 CollExp.push_back(Exp);
2367 const int nq = Exp->GetTotPoints();
2368 const int nm = Exp->GetNcoeffs();
2377 Exp->GetCoords(xc, yc, zc);
2379 for (
int i = 0; i < nq; ++i)
2381 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2382 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2383 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2387 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
2388 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
2389 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2390 Exp->IProductWRTDerivBase(2, phys3, coeffs2);
2391 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2396 double epsilon = 1.0e-8;
2397 for (
int i = 0; i < coeffs1.size(); ++i)
2399 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2400 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2401 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2428 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2439 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2449 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2453 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2454 for (
int i = 0; i < nelmts; ++i)
2456 CollExp.push_back(Exp);
2466 const int nq = Exp->GetTotPoints();
2467 const int nm = Exp->GetNcoeffs();
2476 Exp->GetCoords(xc, yc, zc);
2478 for (
int i = 0; i < nq; ++i)
2480 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2481 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2482 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2484 for (
int i = 1; i < nelmts; ++i)
2492 for (
int i = 0; i < nelmts; ++i)
2494 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2495 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2496 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2497 tmp = coeffs1 + i * nm, 1);
2498 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2499 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2500 tmp = coeffs1 + i * nm, 1);
2506 double epsilon = 1.0e-8;
2507 for (
int i = 0; i < coeffs1.size(); ++i)
2509 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2510 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2511 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2538 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2547 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2557 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2559 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2560 CollExp.push_back(Exp);
2569 const int nq = Exp->GetTotPoints();
2570 const int nm = Exp->GetNcoeffs();
2579 Exp->GetCoords(xc, yc, zc);
2581 for (
int i = 0; i < nq; ++i)
2583 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2584 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2585 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2589 Exp->IProductWRTDerivBase(0, phys1, coeffs1);
2590 Exp->IProductWRTDerivBase(1, phys2, coeffs2);
2591 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2592 Exp->IProductWRTDerivBase(2, phys3, coeffs2);
2593 Vmath::Vadd(nm, coeffs1, 1, coeffs2, 1, coeffs1, 1);
2598 double epsilon = 1.0e-7;
2599 for (
int i = 0; i < coeffs1.size(); ++i)
2601 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2602 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2603 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2630 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2641 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2651 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2655 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2656 for (
int i = 0; i < nelmts; ++i)
2658 CollExp.push_back(Exp);
2668 const int nq = Exp->GetTotPoints();
2669 const int nm = Exp->GetNcoeffs();
2678 Exp->GetCoords(xc, yc, zc);
2680 for (
int i = 0; i < nq; ++i)
2682 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
2683 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
2684 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
2686 for (
int i = 1; i < nelmts; ++i)
2694 for (
int i = 0; i < nelmts; ++i)
2696 Exp->IProductWRTDerivBase(0, phys1 + i * nq, tmp = coeffs1 + i * nm);
2697 Exp->IProductWRTDerivBase(1, phys2 + i * nq, tmp = coeffs2 + i * nm);
2698 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2699 tmp = coeffs1 + i * nm, 1);
2700 Exp->IProductWRTDerivBase(2, phys3 + i * nq, tmp = coeffs2 + i * nm);
2701 Vmath::Vadd(nm, coeffs1 + i * nm, 1, coeffs2 + i * nm, 1,
2702 tmp = coeffs1 + i * nm, 1);
2708 double epsilon = 1.0e-7;
2709 for (
int i = 0; i < coeffs1.size(); ++i)
2711 coeffs1[i] = (fabs(coeffs1[i]) < 1e-14) ? 0.0 : coeffs1[i];
2712 coeffs2[i] = (fabs(coeffs2[i]) < 1e-14) ? 0.0 : coeffs2[i];
2713 BOOST_CHECK_CLOSE(coeffs1[i], coeffs2[i], epsilon);
2730 unsigned int numQuadPoints = 5;
2731 unsigned int numModes = 4;
2743 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2752 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2762 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2766 basisKeyDir1, basisKeyDir2, basisKeyDir3);
2770 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2771 for (
int i = 0; i < nelmts; ++i)
2773 CollExp.push_back(Exp);
2792 const int nm = Exp->GetNcoeffs();
2797 for (
int i = 0; i < nm; ++i)
2802 for (
int i = 1; i < nelmts; ++i)
2804 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
2810 for (
int i = 0; i < nelmts; ++i)
2813 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
2818 double epsilon = 1.0e-8;
2819 for (
int i = 0; i < coeffsRef.size(); ++i)
2821 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
2822 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
2823 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
2840 unsigned int numQuadPoints = 5;
2841 unsigned int numModes = 4;
2853 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2862 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2872 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2876 basisKeyDir1, basisKeyDir2, basisKeyDir3);
2880 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2881 for (
int i = 0; i < nelmts; ++i)
2883 CollExp.push_back(Exp);
2896 const int nm = Exp->GetNcoeffs();
2901 for (
int i = 0; i < nm; ++i)
2906 for (
int i = 1; i < nelmts; ++i)
2908 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
2914 for (
int i = 0; i < nelmts; ++i)
2917 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
2922 double epsilon = 1.0e-8;
2923 for (
int i = 0; i < coeffsRef.size(); ++i)
2925 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
2926 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
2927 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
2944 unsigned int numQuadPoints = 8;
2945 unsigned int numModes = 4;
2957 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
2966 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
2976 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
2980 basisKeyDir1, basisKeyDir2, basisKeyDir3);
2984 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
2985 for (
int i = 0; i < nelmts; ++i)
2987 CollExp.push_back(Exp);
3000 const int nm = Exp->GetNcoeffs();
3005 for (
int i = 0; i < nm; ++i)
3010 for (
int i = 1; i < nelmts; ++i)
3012 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3018 for (
int i = 0; i < nelmts; ++i)
3021 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3026 double epsilon = 1.0e-8;
3027 for (
int i = 0; i < coeffsRef.size(); ++i)
3029 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3030 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3031 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3048 unsigned int numQuadPoints = 5;
3049 unsigned int numModes = 4;
3061 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3070 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
3080 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
3082 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3083 CollExp.push_back(Exp);
3094 const int nq = Exp->GetTotPoints();
3095 const int nm = Exp->GetNcoeffs();
3104 Exp->GetCoords(xc, yc, zc);
3106 for (
int i = 0; i < nq; ++i)
3108 phys1[i] = sin(xc[i]) * cos(yc[i]) * sin(zc[i]);
3109 phys2[i] = cos(xc[i]) * sin(yc[i]) * cos(zc[i]);
3110 phys3[i] = cos(xc[i]) * sin(yc[i]) * sin(zc[i]);
3114 Exp->IProductWRTDerivBase(0, phys1, coeffsRef);
3115 Exp->IProductWRTDerivBase(1, phys2, coeffs);
3116 Vmath::Vadd(nm, coeffsRef, 1, coeffs, 1, coeffsRef, 1);
3117 Exp->IProductWRTDerivBase(2, phys3, coeffs);
3118 Vmath::Vadd(nm, coeffsRef, 1, coeffs, 1, coeffsRef, 1);
3123 double epsilon = 1.0e-7;
3124 for (
int i = 0; i < coeffsRef.size(); ++i)
3126 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3127 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3128 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3145 unsigned int numQuadPoints = 5;
3146 unsigned int numModes = 4;
3158 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3167 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
3177 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
3181 basisKeyDir1, basisKeyDir2, basisKeyDir3);
3185 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3186 for (
int i = 0; i < nelmts; ++i)
3188 CollExp.push_back(Exp);
3207 const int nm = Exp->GetNcoeffs();
3212 for (
int i = 0; i < nm; ++i)
3217 for (
int i = 1; i < nelmts; ++i)
3219 Vmath::Vcopy(nm, coeffsIn, 1, tmp = coeffsIn + i * nm, 1);
3225 for (
int i = 0; i < nelmts; ++i)
3228 Exp->GeneralMatrixOp(coeffsIn + i * nm, tmp = coeffsRef + i * nm, mkey);
3233 double epsilon = 1.0e-8;
3234 for (
int i = 0; i < coeffsRef.size(); ++i)
3236 coeffsRef[i] = (
std::abs(coeffsRef[i]) < 1e-14) ? 0.0 : coeffsRef[i];
3237 coeffs[i] = (
std::abs(coeffs[i]) < 1e-14) ? 0.0 : coeffs[i];
3238 BOOST_CHECK_CLOSE(coeffsRef[i], coeffs[i], epsilon);
3256 unsigned int numQuadPoints = 5;
3257 unsigned int numModes = 4;
3269 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3278 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
3288 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
3290 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3291 CollExp.push_back(Exp);
3303 const int nq = Exp->GetTotPoints();
3308 Exp->GetCoords(xc, yc, zc);
3310 for (
int i = 0; i < nq; ++i)
3312 phys[i] = pow(xc[i], 3) + pow(yc[i], 3) + pow(zc[i], 3);
3326 double epsilon = 1.0e-8;
3328 for (
int i = 0; i < nq1; ++i)
3330 NekDouble exact = pow(xc1[i], 3) + pow(yc1[i], 3) + pow(zc1[i], 3);
3331 phys1[i] = (fabs(phys1[i]) < 1e-14) ? 0.0 : phys1[i];
3332 exact = (fabs(exact) < 1e-14) ? 0.0 : exact;
3333 BOOST_CHECK_CLOSE(phys1[i], exact, epsilon);
3351 unsigned int numQuadPoints = 5;
3352 unsigned int numModes = 4;
3364 Nektar::LibUtilities::eGaussRadauMAlpha1Beta0;
3373 Nektar::LibUtilities::eGaussRadauMAlpha2Beta0;
3383 basisKeyDir1, basisKeyDir2, basisKeyDir3, tetGeom);
3385 std::vector<StdRegions::StdExpansionSharedPtr> CollExp;
3386 CollExp.push_back(Exp);
3398 const int nq = Exp->GetTotPoints();
3403 Exp->GetCoords(xc, yc, zc);
3405 for (
int i = 0; i < nq; ++i)
3407 phys[i] = pow(xc[i], 3) + pow(yc[i], 3) + pow(zc[i], 3);
3421 double epsilon = 1.0e-8;
3423 for (
int i = 0; i < nq1; ++i)
3425 NekDouble exact = pow(xc1[i], 3) + pow(yc1[i], 3) + pow(zc1[i], 3);
3426 phys1[i] = (fabs(phys1[i]) < 1e-14) ? 0.0 : phys1[i];
3427 exact = (fabs(exact) < 1e-14) ? 0.0 : exact;
3428 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 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_C
Principle Modified Functions .
@ eModified_A
Principle Modified Functions .
std::shared_ptr< TetExp > TetExpSharedPtr
std::shared_ptr< SegGeom > SegGeomSharedPtr
std::shared_ptr< TetGeom > TetGeomSharedPtr
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::shared_ptr< TriGeom > TriGeomSharedPtr
std::shared_ptr< StdTetExp > StdTetExpSharedPtr
std::map< ConstFactorType, NekDouble > ConstFactorMap
The above copyright notice and this permission notice shall be included.
BOOST_AUTO_TEST_CASE(TestTetBwdTrans_IterPerExp_UniformP)
SpatialDomains::TetGeomSharedPtr CreateTet(SpatialDomains::PointGeomSharedPtr v0, SpatialDomains::PointGeomSharedPtr v1, SpatialDomains::PointGeomSharedPtr v2, SpatialDomains::PointGeomSharedPtr v3)
SpatialDomains::SegGeomSharedPtr CreateSegGeom(unsigned int id, SpatialDomains::PointGeomSharedPtr v0, SpatialDomains::PointGeomSharedPtr v1)
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)