55 :
StdExpansion(LibUtilities::StdTriData::getNumberOfCoefficients(
56 Ba.GetNumModes(), Bb.GetNumModes()),
59 Ba.GetNumModes(), Bb.GetNumModes()),
63 "order in 'a' direction is higher than order "
95 int nquad0 =
m_base[0]->GetNumPoints();
96 int nquad1 =
m_base[1]->GetNumPoints();
106 if (out_d0.size() > 0)
110 for (i = 0; i < nquad1; ++i)
112 Vmath::Smul(nquad0, wsp[i], &out_d0[0] + i * nquad0, 1,
113 &out_d0[0] + i * nquad0, 1);
117 if (out_d1.size() > 0)
123 for (i = 0; i < nquad1; ++i)
125 Vmath::Vvtvp(nquad0, &wsp[0], 1, &out_d0[0] + i * nquad0, 1,
126 &out_d1[0] + i * nquad0, 1,
127 &out_d1[0] + i * nquad0, 1);
131 else if (out_d1.size() > 0)
136 for (i = 0; i < nquad1; ++i)
138 Vmath::Smul(nquad0, wsp[i], &diff0[0] + i * nquad0, 1,
139 &diff0[0] + i * nquad0, 1);
145 for (i = 0; i < nquad1; ++i)
147 Vmath::Vvtvp(nquad0, &wsp[0], 1, &diff0[0] + i * nquad0, 1,
148 &out_d1[0] + i * nquad0, 1, &out_d1[0] + i * nquad0,
168 "Basis[1] is not of general tensor type");
173 int nquad0 =
m_base[0]->GetNumPoints();
174 int nquad1 =
m_base[1]->GetNumPoints();
175 int nmodes0 =
m_base[0]->GetNumModes();
176 int nmodes1 =
m_base[1]->GetNumModes();
178 std::vector<vec_t, tinysimd::allocator<vec_t>> wsp0(nmodes0);
189#define BWDTRANS_DEF \
190 BwdTransTriKernel<false>(nmodes0, nmodes1, nquad0, nquad1, isModified, \
191 base0.data(), base1.data(), wsp0.data(), \
192 (const vec_t *)inarray.data(), \
193 (vec_t *)outarray.data())
197#define BWDTRANS_Q(r, i) \
199 BwdTransTriKernel<false>(NM(i), NM(i), NQ(i), NQ_M1(i), isModified, \
200 base0.data(), base1.data(), wsp0.data(), \
201 (const vec_t *)inarray.data(), \
202 (vec_t *)outarray.data()); \
207#define BWDTRANS_M(r, i) \
212 BOOST_PP_FOR_##r((NM(i), NM_P1(i), BOOST_PP_MUL(2, NM(i))), \
213 STDLEV2TEST1, STDLEV2UPDATE1, BWDTRANS_Q) default \
223 if ((nmodes0 == nmodes1) && (nquad0 == nquad1 + 1))
245 int npoints[2] = {
m_base[0]->GetNumPoints(),
m_base[1]->GetNumPoints()};
246 int nmodes[2] = {
m_base[0]->GetNumModes(),
m_base[1]->GetNumModes()};
248 fill(outarray.data(), outarray.data() +
m_ncoeffs, 0.0);
252 for (i = 0; i < 3; i++)
258 for (i = 0; i < npoints[0]; i++)
260 physEdge[0][i] = inarray[i];
263 for (i = 0; i < npoints[1]; i++)
265 physEdge[1][i] = inarray[npoints[0] - 1 + i * npoints[0]];
267 inarray[(npoints[1] - 1) * npoints[0] - i * npoints[0]];
272 m_base[0]->GetBasisKey()),
274 m_base[1]->GetBasisKey())};
280 for (i = 0; i < 3; i++)
282 segexp[i != 0]->FwdTransBndConstrained(physEdge[i], coeffEdge[i]);
285 for (j = 0; j < nmodes[i != 0]; j++)
288 outarray[mapArray[j]] =
sign * coeffEdge[i][j];
308 int nInteriorDofs =
m_ncoeffs - nBoundaryDofs;
315 for (i = 0; i < nInteriorDofs; i++)
317 rhs[i] = tmp1[mapArray[i]];
320 Blas::Gemv(
'N', nInteriorDofs, nInteriorDofs, 1.0, &(matsys->GetPtr())[0],
321 nInteriorDofs, rhs.data(), 1, 0.0, result.data(), 1);
323 for (i = 0; i < nInteriorDofs; i++)
325 outarray[mapArray[i]] = result[i];
355 const bool Deformed, [[maybe_unused]]
const bool CollDir0,
356 [[maybe_unused]]
const bool CollDir1)
358 int nquad0 =
m_base[0]->GetNumPoints();
359 int nquad1 =
m_base[1]->GetNumPoints();
360 int order0 =
m_base[0]->GetNumModes();
361 int order1 =
m_base[1]->GetNumModes();
363 const bool isModified =
366 std::vector<vec_t, tinysimd::allocator<vec_t>> wsp0(nquad1);
377#undef IPRODUCTWRTBASE_DEF
378#define IPRODUCTWRTBASE_DEF \
379 IProductTriKernel<false, false, true>( \
380 order0, order1, nquad0, nquad1, isModified, \
381 (const vec_t *)inarray.data(), base0.data(), base1.data(), \
382 m_weights[0].data(), m_weights[1].data(), (const vec_t *)jac.data(), \
383 (vec_t *)wsp0.data(), (vec_t *)outarray.data())
386#undef IPRODUCTWRTBASE_Q
387#define IPRODUCTWRTBASE_Q(r, i) \
389 IProductTriKernel<false, false, true>( \
390 NM(i), NM(i), NQ(i), NQ_M1(i), isModified, \
391 (const vec_t *)inarray.data(), base0.data(), base1.data(), \
392 m_weights[0].data(), m_weights[1].data(), \
393 (const vec_t *)jac.data(), (vec_t *)wsp0.data(), \
394 (vec_t *)outarray.data()); \
398#undef IPRODUCTWRTBASE_M
399#define IPRODUCTWRTBASE_M(r, i) \
404 BOOST_PP_FOR_##r((NM(i), NM_P1(i), BOOST_PP_MUL(2, NM(i))), \
405 STDLEV2TEST1, STDLEV2UPDATE1, \
406 IPRODUCTWRTBASE_Q) default : IPRODUCTWRTBASE_DEF; \
414 if ((order0 == order1) && (nquad0 == nquad1 + 1))
433#undef IPRODUCTWRTBASE_DEF
434#define IPRODUCTWRTBASE_DEF \
435 IProductTriKernel<false, false, false>( \
436 order0, order1, nquad0, nquad1, isModified, \
437 (const vec_t *)inarray.data(), base0.data(), base1.data(), \
438 m_weights[0].data(), m_weights[1].data(), (const vec_t *)jac.data(), \
439 (vec_t *)wsp0.data(), (vec_t *)outarray.data())
442#undef IPRODUCTWRTBASE_Q
443#define IPRODUCTWRTBASE_Q(r, i) \
445 IProductTriKernel<false, false, false>( \
446 NM(i), NM(i), NQ(i), NQ_M1(i), isModified, \
447 (const vec_t *)inarray.data(), base0.data(), base1.data(), \
448 m_weights[0].data(), m_weights[1].data(), \
449 (const vec_t *)jac.data(), (vec_t *)wsp0.data(), \
450 (vec_t *)outarray.data()); \
454#undef IPRODUCTWRTBASE_M
455#define IPRODUCTWRTBASE_M(r, i) \
460 BOOST_PP_FOR_##r((NM(i), NM_P1(i), BOOST_PP_MUL(2, NM(i))), \
461 STDLEV2TEST1, STDLEV2UPDATE1, \
462 IPRODUCTWRTBASE_Q) default : IPRODUCTWRTBASE_DEF; \
470 if ((order0 == order1) && (nquad0 == nquad1 + 1))
492 int nquad0 =
m_base[0]->GetNumPoints();
493 int nquad1 =
m_base[1]->GetNumPoints();
494 int nqtot = nquad0 * nquad1;
500 for (
int i = 0; i < nquad1; ++i)
502 Vmath::Smul(nquad0, gfac[i], &inarray[0] + i * nquad0, 1,
503 &tmpQuad[0] + i * nquad0, 1);
511 m_base[1]->GetBdata(), tmpQuad, outarray,
521 for (
int i = 0; i < nquad1; ++i)
523 Vmath::Vmul(nquad0, &gfac[0], 1, &tmpQuad[0] + i * nquad0, 1,
524 &tmpQuad[0] + i * nquad0, 1);
528 m_base[1]->GetBdata(), tmpQuad, tmpCoeff,
532 m_base[1]->GetDbdata(), inarray, outarray,
541 ASSERTL1(
false,
"input dir is out of range");
566 eta[0] = 2. * (1. + xi[0]) / d1 - 1.0;
573 xi[0] = (1.0 + eta[0]) * (1.0 - eta[1]) * 0.5 - 1.0;
580 int nquad0 =
m_base[0]->GetNumPoints();
581 int nquad1 =
m_base[1]->GetNumPoints();
582 int order0 =
m_base[0]->GetNumModes();
583 int order1 =
m_base[1]->GetNumModes();
589 "total expansion order");
592 for (i = 0; i < order0; ++i, m += order1 - i)
608 for (i = 0; i < nquad1; ++i)
611 1, &outarray[0] + i * nquad0, 1);
615 for (i = 0; i < nquad0; ++i)
618 &outarray[0] + i, nquad0, &outarray[0] + i, nquad0);
630 const int nm1 =
m_base[1]->GetNumModes();
631 const double c = 1 + 2 * nm1;
632 const int mode0 = floor(0.5 * (c -
sqrt(c * c - 8 * mode)));
637 return StdExpansion::BaryEvaluateBasis<1>(coll[1], 1);
641 return StdExpansion::BaryEvaluateBasis<0>(coll[0], mode0) *
642 StdExpansion::BaryEvaluateBasis<1>(coll[1], mode);
649 std::array<NekDouble, 3> &firstOrderDerivs)
656 if ((1 - coll[1]) < 1e-5)
663 I[0] =
GetBase()[0]->GetI(coll);
664 I[1] =
GetBase()[1]->GetI(coll + 1);
678 temp = firstOrderDerivs[0];
681 firstOrderDerivs[0] = firstOrderDerivs[0] * fac0;
684 NekDouble fac1 = fac0 * (coll[0] + 1) / 2;
687 firstOrderDerivs[1] += fac1 * temp;
710 "BasisType is not a boundary interior form");
712 "BasisType is not a boundary interior form");
720 "BasisType is not a boundary interior form");
722 "BasisType is not a boundary interior form");
729 ASSERTL2(i >= 0 && i <= 2,
"edge id is out of range");
743 ASSERTL2(i >= 0 && i <= 2,
"edge id is out of range");
757 ASSERTL2((i >= 0) && (i <= 2),
"edge id is out of range");
770 const std::vector<unsigned int> &nummodes,
int &modes_offset)
773 nummodes[modes_offset], nummodes[modes_offset + 1]);
789 for (i = 0; i < nq1; ++i)
791 for (j = 0; j < nq0; ++j)
793 coords_0[i * nq0 + j] = (1 + z0[j]) * (1 - z1[i]) / 2.0 - 1.0;
795 Vmath::Fill(nq0, z1[i], &coords_1[0] + i * nq0, 1);
806 const int i, [[maybe_unused]]
const int j,
807 [[maybe_unused]]
bool UseGLL)
const
809 ASSERTL2(i >= 0 && i <= 2,
"edge id is out of range");
825 return m_base[dir]->GetBasisKey();
831 "Unexpected points distribution " +
834 " in StdTriExp::v_GetTraceBasisKey");
848 m_base[dir]->GetNumModes(),
849 m_base[dir]->GetPointsKey());
862 m_base[dir]->GetNumModes(),
866 case LibUtilities::eGaussRadauMAlpha1Beta0:
876 m_base[dir]->GetNumModes(),
899 m_base[dir]->GetNumModes(),
913 m_base[dir]->GetNumModes(),
920 "Unexpected points distribution " +
923 " in StdTriExp::v_GetTraceBasisKey");
938 m_base[dir]->GetNumModes(),
939 m_base[dir]->GetPointsKey());
948 m_base[dir]->GetNumModes(),
949 m_base[dir]->GetPointsKey());
955 "Unexpected points distribution " +
958 " in StdTriExp::v_GetTraceBasisKey");
971 m_base[dir]->GetNumModes(),
972 m_base[dir]->GetPointsKey());
985 m_base[dir]->GetNumModes(),
989 case LibUtilities::eGaussRadauMAlpha1Beta0:
999 m_base[dir]->GetNumModes(),
1019 m_base[dir]->GetNumModes(),
1026 "Unexpected points distribution " +
1029 " in StdTriExp::v_GetTraceBasisKey");
1037 "Information not available to set edge key");
1051 "Mapping not defined for this type of basis");
1054 if (useCoeffPacking ==
true)
1056 switch (localVertexId)
1070 localDOF =
m_base[1]->GetNumModes();
1075 ASSERTL0(
false,
"eid must be between 0 and 2");
1082 switch (localVertexId)
1091 localDOF =
m_base[1]->GetNumModes();
1101 ASSERTL0(
false,
"eid must be between 0 and 2");
1114 "Expansion not of a proper type");
1118 int nummodes0, nummodes1;
1125 nummodes0 =
m_base[0]->GetNumModes();
1126 nummodes1 =
m_base[1]->GetNumModes();
1128 startvalue = 2 * nummodes1;
1130 for (i = 0; i < nummodes0 - 2; i++)
1132 for (j = 0; j < nummodes1 - 3 - i; j++)
1134 outarray[cnt++] = startvalue + j;
1136 startvalue += nummodes1 - 2 - i;
1144 "Expansion not of expected type");
1147 int nummodes0, nummodes1;
1155 nummodes0 =
m_base[0]->GetNumModes();
1156 nummodes1 =
m_base[1]->GetNumModes();
1158 value = 2 * nummodes1 - 1;
1159 for (i = 0; i < value; i++)
1165 for (i = 0; i < nummodes0 - 2; i++)
1167 outarray[cnt++] = value;
1168 value += nummodes1 - 2 - i;
1178 "Mapping not defined for this type of basis");
1180 ASSERTL1(eid < 3,
"eid must be between 0 and 2");
1183 int order0 =
m_base[0]->GetNumModes();
1184 int order1 =
m_base[1]->GetNumModes();
1185 int numModes = (eid == 0) ? order0 : order1;
1187 if (maparray.size() != numModes)
1197 for (i = 0; i < numModes; cnt += order1 - i, ++i)
1205 maparray[0] = order1;
1207 for (i = 2; i < numModes; i++)
1209 maparray[i] = order1 - 1 + i;
1215 for (i = 0; i < numModes; i++)
1222 ASSERTL0(
false,
"eid must be between 0 and 2");
1233 "Mapping not defined for this type of basis");
1235 const int nummodes1 =
m_base[1]->GetNumModes();
1238 if (maparray.size() != nEdgeIntCoeffs)
1243 if (signarray.size() != nEdgeIntCoeffs)
1249 fill(signarray.data(), signarray.data() + nEdgeIntCoeffs, 1);
1256 int cnt = 2 * nummodes1 - 1;
1257 for (i = 0; i < nEdgeIntCoeffs; cnt += nummodes1 - 2 - i, ++i)
1265 for (i = 0; i < nEdgeIntCoeffs; i++)
1267 maparray[i] = nummodes1 + 1 + i;
1273 for (i = 0; i < nEdgeIntCoeffs; i++)
1275 maparray[i] = 2 + i;
1281 ASSERTL0(
false,
"eid must be between 0 and 2");
1288 for (i = 1; i < nEdgeIntCoeffs; i += 2)
1312 nq0 =
m_base[0]->GetNumPoints();
1313 nq1 =
m_base[1]->GetNumPoints();
1334 for (
int i = 0; i < nq; ++i)
1336 for (
int j = 0; j < nq - i; ++j, ++cnt)
1339 coords[cnt][0] = -1.0 + 2 * j / (
NekDouble)(nq - 1);
1340 coords[cnt][1] = -1.0 + 2 * i / (
NekDouble)(nq - 1);
1344 for (
int i = 0; i < neq - 1; ++i)
1348 I[0] =
m_base[0]->GetI(coll);
1349 I[1] =
m_base[1]->GetI(coll + 1);
1352 for (
int j = 0; j < nq1; ++j)
1358 Mat->GetRawPtr() + j * nq0 * neq + i, neq);
1365 I[1] =
m_base[1]->GetI(coll + 1);
1368 for (
int j = 0; j < nq1; ++j)
1373 Mat->GetRawPtr() + j * nq0 * neq + neq - 1, neq);
1382 nq0 =
m_base[0]->GetNumPoints();
1383 nq1 =
m_base[1]->GetNumPoints();
1418 I[0] =
m_base[0]->GetI(coll);
1419 I[1] =
m_base[1]->GetI(coll + 1);
1422 for (
int j = 0; j < nq1; ++j)
1428 Mat->GetRawPtr() + j * nq0 * neq + row, neq);
1433 for (
int i = 0; i < nq - 2; ++i)
1435 coords[0] = x[3 + i];
1436 coords[1] = y[3 + i];
1439 I[0] =
m_base[0]->GetI(coll);
1440 I[1] =
m_base[1]->GetI(coll + 1);
1443 for (
int j = 0; j < nq1; ++j)
1449 Mat->GetRawPtr() + j * nq0 * neq + row, neq);
1459 I[0] =
m_base[0]->GetI(coll);
1460 I[1] =
m_base[1]->GetI(coll + 1);
1463 for (
int j = 0; j < nq1; ++j)
1469 Mat->GetRawPtr() + j * nq0 * neq + row, neq);
1475 for (
int i = 0; i < nq - 2; ++i)
1479 coords[0] = x[3 * (nq - 1) - i - 1];
1480 coords[1] = y[3 * (nq - 1) - i - 1];
1484 I[0] =
m_base[0]->GetI(coll);
1485 I[1] =
m_base[1]->GetI(coll + 1);
1488 for (
int j = 0; j < nq1; ++j)
1494 Mat->GetRawPtr() + j * nq0 * neq + row, neq);
1498 for (
int j = 0; j < nq - 3 - i; ++j)
1500 coords[0] = x[3 * (nq - 1) + cnt];
1501 coords[1] = y[3 * (nq - 1) + cnt];
1504 I[0] =
m_base[0]->GetI(coll);
1505 I[1] =
m_base[1]->GetI(coll + 1);
1508 for (
int j = 0; j < nq1; ++j)
1514 Mat->GetRawPtr() + j * nq0 * neq + row,
1522 coords[0] = x[3 + (nq - 2) + i];
1523 coords[1] = y[3 + (nq - 2) + i];
1526 I[0] =
m_base[0]->GetI(coll);
1527 I[1] =
m_base[1]->GetI(coll + 1);
1530 for (
int j = 0; j < nq1; ++j)
1536 Mat->GetRawPtr() + j * nq0 * neq + row, neq);
1544 I[1] =
m_base[1]->GetI(coll + 1);
1547 for (
int j = 0; j < nq1; ++j)
1552 Mat->GetRawPtr() + j * nq0 * neq + neq - 1, neq);
1559 int nm0 =
m_base[0]->GetNumPoints();
1560 int nm1 =
m_base[1]->GetNumPoints();
1570 neq =
max(nm0, nm1);
1575 m_base[0]->GetPointsKey());
1577 m_base[1]->GetPointsKey());
1600 for (
int j = 0; j < ncoeffs; ++j)
1603 Vmath::Smul(nqtot, val, qmode.data(), 1, ptr + j * nqtot, 1);
1606 for (
int i = 1; i < ncoeffs; ++i)
1611 for (
int j = 0; j < ncoeffs; ++j)
1614 Vmath::Svtvp(nqtot, val, qmode.data(), 1, ptr + j * nqtot,
1615 1, ptr + j * nqtot, 1);
1679 int qa =
m_base[0]->GetNumPoints();
1680 int qb =
m_base[1]->GetNumPoints();
1681 int nmodes_a =
m_base[0]->GetNumModes();
1682 int nmodes_b =
m_base[1]->GetNumModes();
1695 OrthoExp.
FwdTrans(array, orthocoeffs);
1706 for (
int j = 0; j < nmodes_a; ++j)
1708 for (
int k = 0; k < nmodes_b - j; ++k, ++cnt)
1711 pow((1.0 * j) / (nmodes_a - 1), cutoff * nmodes_a),
1712 pow((1.0 * k) / (nmodes_b - 1), cutoff * nmodes_b));
1714 orthocoeffs[cnt] *= (SvvDiffCoeff * fac);
1725 max_ab =
max(max_ab, 0);
1729 for (
int j = 0; j < nmodes_a; ++j)
1731 for (
int k = 0; k < nmodes_b - j; ++k, ++cnt)
1733 int maxjk =
max(j, k);
1736 orthocoeffs[cnt] *= SvvDiffCoeff *
kSVVDGFilter[max_ab][maxjk];
1745 min(nmodes_a, nmodes_b));
1748 int nmodes =
min(nmodes_a, nmodes_b);
1753 for (
int j = 0; j < nmodes_a; ++j)
1755 for (
int k = 0; k < nmodes_b - j; ++k)
1757 if (j + k >= cutoff)
1761 exp(-(j + k - nmodes) * (j + k - nmodes) /
1762 ((
NekDouble)((j + k - cutoff + epsilon) *
1763 (j + k - cutoff + epsilon)))));
1767 orthocoeffs[cnt] *= 0.0;
1775 OrthoExp.
BwdTrans(orthocoeffs, array);
1782 int n_coeffs = inarray.size();
1783 int nquad0 =
m_base[0]->GetNumPoints();
1784 int nquad1 =
m_base[1]->GetNumPoints();
1786 int nqtot = nquad0 * nquad1;
1789 int nmodes0 =
m_base[0]->GetNumModes();
1790 int nmodes1 =
m_base[1]->GetNumModes();
1805 OrthoTriExp->FwdTrans(phys_tmp, coeff);
1810 for (
int p = 0, mode = 0; p < nmodes0; ++p)
1812 for (
int q = 0; q < nmodes1 - p; ++q, ++mode)
1814 if (p + q >= numMin)
1821 OrthoTriExp->BwdTrans(coeff, phys_tmp);
1832 int np1 =
m_base[0]->GetNumPoints();
1833 int np2 =
m_base[1]->GetNumPoints();
1834 int np =
max(np1, np2);
1841 for (
int i = 0; i < np - 1; ++i)
1844 for (
int j = 0; j < np - i - 2; ++j)
1846 conn[cnt++] = row + j;
1847 conn[cnt++] = row + j + 1;
1848 conn[cnt++] = rowp1 + j;
1850 conn[cnt++] = rowp1 + j + 1;
1851 conn[cnt++] = rowp1 + j;
1852 conn[cnt++] = row + j + 1;
1855 conn[cnt++] = row + np - i - 2;
1856 conn[cnt++] = row + np - i - 1;
1857 conn[cnt++] = rowp1 + np - i - 2;
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
#define sign(a, b)
return the sign(b)*a
#define IPRODUCTWRTBASE_DEF
#define IPRODUCTWRTBASE_M(r, i)
#define STDLEV2TEST(r, state)
#define STDLEV2UPDATE(r, state)
Describes the specification for a Basis.
int GetNumModes() const
Returns the order of the 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.
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d0, Array< OneD, NekDouble > &outarray_d1)
Calculate the 2D derivative in the local tensor/collapsed coordinate at the physical points.
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculate the inner product of inarray with respect to the basis B=base0*base1 and put into outarray.
NekDouble BaryTensorDeriv(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs)
void v_PhysDeriv(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculate the derivative of the physical points in a given direction.
The base class for all shapes.
virtual void v_LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
void FillMode(const int mode, Array< OneD, NekDouble > &outarray)
This function fills the array outarray with the mode-th mode of the expansion.
void WeakDerivMatrixOp_MatFree(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
int NumBndryCoeffs(void) const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
void LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
Convert local cartesian coordinate xi into local collapsed coordinates eta.
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
const Array< OneD, const LibUtilities::BasisSharedPtr > & GetBase() const
This function gets the shared point to basis.
DNekMatSharedPtr CreateGeneralMatrix(const StdMatrixKey &mkey)
this function generates the mass matrix
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
NekDouble PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
This function evaluates the expansion at a single (arbitrary) point of the domain.
void GetTraceToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Backward transformation from coefficient space to physical space.
int GetTraceNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th trace.
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
LibUtilities::NekManager< StdMatrixKey, DNekBlkMat, StdMatrixKey::opLess > m_stdStaticCondMatrixManager
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
Array< OneD, const NekDouble > GetStdFac(const StdFacKey &mkey)
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
std::vector< Array< OneD, const NekDouble > > m_weights
void MassMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
MatrixType GetMatrixType() const
NekDouble GetConstFactor(const ConstFactorType &factor) const
bool ConstFactorExists(const ConstFactorType &factor) const
void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
int v_GetTraceNumPoints(const int i) const override
void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Backward tranform for triangular elements.
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_LocCollapsedToLocCoord(const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
void v_GetCoords(Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z) override
int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset) override
const LibUtilities::BasisKey v_GetTraceBasisKey(const int i, const int j, bool UseGLL=false) const override
void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true) override
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_GetBoundaryMap(Array< OneD, unsigned int > &outarray) override
int v_GetNtraces() const final
void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
Calculate the derivative of the physical points.
void v_GetTraceInteriorToElementMap(const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards) override
int v_GetVertexMap(int localVertexId, bool useCoeffPacking=false) override
DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey) override
DNekMatSharedPtr v_GenMatrix(const StdMatrixKey &mkey) override
int v_GetTraceNcoeffs(const int i) const override
void v_GetTraceCoeffMap(const unsigned int traceid, Array< OneD, unsigned int > &maparray) override
bool v_IsBoundaryInteriorExpansion() const override
void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray) override
void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
LibUtilities::ShapeType v_DetShapeType() const override
int v_GetTraceIntNcoeffs(const int i) const override
int v_NumDGBndryCoeffs() const override
void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
NekDouble v_PhysEvaluateBasis(const Array< OneD, const NekDouble > &coords, int mode) final
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
NekDouble v_PhysEvalFirstDeriv(const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
void v_GetInteriorMap(Array< OneD, unsigned int > &outarray) override
int v_GetNverts() const final
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
void v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, const bool CollDir0=false, const bool CollDir1=false) override
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
int v_NumBndryCoeffs() const override
static void Gemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = alpha A x plus beta y where A[m x n].
constexpr int getNumberOfCoefficients(int Na, int Nb)
static const BasisKey NullBasisKey(eNoBasisType, 0, NullPointsKey)
Defines a null basis with no type or points.
const std::string kPointsTypeStr[]
PointsManagerT & PointsManager(void)
@ eGaussRadauMLegendre
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
@ eGaussLegendreWithMP
1D Gauss-Legendre quadrature points with additional x=-1 and x=1 end points
@ eNodalTriElec
2D Nodal Electrostatic Points on a Triangle
@ eGaussGaussAlpha1Beta0
1D Gauss-Jacobi quadrature points,
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eGaussLegendreWithM
1D Gauss-Legendre quadrature points with additional x=-1 point
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
@ eOrtho_A
Principle Orthogonal Functions .
@ eGLL_Lagrange
Lagrange for SEM basis .
@ eOrtho_B
Principle Orthogonal Functions .
@ eModified_A
Principle Modified Functions .
static const NekDouble kNekZeroTol
@ eFactorSVVDGKerDiffCoeff
@ eFactorSVVPowerKerDiffCoeff
const int kSVVDGFiltermodesmin
tinysimd::scalarT< double > vec_t
const int kSVVDGFiltermodesmax
const NekDouble kSVVDGFilter[9][11]
@ ePhysInterpToEquiSpaced
std::shared_ptr< StdTriExp > StdTriExpSharedPtr
std::map< ConstFactorType, NekDouble > ConstFactorMap
std::shared_ptr< StdSegExp > StdSegExpSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
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 Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/x.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
scalarT< T > max(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > min(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > sqrt(scalarT< T > in)