49 Ba.GetNumModes(), (Bb.GetNumModes())),
52 Ba.GetNumModes(), (Bb.GetNumModes())),
57 std::string(
"TriExpMatrix")),
58 m_staticCondMatrixManager(
std::bind(&
Expansion::CreateStaticCondMatrix,
59 this,
std::placeholders::_1),
60 std::string(
"TriExpStaticCondMatrix"))
65 : StdExpansion(T), StdExpansion2D(T), StdTriExp(T),
Expansion(T),
67 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
73 int nquad0 =
m_base[0]->GetNumPoints();
74 int nquad1 =
m_base[1]->GetNumPoints();
82 Vmath::Vmul(nquad0 * nquad1, jac, 1, inarray, 1, tmp, 1);
86 Vmath::Smul(nquad0 * nquad1, jac[0], inarray, 1, tmp, 1);
90 ival = StdTriExp::v_Integral(tmp);
99 int nquad0 =
m_base[0]->GetNumPoints();
100 int nquad1 =
m_base[1]->GetNumPoints();
101 int nqtot = nquad0 * nquad1;
108 StdTriExp::v_PhysDeriv(inarray, diff0, diff1);
115 Vmath::Vvtvp(nqtot, df[1], 1, diff1, 1, out_d0, 1, out_d0, 1);
121 Vmath::Vvtvp(nqtot, df[3], 1, diff1, 1, out_d1, 1, out_d1, 1);
127 Vmath::Vvtvp(nqtot, df[5], 1, diff1, 1, out_d2, 1, out_d2, 1);
178 ASSERTL1(
false,
"input dir is out of range");
193 int nquad0 =
m_base[0]->GetNumPoints();
194 int nquad1 =
m_base[1]->GetNumPoints();
195 int nqtot = nquad0 * nquad1;
204 StdTriExp::v_PhysDeriv(inarray, diff0, diff1);
212 for (
int i = 0; i < 2; ++i)
215 for (
int k = 0; k < (
m_geom->GetCoordim()); ++k)
217 Vmath::Vvtvp(nqtot, &df[2 * k + i][0], 1, &direction[k * nqtot],
218 1, &tangmat[i][0], 1, &tangmat[i][0], 1);
223 Vmath::Vmul(nqtot, &tangmat[0][0], 1, &diff0[0], 1, &out[0], 1);
224 Vmath::Vvtvp(nqtot, &tangmat[1][0], 1, &diff1[0], 1, &out[0], 1,
231 for (
int i = 0; i < 2; ++i)
234 for (
int k = 0; k < (
m_geom->GetCoordim()); ++k)
236 Vmath::Svtvp(nqtot, df[2 * k + i][0], &direction[k * nqtot], 1,
237 &tangmat[i][0], 1, &tangmat[i][0], 1);
242 Vmath::Vmul(nqtot, &tangmat[0][0], 1, &diff0[0], 1, &out[0], 1);
244 Vmath::Vvtvp(nqtot, &tangmat[1][0], 1, &diff1[0], 1, &out[0], 1,
262 out = (*matsys) * in;
270 int npoints[2] = {
m_base[0]->GetNumPoints(),
m_base[1]->GetNumPoints()};
271 int nmodes[2] = {
m_base[0]->GetNumModes(),
m_base[1]->GetNumModes()};
273 fill(outarray.get(), outarray.get() +
m_ncoeffs, 0.0);
275 if (nmodes[0] == 1 && nmodes[1] == 1)
277 outarray[0] = inarray[0];
283 for (i = 0; i < 3; i++)
291 for (i = 0; i < npoints[0]; i++)
293 physEdge[0][i] = inarray[i];
297 for (i = 0; i < npoints[1]; i++)
299 physEdge[1][i] = inarray[npoints[0] - 1 + i * npoints[0]];
300 physEdge[2][i] = inarray[i * npoints[0]];
309 for (i = 1; i < 3; i++)
317 for (i = 1; i < 3; i++)
323 m_base[0]->GetPointsKey(), physEdge[i]);
325 npoints[1] = npoints[0];
335 for (i = 0; i < 3; i++)
337 segexp[i]->FwdTransBndConstrained(physEdge[i], coeffEdge[i]);
342 for (j = 0; j < nmodes[i != 0]; j++)
345 outarray[mapArray[j]] =
sign * coeffEdge[i][j];
350 int nInteriorDofs =
m_ncoeffs - nBoundaryDofs;
352 if (nInteriorDofs > 0)
376 for (i = 0; i < nInteriorDofs; i++)
378 rhs[i] = tmp1[mapArray[i]];
381 Blas::Dgemv(
'N', nInteriorDofs, nInteriorDofs, matsys->Scale(),
382 &((matsys->GetOwnedMatrix())->GetPtr())[0], nInteriorDofs,
383 rhs.get(), 1, 0.0, result.get(), 1);
385 for (i = 0; i < nInteriorDofs; i++)
387 outarray[mapArray[i]] = result[i];
409 int nquad0 =
m_base[0]->GetNumPoints();
410 int nquad1 =
m_base[1]->GetNumPoints();
411 int order0 =
m_base[0]->GetNumModes();
413 if (multiplybyweights)
420 m_base[1]->GetBdata(), tmp, outarray, wsp);
427 m_base[1]->GetBdata(), inarray, outarray,
436 int nquad0 =
m_base[0]->GetNumPoints();
437 int nquad1 =
m_base[1]->GetNumPoints();
438 int nqtot = nquad0 * nquad1;
439 int nmodes0 =
m_base[0]->GetNumModes();
440 int wspsize = max(max(nqtot,
m_ncoeffs), nquad1 * nmodes0);
459 tmp2, outarray, tmp0);
467 ASSERTL1((dir == 0) || (dir == 1) || (dir == 2),
"Invalid direction.");
469 "Invalid direction.");
471 int nquad0 =
m_base[0]->GetNumPoints();
472 int nquad1 =
m_base[1]->GetNumPoints();
473 int nqtot = nquad0 * nquad1;
474 int nmodes0 =
m_base[0]->GetNumModes();
475 int wspsize = max(max(nqtot,
m_ncoeffs), nquad1 * nmodes0);
492 for (
int i = 0; i < nquad1; ++i)
494 gfac0[i] = 2.0 / (1 - z1[i]);
496 for (
int i = 0; i < nquad0; ++i)
498 gfac1[i] = 0.5 * (1 + z0[i]);
501 for (
int i = 0; i < nquad1; ++i)
503 Vmath::Smul(nquad0, gfac0[i], &inarray[0] + i * nquad0, 1,
504 &tmp0[0] + i * nquad0, 1);
507 for (
int i = 0; i < nquad1; ++i)
509 Vmath::Vmul(nquad0, &gfac1[0], 1, &tmp0[0] + i * nquad0, 1,
510 &tmp1[0] + i * nquad0, 1);
515 Vmath::Vmul(nqtot, &df[2 * dir][0], 1, &tmp0[0], 1, &tmp0[0], 1);
516 Vmath::Vmul(nqtot, &df[2 * dir + 1][0], 1, &tmp1[0], 1, &tmp1[0], 1);
517 Vmath::Vmul(nqtot, &df[2 * dir + 1][0], 1, &inarray[0], 1, &tmp2[0], 1);
521 Vmath::Smul(nqtot, df[2 * dir][0], tmp0, 1, tmp0, 1);
522 Vmath::Smul(nqtot, df[2 * dir + 1][0], tmp1, 1, tmp1, 1);
523 Vmath::Smul(nqtot, df[2 * dir + 1][0], inarray, 1, tmp2, 1);
547 int nquad0 =
m_base[0]->GetNumPoints();
548 int nquad1 =
m_base[1]->GetNumPoints();
549 int nqtot = nquad0 * nquad1;
550 int nmodes0 =
m_base[0]->GetNumModes();
551 int wspsize = max(max(nqtot,
m_ncoeffs), nquad1 * nmodes0);
567 for (i = 0; i < nquad1; ++i)
569 gfac0[i] = 2.0 / (1 - z1[i]);
571 for (i = 0; i < nquad0; ++i)
573 gfac1[i] = 0.5 * (1 + z0[i]);
575 for (i = 0; i < nquad1; ++i)
577 Vmath::Smul(nquad0, gfac0[i], &inarray[0] + i * nquad0, 1,
578 &tmp0[0] + i * nquad0, 1);
580 for (i = 0; i < nquad1; ++i)
582 Vmath::Vmul(nquad0, &gfac1[0], 1, &tmp0[0] + i * nquad0, 1,
583 &tmp1[0] + i * nquad0, 1);
590 Vmath::Vmul(nqtot, &dfdir[0][0], 1, &tmp0[0], 1, &tmp0[0], 1);
591 Vmath::Vmul(nqtot, &dfdir[1][0], 1, &tmp1[0], 1, &tmp1[0], 1);
592 Vmath::Vmul(nqtot, &dfdir[1][0], 1, &inarray[0], 1, &tmp2[0], 1);
594 Vmath::Vadd(nqtot, &tmp0[0], 1, &tmp1[0], 1, &tmp1[0], 1);
602 tmp2, outarray, tmp0);
611 int nq =
m_base[0]->GetNumPoints() *
m_base[1]->GetNumPoints();
620 Vmath::Vvtvvtp(nq, &normals[0][0], 1, &Fx[0], 1, &normals[1][0], 1,
621 &Fy[0], 1, &Fn[0], 1);
622 Vmath::Vvtvp(nq, &normals[2][0], 1, &Fz[0], 1, &Fn[0], 1, &Fn[0], 1);
626 Vmath::Svtsvtp(nq, normals[0][0], &Fx[0], 1, normals[1][0], &Fy[0], 1,
628 Vmath::Svtvp(nq, normals[2][0], &Fz[0], 1, &Fn[0], 1, &Fn[0], 1);
651 m_base[0]->GetPointsKey());
653 m_base[1]->GetPointsKey());
664 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 && Lcoords[1] >= -1.0 &&
666 "Local coordinates are not in region [-1,1]");
670 for (i = 0; i <
m_geom->GetCoordim(); ++i)
672 coords[i] =
m_geom->GetCoord(i, Lcoords);
693 return StdExpansion2D::v_PhysEvaluate(Lcoord, physvals);
702 m_geom->GetLocCoords(coord, Lcoord);
704 return StdExpansion2D::v_PhysEvaluate(Lcoord, physvals);
709 std::array<NekDouble, 3> &firstOrderDerivs)
713 m_geom->GetLocCoords(coord, Lcoord);
714 return StdTriExp::v_PhysEvaluate(Lcoord, inarray, firstOrderDerivs);
722 int nquad0 =
m_base[0]->GetNumPoints();
723 int nquad1 =
m_base[1]->GetNumPoints();
730 Vmath::Vcopy(nquad0, &(inarray[0]), 1, &(outarray[0]), 1);
734 Vmath::Vcopy(nquad1, &(inarray[0]) + (nquad0 - 1), nquad0,
739 Vmath::Vcopy(nquad1, &(inarray[0]), nquad0, &(outarray[0]), 1);
743 ASSERTL0(
false,
"edge value (< 3) is out of range");
747 ASSERTL1(EdgeExp->GetBasis(0)->GetPointsType() ==
749 "Edge expansion should be GLL");
752 if (
m_base[edge ? 1 : 0]->GetPointsKey() !=
753 EdgeExp->GetBasis(0)->GetPointsKey())
760 EdgeExp->GetBasis(0)->GetPointsKey(), outarray);
771 Vmath::Reverse(EdgeExp->GetNumPoints(0), &outarray[0], 1, &outarray[0],
777 [[maybe_unused]]
const int edge,
780 ASSERTL0(
false,
"Routine not implemented for triangular elements");
785 int nquad0 =
m_base[0]->GetNumPoints();
786 int nquad1 =
m_base[1]->GetNumPoints();
793 for (
int i = 0; i < nquad0; ++i)
800 for (
int i = 0; i < nquad1; ++i)
802 outarray[i] = (nquad0 - 1) + i * nquad0;
807 for (
int i = 0; i < nquad1; ++i)
809 outarray[i] = i * nquad0;
813 ASSERTL0(
false,
"edge value (< 3) is out of range");
825 for (i = 0; i < ptsKeys.size(); ++i)
837 geomFactors->GetDerivFactors(ptsKeys);
848 for (i = 0; i < dim; ++i)
875 Vmath::Fill(nqe, df[2 * i + 1][0] + df[2 * i][0], normal[i],
886 ASSERTL0(
false,
"Edge is out of range (edge < 3)");
893 fac += normal[i][0] * normal[i][0];
895 fac = 1.0 /
sqrt(fac);
908 int nquad0 = ptsKeys[0].GetNumPoints();
909 int nquad1 = ptsKeys[1].GetNumPoints();
922 for (j = 0; j < nquad0; ++j)
927 normals[i * nquad0 + j] =
928 -df[2 * i + 1][j] * edgejac[j];
931 from_key = ptsKeys[0];
934 for (j = 0; j < nquad1; ++j)
936 edgejac[j] = jac[nquad0 * j + nquad0 - 1];
939 normals[i * nquad1 + j] =
940 (df[2 * i][nquad0 * j + nquad0 - 1] +
941 df[2 * i + 1][nquad0 * j + nquad0 - 1]) *
945 from_key = ptsKeys[1];
948 for (j = 0; j < nquad1; ++j)
950 edgejac[j] = jac[nquad0 * j];
953 normals[i * nquad1 + j] =
954 -df[2 * i][nquad0 * j] * edgejac[j];
957 from_key = ptsKeys[1];
960 ASSERTL0(
false,
"edge is out of range (edge < 3)");
975 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
982 Vmath::Vvtvp(nqe, normal[i], 1, normal[i], 1, work, 1, work, 1);
992 Vmath::Vmul(nqe, normal[i], 1, work, 1, normal[i], 1);
1009 const NekDouble *data,
const std::vector<unsigned int> &nummodes,
1010 const int mode_offset,
NekDouble *coeffs,
1011 [[maybe_unused]] std::vector<LibUtilities::BasisType> &fromType)
1013 int data_order0 = nummodes[mode_offset];
1014 int fillorder0 = min(
m_base[0]->GetNumModes(), data_order0);
1015 int data_order1 = nummodes[mode_offset + 1];
1016 int order1 =
m_base[1]->GetNumModes();
1017 int fillorder1 = min(order1, data_order1);
1030 "Extraction routine not set up for this basis");
1033 for (i = 0; i < fillorder0; ++i)
1035 Vmath::Vcopy(fillorder1 - i, &data[cnt], 1, &coeffs[cnt1], 1);
1036 cnt += data_order1 - i;
1042 ASSERTL0(
false,
"basis is either not set up or not hierarchicial");
1066 returnval = StdTriExp::v_GenMatrix(mkey);
1080 return tmp->GetStdMatrix(mkey);
1107 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
1122 StdExpansion::LaplacianMatrixOp_MatFree(k1, k2, inarray, outarray, mkey);
1130 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
1137 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(inarray, outarray, mkey);
1144 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(inarray, outarray, mkey);
1163 int nquad0 =
m_base[0]->GetNumPoints();
1164 int nquad1 =
m_base[1]->GetNumPoints();
1165 int nqtot = nquad0 * nquad1;
1166 int nmodes0 =
m_base[0]->GetNumModes();
1167 int nmodes1 =
m_base[1]->GetNumModes();
1169 max(max(max(nqtot,
m_ncoeffs), nquad1 * nmodes0), nquad0 * nmodes1);
1171 ASSERTL1(wsp.size() >= 3 * wspsize,
"Workspace is of insufficient size.");
1189 StdExpansion2D::PhysTensorDeriv(inarray, wsp1, wsp2);
1195 Vmath::Vvtvvtp(nqtot, &metric00[0], 1, &wsp1[0], 1, &metric01[0], 1,
1196 &wsp2[0], 1, &wsp0[0], 1);
1197 Vmath::Vvtvvtp(nqtot, &metric01[0], 1, &wsp1[0], 1, &metric11[0], 1,
1198 &wsp2[0], 1, &wsp2[0], 1);
1220 const unsigned int dim = 2;
1229 for (i = 0; i < dim; ++i)
1231 for (j = i; j < dim; ++j)
1239 const unsigned int nquad0 =
m_base[0]->GetNumPoints();
1240 const unsigned int nquad1 =
m_base[1]->GetNumPoints();
1244 for (i = 0; i < nquad1; i++)
1246 Blas::Dscal(nquad0, 2.0 / (1 - z1[i]), &dEta_dXi[0][0] + i * nquad0, 1);
1247 Blas::Dscal(nquad0, 2.0 / (1 - z1[i]), &dEta_dXi[1][0] + i * nquad0, 1);
1249 for (i = 0; i < nquad0; i++)
1251 Blas::Dscal(nquad1, 0.5 * (1 + z0[i]), &dEta_dXi[1][0] + i, nquad0);
1258 Vmath::Smul(nqtot, df[0][0], &dEta_dXi[0][0], 1, &tmp[0], 1);
1259 Vmath::Svtvp(nqtot, df[1][0], &dEta_dXi[1][0], 1, &tmp[0], 1, &tmp[0],
1267 Vmath::Smul(nqtot, df[2][0], &dEta_dXi[0][0], 1, &tmp[0], 1);
1268 Vmath::Svtvp(nqtot, df[3][0], &dEta_dXi[1][0], 1, &tmp[0], 1, &tmp[0],
1280 Vmath::Smul(nqtot, df[4][0], &dEta_dXi[0][0], 1, &tmp[0], 1);
1281 Vmath::Svtvp(nqtot, df[5][0], &dEta_dXi[1][0], 1, &tmp[0], 1,
1292 NekDouble g2 = df[1][0] * df[1][0] + df[3][0] * df[3][0];
1295 g2 += df[5][0] * df[5][0];
1302 Vmath::Vmul(nqtot, &df[0][0], 1, &dEta_dXi[0][0], 1, &tmp[0], 1);
1303 Vmath::Vvtvp(nqtot, &df[1][0], 1, &dEta_dXi[1][0], 1, &tmp[0], 1,
1313 Vmath::Vmul(nqtot, &df[2][0], 1, &dEta_dXi[0][0], 1, &tmp[0], 1);
1314 Vmath::Vvtvp(nqtot, &df[3][0], 1, &dEta_dXi[1][0], 1, &tmp[0], 1,
1329 Vmath::Vmul(nqtot, &df[4][0], 1, &dEta_dXi[0][0], 1, &tmp[0], 1);
1330 Vmath::Vvtvp(nqtot, &df[5][0], 1, &dEta_dXi[1][0], 1, &tmp[0], 1,
1345 for (
unsigned int i = 0; i < dim; ++i)
1347 for (
unsigned int j = i; j < dim; ++j)
1370 int n_coeffs = inarray.size();
1371 int nquad0 =
m_base[0]->GetNumPoints();
1372 int nquad1 =
m_base[1]->GetNumPoints();
1373 int nqtot = nquad0 * nquad1;
1374 int nmodes0 =
m_base[0]->GetNumModes();
1375 int nmodes1 =
m_base[1]->GetNumModes();
1376 int numMin2 = nmodes0, i;
1405 m_TriExp->BwdTrans(inarray, phys_tmp);
1406 m_OrthoTriExp->FwdTrans(phys_tmp, coeff);
1408 for (i = 0; i < n_coeffs; i++)
1413 numMin += numMin2 - 1;
1418 m_OrthoTriExp->BwdTrans(coeff, phys_tmp);
1419 m_TriExp->FwdTrans(phys_tmp, outarray);
1443 StdTriExp::v_SVVLaplacianFilter(array, mkey);
1465 if (d0factors.size() != 3)
1471 if (d0factors[0].size() != nquad0)
1477 if (d0factors[1].size() != nquad1)
1493 int ncoords = normal_0.size();
1499 for (
int i = 0; i < nquad0; ++i)
1501 d1factors[0][i] = df[1][i] * normal_0[0][i];
1505 for (
int i = 0; i < nquad1; ++i)
1507 d0factors[1][i] = df[0][(i + 1) * nquad0 - 1] * normal_1[0][i];
1508 d0factors[2][i] = df[0][i * nquad0] * normal_2[0][i];
1511 for (
int n = 1; n < ncoords; ++n)
1515 for (
int i = 0; i < nquad0; ++i)
1517 d1factors[0][i] += df[2 * n + 1][i] * normal_0[n][i];
1522 for (
int i = 0; i < nquad1; ++i)
1525 df[2 * n][(i + 1) * nquad0 - 1] * normal_1[n][i];
1526 d0factors[2][i] += df[2 * n][i * nquad0] * normal_2[n][i];
1532 for (
int i = 0; i < nquad0; ++i)
1534 d0factors[0][i] = df[0][i] * normal_0[0][i];
1538 for (
int i = 0; i < nquad1; ++i)
1540 d1factors[1][i] = df[1][(i + 1) * nquad0 - 1] * normal_1[0][i];
1541 d1factors[2][i] = df[1][i * nquad0] * normal_2[0][i];
1544 for (
int n = 1; n < ncoords; ++n)
1548 for (
int i = 0; i < nquad0; ++i)
1550 d0factors[0][i] += df[2 * n][i] * normal_0[n][i];
1555 for (
int i = 0; i < nquad1; ++i)
1558 df[2 * n + 1][(i + 1) * nquad0 - 1] * normal_1[n][i];
1559 d1factors[2][i] += df[2 * n + 1][i * nquad0] * normal_2[n][i];
1566 for (
int i = 0; i < nquad0; ++i)
1568 d1factors[0][i] = df[1][0] * normal_0[0][i];
1572 for (
int i = 0; i < nquad1; ++i)
1574 d0factors[1][i] = df[0][0] * normal_1[0][i];
1575 d0factors[2][i] = df[0][0] * normal_2[0][i];
1578 for (
int n = 1; n < ncoords; ++n)
1582 for (
int i = 0; i < nquad0; ++i)
1584 d1factors[0][i] += df[2 * n + 1][0] * normal_0[n][i];
1589 for (
int i = 0; i < nquad1; ++i)
1591 d0factors[1][i] += df[2 * n][0] * normal_1[n][i];
1592 d0factors[2][i] += df[2 * n][0] * normal_2[n][i];
1598 for (
int i = 0; i < nquad0; ++i)
1600 d0factors[0][i] = df[0][0] * normal_0[0][i];
1604 for (
int i = 0; i < nquad1; ++i)
1606 d1factors[1][i] = df[1][0] * normal_1[0][i];
1607 d1factors[2][i] = df[1][0] * normal_2[0][i];
1610 for (
int n = 1; n < ncoords; ++n)
1614 for (
int i = 0; i < nquad0; ++i)
1616 d0factors[0][i] += df[2 * n][0] * normal_0[n][i];
1621 for (
int i = 0; i < nquad1; ++i)
1623 d1factors[1][i] += df[2 * n + 1][0] * normal_1[n][i];
1624 d1factors[2][i] += df[2 * n + 1][0] * normal_2[n][i];
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define sign(a, b)
return the sign(b)*a
Describes the specification for a Basis.
int GetNumPoints() const
Return points order at which basis is defined.
PointsKey GetPointsKey() const
Return distribution of points.
Defines a specification for a set of points.
size_t GetNumPoints() const
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
SpatialDomains::Geometry2DSharedPtr GetGeom2D() const
std::map< int, NormalVector > m_traceNormals
std::map< int, Array< OneD, NekDouble > > m_elmtBndNormDirElmtLen
the element length in each element boundary(Vertex, edge or face) normal direction calculated based o...
SpatialDomains::GeometrySharedPtr GetGeom() const
SpatialDomains::GeometrySharedPtr m_geom
ExpansionSharedPtr GetLeftAdjacentElementExp() const
void ComputeLaplacianMetric()
void ComputeGmatcdotMF(const Array< TwoD, const NekDouble > &df, const Array< OneD, const NekDouble > &direction, Array< OneD, Array< OneD, NekDouble > > &dfdir)
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
int GetLeftAdjacentElementTrace() const
void ComputeQuadratureMetric()
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
StdRegions::Orientation GetTraceOrient(int trace)
const NormalVector & GetTraceNormal(const int id)
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals) override
This function evaluates the expansion at a single (arbitrary) point of the domain.
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
void v_DropLocMatrix(const MatrixKey &mkey) override
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) override
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
void v_GetTracePhysMap(const int edge, Array< OneD, int > &outarray) override
DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
void v_IProductWRTDirectionalDerivBase(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &out) override
Physical derivative along a direction vector.
StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
StdRegions::Orientation v_GetTraceOrient(int edge) override
NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals) override
void v_ComputeTraceNormal(const int edge) override
void v_GetTracePhysVals(const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient) override
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
void v_DropLocStaticCondMatrix(const MatrixKey &mkey) override
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[p]*base1[pq] and put into ou...
void v_GetTraceQFactors(const int edge, Array< OneD, NekDouble > &outarray) override
void v_WeakDirectionalDerivMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType) override
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_NormalTraceDerivFactors(Array< OneD, Array< OneD, NekDouble > > &factors, Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors) override
: This method gets all of the factors which are required as part of the Gradient Jump Penalty stabili...
void v_IProductWRTDirectionalDerivBase_SumFac(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Directinoal Derivative in the modal space in the dir direction of varcoeffs.
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
void v_PhysDeriv(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_NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, const Array< OneD, const NekDouble > &Fz, Array< OneD, NekDouble > &outarray) override
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Transform a given function from physical quadrature space to coefficient space.
void v_MassLevelCurvatureMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
TriExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const SpatialDomains::Geometry2DSharedPtr &geom)
Constructor using BasisKey class for quadrature points and order definition.
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray) override
Integrates the specified function over the domain.
void v_ComputeLaplacianMetric() override
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0=true, bool doCheckCollDir1=true)
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
void HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int NumBndryCoeffs(void) const
const LibUtilities::PointsKeyVector GetPointsKeys() const
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
const LibUtilities::BasisKey GetTraceBasisKey(const int i, int k=-1) const
This function returns the basis key belonging to the i-th trace.
void IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
this function calculates the inner product of a given function f with the different modes of the expa...
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
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 GetInteriorMap(Array< OneD, unsigned int > &outarray)
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
void IProductWRTDirectionalDerivBase_SumFac(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
MatrixType GetMatrixType() const
static void Dgemv(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].
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
int getNumberOfCoefficients(int Na)
void Interp1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
this function interpolates a 1D function evaluated at the quadrature points of the basis fbasis0 to ...
std::vector< PointsKey > PointsKeyVector
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ eOrtho_A
Principle Orthogonal Functions .
@ eOrtho_B
Principle Orthogonal Functions .
@ eModified_A
Principle Modified Functions .
std::shared_ptr< SegExp > SegExpSharedPtr
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eMovingRegular
Currently unused.
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
@ eInvLaplacianWithUnityMean
std::shared_ptr< StdTriExp > StdTriExpSharedPtr
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
Svtsvtp (scalar times vector plus scalar times vector):
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 Vdiv(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 Zero(int n, T *x, const int incx)
Zero vector.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Reverse(int n, const T *x, const int incx, T *y, const int incy)
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
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 > sqrt(scalarT< T > in)