49 : StdExpansion(LibUtilities::StdPrismData::getNumberOfCoefficients(
50 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
52 StdExpansion3D(LibUtilities::StdPrismData::getNumberOfCoefficients(
53 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
58 std::string(
"PrismExpMatrix")),
59 m_staticCondMatrixManager(
std::bind(&
Expansion::CreateStaticCondMatrix,
60 this,
std::placeholders::_1),
61 std::string(
"PrismExpStaticCondMatrix"))
66 : StdExpansion(T), StdExpansion3D(T), StdPrismExp(T),
Expansion(T),
68 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
99 int nquad1 =
m_base[1]->GetNumPoints();
100 int nquad2 =
m_base[2]->GetNumPoints();
108 (
NekDouble *)&inarray[0], 1, &tmp[0], 1);
113 (
NekDouble *)&inarray[0], 1, &tmp[0], 1);
117 return StdPrismExp::v_Integral(tmp);
136 StdPrismExp::v_PhysDeriv(inarray, diff0, diff1, diff2);
142 Vmath::Vmul(nqtot, &df[0][0], 1, &diff0[0], 1, &out_d0[0], 1);
143 Vmath::Vvtvp(nqtot, &df[1][0], 1, &diff1[0], 1, &out_d0[0], 1,
145 Vmath::Vvtvp(nqtot, &df[2][0], 1, &diff2[0], 1, &out_d0[0], 1,
151 Vmath::Vmul(nqtot, &df[3][0], 1, &diff0[0], 1, &out_d1[0], 1);
152 Vmath::Vvtvp(nqtot, &df[4][0], 1, &diff1[0], 1, &out_d1[0], 1,
154 Vmath::Vvtvp(nqtot, &df[5][0], 1, &diff2[0], 1, &out_d1[0], 1,
160 Vmath::Vmul(nqtot, &df[6][0], 1, &diff0[0], 1, &out_d2[0], 1);
161 Vmath::Vvtvp(nqtot, &df[7][0], 1, &diff1[0], 1, &out_d2[0], 1,
163 Vmath::Vvtvp(nqtot, &df[8][0], 1, &diff2[0], 1, &out_d2[0], 1,
171 Vmath::Smul(nqtot, df[0][0], &diff0[0], 1, &out_d0[0], 1);
172 Blas::Daxpy(nqtot, df[1][0], &diff1[0], 1, &out_d0[0], 1);
173 Blas::Daxpy(nqtot, df[2][0], &diff2[0], 1, &out_d0[0], 1);
178 Vmath::Smul(nqtot, df[3][0], &diff0[0], 1, &out_d1[0], 1);
179 Blas::Daxpy(nqtot, df[4][0], &diff1[0], 1, &out_d1[0], 1);
180 Blas::Daxpy(nqtot, df[5][0], &diff2[0], 1, &out_d1[0], 1);
185 Vmath::Smul(nqtot, df[6][0], &diff0[0], 1, &out_d2[0], 1);
186 Blas::Daxpy(nqtot, df[7][0], &diff1[0], 1, &out_d2[0], 1);
187 Blas::Daxpy(nqtot, df[8][0], &diff2[0], 1, &out_d2[0], 1);
212 if (
m_base[0]->Collocation() &&
m_base[1]->Collocation() &&
229 out = (*matsys) * in;
271 const int nquad0 =
m_base[0]->GetNumPoints();
272 const int nquad1 =
m_base[1]->GetNumPoints();
273 const int nquad2 =
m_base[2]->GetNumPoints();
274 const int order0 =
m_base[0]->GetNumModes();
275 const int order1 =
m_base[1]->GetNumModes();
279 if (multiplybyweights)
287 tmp, outarray, wsp,
true,
true,
true);
293 inarray, outarray, wsp,
true,
true,
true);
338 const int nquad0 =
m_base[0]->GetNumPoints();
339 const int nquad1 =
m_base[1]->GetNumPoints();
340 const int nquad2 =
m_base[2]->GetNumPoints();
341 const int order0 =
m_base[0]->GetNumModes();
342 const int order1 =
m_base[1]->GetNumModes();
343 const int nqtot = nquad0 * nquad1 * nquad2;
362 m_base[2]->GetBdata(), tmp2, outarray, wsp,
366 m_base[2]->GetBdata(), tmp3, tmp6, wsp,
true,
372 m_base[2]->GetDbdata(), tmp4, tmp6, wsp,
true,
382 const int nquad0 =
m_base[0]->GetNumPoints();
383 const int nquad1 =
m_base[1]->GetNumPoints();
384 const int nquad2 =
m_base[2]->GetNumPoints();
385 const int nqtot = nquad0 * nquad1 * nquad2;
403 Vmath::Vmul(nqtot, &df[3 * dir][0], 1, tmp1.data(), 1, tmp2.data(), 1);
404 Vmath::Vmul(nqtot, &df[3 * dir + 1][0], 1, tmp1.data(), 1, tmp3.data(),
406 Vmath::Vmul(nqtot, &df[3 * dir + 2][0], 1, tmp1.data(), 1, tmp4.data(),
411 Vmath::Smul(nqtot, df[3 * dir][0], tmp1.data(), 1, tmp2.data(), 1);
412 Vmath::Smul(nqtot, df[3 * dir + 1][0], tmp1.data(), 1, tmp3.data(), 1);
413 Vmath::Smul(nqtot, df[3 * dir + 2][0], tmp1.data(), 1, tmp4.data(), 1);
420 for (
int k = 0; k < nquad2; ++k)
422 g2 = 2.0 / (1.0 - z2[k]);
424 for (j = 0; j < nquad1; ++j)
426 for (i = 0; i < nquad0; ++i, ++cnt)
428 g0 = 0.5 * (1.0 + z0[i]);
430 tmp2[cnt] = g2 * tmp2[cnt] + g02 * tmp4[cnt];
444 m_base[2]->GetBasisKey());
450 m_base[0]->GetPointsKey());
452 m_base[1]->GetPointsKey());
454 m_base[2]->GetPointsKey());
457 bkey0, bkey1, bkey2);
469 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 && Lcoords[1] <= -1.0 &&
470 Lcoords[1] >= 1.0 && Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
471 "Local coordinates are not in region [-1,1]");
498 return StdExpansion3D::v_PhysEvaluate(Lcoord, physvals);
510 return StdExpansion3D::v_PhysEvaluate(Lcoord, physvals);
516 std::array<NekDouble, 3> &firstOrderDerivs)
521 return StdPrismExp::v_PhysEvalFirstDeriv(Lcoord, inarray, firstOrderDerivs);
529 const NekDouble *data,
const std::vector<unsigned int> &nummodes,
530 const int mode_offset,
NekDouble *coeffs,
531 [[maybe_unused]] std::vector<LibUtilities::BasisType> &fromType)
533 int data_order0 = nummodes[mode_offset];
534 int fillorder0 =
min(
m_base[0]->GetNumModes(), data_order0);
535 int data_order1 = nummodes[mode_offset + 1];
536 int order1 =
m_base[1]->GetNumModes();
537 int fillorder1 =
min(order1, data_order1);
538 int data_order2 = nummodes[mode_offset + 2];
539 int order2 =
m_base[2]->GetNumModes();
540 int fillorder2 =
min(order2, data_order2);
551 "Extraction routine not set up for this basis");
553 "Extraction routine not set up for this basis");
556 for (j = 0; j < fillorder0; ++j)
558 for (i = 0; i < fillorder1; ++i)
560 Vmath::Vcopy(fillorder2 - j, &data[cnt], 1, &coeffs[cnt1],
562 cnt += data_order2 - j;
567 for (i = fillorder1; i < data_order1; ++i)
569 cnt += data_order2 - j;
572 for (i = fillorder1; i < order1; ++i)
580 ASSERTL0(
false,
"basis is either not set up or not "
587 int nquad0 =
m_base[0]->GetNumPoints();
588 int nquad1 =
m_base[1]->GetNumPoints();
589 int nquad2 =
m_base[2]->GetNumPoints();
598 if (outarray.size() != nq0 * nq1)
604 for (
int i = 0; i < nquad0 * nquad1; ++i)
613 if (outarray.size() != nq0 * nq1)
619 for (
int k = 0; k < nquad2; k++)
621 for (
int i = 0; i < nquad0; ++i)
623 outarray[k * nquad0 + i] = (nquad0 * nquad1 * k) + i;
632 if (outarray.size() != nq0 * nq1)
638 for (
int j = 0; j < nquad1 * nquad2; ++j)
640 outarray[j] = nquad0 - 1 + j * nquad0;
646 if (outarray.size() != nq0 * nq1)
652 for (
int k = 0; k < nquad2; k++)
654 for (
int i = 0; i < nquad0; ++i)
656 outarray[k * nquad0 + i] =
657 nquad0 * (nquad1 - 1) + (nquad0 * nquad1 * k) + i;
665 if (outarray.size() != nq0 * nq1)
671 for (
int j = 0; j < nquad1 * nquad2; ++j)
673 outarray[j] = j * nquad0;
677 ASSERTL0(
false,
"face value (> 4) is out of range");
692 for (
int i = 0; i < ptsKeys.size(); ++i)
704 geomFactors->GetDerivFactors(ptsKeys);
707 int nq0 = ptsKeys[0].GetNumPoints();
708 int nq1 = ptsKeys[1].GetNumPoints();
709 int nq2 = ptsKeys[2].GetNumPoints();
710 int nq01 = nq0 * nq1;
724 for (i = 0; i < vCoordDim; ++i)
729 size_t nqb = nq_face;
744 for (i = 0; i < vCoordDim; ++i)
746 normal[i][0] = -df[3 * i + 2][0];
753 for (i = 0; i < vCoordDim; ++i)
755 normal[i][0] = -df[3 * i + 1][0];
761 for (i = 0; i < vCoordDim; ++i)
763 normal[i][0] = df[3 * i][0] + df[3 * i + 2][0];
769 for (i = 0; i < vCoordDim; ++i)
771 normal[i][0] = df[3 * i + 1][0];
777 for (i = 0; i < vCoordDim; ++i)
779 normal[i][0] = -df[3 * i][0];
784 ASSERTL0(
false,
"face is out of range (face < 4)");
789 for (i = 0; i < vCoordDim; ++i)
791 fac += normal[i][0] * normal[i][0];
793 fac = 1.0 /
sqrt(fac);
797 for (i = 0; i < vCoordDim; ++i)
799 Vmath::Fill(nq_face, fac * normal[i][0], normal[i], 1);
812 else if (face == 1 || face == 3)
834 for (j = 0; j < nq01; ++j)
836 normals[j] = -df[2][j] * jac[j];
837 normals[nqtot + j] = -df[5][j] * jac[j];
838 normals[2 * nqtot + j] = -df[8][j] * jac[j];
842 points0 = ptsKeys[0];
843 points1 = ptsKeys[1];
849 for (j = 0; j < nq0; ++j)
851 for (k = 0; k < nq2; ++k)
853 int tmp = j + nq01 * k;
854 normals[j + k * nq0] = -df[1][tmp] * jac[tmp];
855 normals[nqtot + j + k * nq0] = -df[4][tmp] * jac[tmp];
856 normals[2 * nqtot + j + k * nq0] =
857 -df[7][tmp] * jac[tmp];
858 faceJac[j + k * nq0] = jac[tmp];
862 points0 = ptsKeys[0];
863 points1 = ptsKeys[2];
869 for (j = 0; j < nq1; ++j)
871 for (k = 0; k < nq2; ++k)
873 int tmp = nq0 - 1 + nq0 * j + nq01 * k;
874 normals[j + k * nq1] =
875 (df[0][tmp] + df[2][tmp]) * jac[tmp];
876 normals[nqtot + j + k * nq1] =
877 (df[3][tmp] + df[5][tmp]) * jac[tmp];
878 normals[2 * nqtot + j + k * nq1] =
879 (df[6][tmp] + df[8][tmp]) * jac[tmp];
880 faceJac[j + k * nq1] = jac[tmp];
884 points0 = ptsKeys[1];
885 points1 = ptsKeys[2];
891 for (j = 0; j < nq0; ++j)
893 for (k = 0; k < nq2; ++k)
895 int tmp = nq0 * (nq1 - 1) + j + nq01 * k;
896 normals[j + k * nq0] = df[1][tmp] * jac[tmp];
897 normals[nqtot + j + k * nq0] = df[4][tmp] * jac[tmp];
898 normals[2 * nqtot + j + k * nq0] =
899 df[7][tmp] * jac[tmp];
900 faceJac[j + k * nq0] = jac[tmp];
904 points0 = ptsKeys[0];
905 points1 = ptsKeys[2];
911 for (j = 0; j < nq1; ++j)
913 for (k = 0; k < nq2; ++k)
915 int tmp = j * nq0 + nq01 * k;
916 normals[j + k * nq1] = -df[0][tmp] * jac[tmp];
917 normals[nqtot + j + k * nq1] = -df[3][tmp] * jac[tmp];
918 normals[2 * nqtot + j + k * nq1] =
919 -df[6][tmp] * jac[tmp];
920 faceJac[j + k * nq1] = jac[tmp];
924 points0 = ptsKeys[1];
925 points1 = ptsKeys[2];
930 ASSERTL0(
false,
"face is out of range (face < 4)");
938 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
941 for (i = 0; i < vCoordDim; ++i)
946 Vmath::Vmul(nq_face, work, 1, normal[i], 1, normal[i], 1);
953 Vmath::Vvtvp(nq_face, normal[i], 1, normal[i], 1, work, 1, work, 1);
963 Vmath::Vmul(nq_face, normal[i], 1, work, 1, normal[i], 1);
972 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
987 StdExpansion::LaplacianMatrixOp_MatFree(k1, k2, inarray, outarray, mkey);
1018 StdPrismExp::v_SVVLaplacianFilter(array, mkey);
1044 returnval = StdPrismExp::v_GenMatrix(mkey);
1060 return tmp->GetStdMatrix(mkey);
1106 int nquad0 =
m_base[0]->GetNumPoints();
1107 int nquad1 =
m_base[1]->GetNumPoints();
1108 int nquad2 =
m_base[2]->GetNumPoints();
1109 int nqtot = nquad0 * nquad1 * nquad2;
1143 StdExpansion3D::PhysTensorDeriv(inarray, wsp1, wsp2, wsp3);
1152 for (i = 0; i < nquad2; ++i)
1155 &h0[0] + i * nquad0 * nquad1, 1);
1157 &h1[0] + i * nquad0 * nquad1, 1);
1159 for (i = 0; i < nquad0; i++)
1161 Blas::Dscal(nquad1 * nquad2, 0.5 * (1 + z0[i]), &h1[0] + i, nquad0);
1170 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &df[2][0], 1, &h1[0], 1,
1173 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &df[5][0], 1, &h1[0], 1,
1176 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &df[8][0], 1, &h1[0], 1,
1180 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0],
1182 Vmath::Vvtvp(nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1185 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &wsp4[0], 1, &df[4][0], 1, &wsp5[0],
1187 Vmath::Vvtvp(nqtot, &df[7][0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1190 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0],
1192 Vmath::Vvtvp(nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1197 &df[4][0], 1, &g1[0], 1);
1198 Vmath::Vvtvp(nqtot, &df[7][0], 1, &df[7][0], 1, &g1[0], 1, &g1[0], 1);
1202 &df[5][0], 1, &g2[0], 1);
1203 Vmath::Vvtvp(nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1207 &df[5][0], 1, &g5[0], 1);
1208 Vmath::Vvtvp(nqtot, &df[7][0], 1, &df[8][0], 1, &g5[0], 1, &g5[0], 1);
1223 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0],
1225 Vmath::Vvtvp(nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1228 Vmath::Svtsvtp(nqtot, df[1][0], &wsp4[0], 1, df[4][0], &wsp5[0], 1,
1230 Vmath::Svtvp(nqtot, df[7][0], &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1233 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1,
1235 Vmath::Svtvp(nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1240 df[1][0] * df[1][0] + df[4][0] * df[4][0] +
1241 df[7][0] * df[7][0],
1246 df[2][0] * df[2][0] + df[5][0] * df[5][0] +
1247 df[8][0] * df[8][0],
1252 df[1][0] * df[2][0] + df[4][0] * df[5][0] +
1253 df[7][0] * df[8][0],
1258 Vmath::Vvtvvtp(nqtot, &g0[0], 1, &wsp1[0], 1, &g3[0], 1, &wsp2[0], 1,
1260 Vmath::Vvtvp(nqtot, &g4[0], 1, &wsp3[0], 1, &wsp7[0], 1, &wsp7[0], 1);
1261 Vmath::Vvtvvtp(nqtot, &g1[0], 1, &wsp2[0], 1, &g3[0], 1, &wsp1[0], 1,
1263 Vmath::Vvtvp(nqtot, &g5[0], 1, &wsp3[0], 1, &wsp8[0], 1, &wsp8[0], 1);
1264 Vmath::Vvtvvtp(nqtot, &g2[0], 1, &wsp3[0], 1, &g4[0], 1, &wsp1[0], 1,
1266 Vmath::Vvtvp(nqtot, &g5[0], 1, &wsp2[0], 1, &wsp9[0], 1, &wsp9[0], 1);
1293 int np0 =
m_base[0]->GetNumPoints();
1294 int np1 =
m_base[1]->GetNumPoints();
1295 int np2 =
m_base[2]->GetNumPoints();
1296 int np =
max(np0,
max(np1, np2));
1298 bool standard =
true;
1306 if ((vid2 < vid1) && (vid2 < vid0))
1314 else if ((vid1 < vid2) && (vid1 < vid0))
1322 else if ((vid0 < vid2) && (vid0 < vid1))
1343 rot[0] = (0 + rotate) % 3;
1344 rot[1] = (1 + rotate) % 3;
1345 rot[2] = (2 + rotate) % 3;
1348 for (
int i = 0; i < np - 1; ++i)
1350 planep1 += (np - i) * np;
1355 if (standard ==
false)
1357 for (
int j = 0; j < np - 1; ++j)
1360 row1p1 += np - i - 1;
1361 for (
int k = 0; k < np - i - 2; ++k)
1364 prismpt[rot[0]] = plane + row + k;
1365 prismpt[rot[1]] = plane + row + k + 1;
1366 prismpt[rot[2]] = planep1 + row1 + k;
1368 prismpt[3 + rot[0]] = plane + rowp1 + k;
1369 prismpt[3 + rot[1]] = plane + rowp1 + k + 1;
1370 prismpt[3 + rot[2]] = planep1 + row1p1 + k;
1372 conn[cnt++] = prismpt[0];
1373 conn[cnt++] = prismpt[1];
1374 conn[cnt++] = prismpt[3];
1375 conn[cnt++] = prismpt[2];
1377 conn[cnt++] = prismpt[5];
1378 conn[cnt++] = prismpt[2];
1379 conn[cnt++] = prismpt[3];
1380 conn[cnt++] = prismpt[4];
1382 conn[cnt++] = prismpt[3];
1383 conn[cnt++] = prismpt[1];
1384 conn[cnt++] = prismpt[4];
1385 conn[cnt++] = prismpt[2];
1388 prismpt[rot[0]] = planep1 + row1 + k + 1;
1389 prismpt[rot[1]] = planep1 + row1 + k;
1390 prismpt[rot[2]] = plane + row + k + 1;
1392 prismpt[3 + rot[0]] = planep1 + row1p1 + k + 1;
1393 prismpt[3 + rot[1]] = planep1 + row1p1 + k;
1394 prismpt[3 + rot[2]] = plane + rowp1 + k + 1;
1396 conn[cnt++] = prismpt[0];
1397 conn[cnt++] = prismpt[1];
1398 conn[cnt++] = prismpt[2];
1399 conn[cnt++] = prismpt[5];
1401 conn[cnt++] = prismpt[5];
1402 conn[cnt++] = prismpt[0];
1403 conn[cnt++] = prismpt[4];
1404 conn[cnt++] = prismpt[1];
1406 conn[cnt++] = prismpt[3];
1407 conn[cnt++] = prismpt[4];
1408 conn[cnt++] = prismpt[0];
1409 conn[cnt++] = prismpt[5];
1413 prismpt[rot[0]] = plane + row + np - i - 2;
1414 prismpt[rot[1]] = plane + row + np - i - 1;
1415 prismpt[rot[2]] = planep1 + row1 + np - i - 2;
1417 prismpt[3 + rot[0]] = plane + rowp1 + np - i - 2;
1418 prismpt[3 + rot[1]] = plane + rowp1 + np - i - 1;
1419 prismpt[3 + rot[2]] = planep1 + row1p1 + np - i - 2;
1421 conn[cnt++] = prismpt[0];
1422 conn[cnt++] = prismpt[1];
1423 conn[cnt++] = prismpt[3];
1424 conn[cnt++] = prismpt[2];
1426 conn[cnt++] = prismpt[5];
1427 conn[cnt++] = prismpt[2];
1428 conn[cnt++] = prismpt[3];
1429 conn[cnt++] = prismpt[4];
1431 conn[cnt++] = prismpt[3];
1432 conn[cnt++] = prismpt[1];
1433 conn[cnt++] = prismpt[4];
1434 conn[cnt++] = prismpt[2];
1442 for (
int j = 0; j < np - 1; ++j)
1445 row1p1 += np - i - 1;
1446 for (
int k = 0; k < np - i - 2; ++k)
1449 prismpt[rot[0]] = plane + row + k;
1450 prismpt[rot[1]] = plane + row + k + 1;
1451 prismpt[rot[2]] = planep1 + row1 + k;
1453 prismpt[3 + rot[0]] = plane + rowp1 + k;
1454 prismpt[3 + rot[1]] = plane + rowp1 + k + 1;
1455 prismpt[3 + rot[2]] = planep1 + row1p1 + k;
1457 conn[cnt++] = prismpt[0];
1458 conn[cnt++] = prismpt[1];
1459 conn[cnt++] = prismpt[4];
1460 conn[cnt++] = prismpt[2];
1462 conn[cnt++] = prismpt[4];
1463 conn[cnt++] = prismpt[3];
1464 conn[cnt++] = prismpt[0];
1465 conn[cnt++] = prismpt[2];
1467 conn[cnt++] = prismpt[3];
1468 conn[cnt++] = prismpt[4];
1469 conn[cnt++] = prismpt[5];
1470 conn[cnt++] = prismpt[2];
1473 prismpt[rot[0]] = planep1 + row1 + k + 1;
1474 prismpt[rot[1]] = planep1 + row1 + k;
1475 prismpt[rot[2]] = plane + row + k + 1;
1477 prismpt[3 + rot[0]] = planep1 + row1p1 + k + 1;
1478 prismpt[3 + rot[1]] = planep1 + row1p1 + k;
1479 prismpt[3 + rot[2]] = plane + rowp1 + k + 1;
1481 conn[cnt++] = prismpt[0];
1482 conn[cnt++] = prismpt[2];
1483 conn[cnt++] = prismpt[1];
1484 conn[cnt++] = prismpt[5];
1486 conn[cnt++] = prismpt[3];
1487 conn[cnt++] = prismpt[5];
1488 conn[cnt++] = prismpt[0];
1489 conn[cnt++] = prismpt[1];
1491 conn[cnt++] = prismpt[5];
1492 conn[cnt++] = prismpt[3];
1493 conn[cnt++] = prismpt[4];
1494 conn[cnt++] = prismpt[1];
1498 prismpt[rot[0]] = plane + row + np - i - 2;
1499 prismpt[rot[1]] = plane + row + np - i - 1;
1500 prismpt[rot[2]] = planep1 + row1 + np - i - 2;
1502 prismpt[3 + rot[0]] = plane + rowp1 + np - i - 2;
1503 prismpt[3 + rot[1]] = plane + rowp1 + np - i - 1;
1504 prismpt[3 + rot[2]] = planep1 + row1p1 + np - i - 2;
1506 conn[cnt++] = prismpt[0];
1507 conn[cnt++] = prismpt[1];
1508 conn[cnt++] = prismpt[4];
1509 conn[cnt++] = prismpt[2];
1511 conn[cnt++] = prismpt[4];
1512 conn[cnt++] = prismpt[3];
1513 conn[cnt++] = prismpt[0];
1514 conn[cnt++] = prismpt[2];
1516 conn[cnt++] = prismpt[3];
1517 conn[cnt++] = prismpt[4];
1518 conn[cnt++] = prismpt[5];
1519 conn[cnt++] = prismpt[2];
1525 plane += (np - i) * np;
1546 if (d0factors.size() != 5)
1553 if (d0factors[0].size() != nquad0 * nquad1)
1560 if (d0factors[1].size() != nquad0 * nquad2)
1570 if (d0factors[2].size() != nquad1 * nquad2)
1592 int ncoords = normal_0.size();
1598 for (
int i = 0; i < nquad0 * nquad1; ++i)
1600 d0factors[0][i] = df[0][i] * normal_0[0][i];
1601 d1factors[0][i] = df[1][i] * normal_0[0][i];
1602 d2factors[0][i] = df[2][i] * normal_0[0][i];
1605 for (
int n = 1; n < ncoords; ++n)
1607 for (
int i = 0; i < nquad0 * nquad1; ++i)
1609 d0factors[0][i] += df[3 * n][i] * normal_0[n][i];
1610 d1factors[0][i] += df[3 * n + 1][i] * normal_0[n][i];
1611 d2factors[0][i] += df[3 * n + 2][i] * normal_0[n][i];
1616 for (
int j = 0; j < nquad2; ++j)
1618 for (
int i = 0; i < nquad0; ++i)
1620 d0factors[1][j * nquad0 + i] = df[0][j * nquad0 * nquad1 + i] *
1621 normal_1[0][j * nquad0 + i];
1622 d1factors[1][j * nquad0 + i] = df[1][j * nquad0 * nquad1 + i] *
1623 normal_1[0][j * nquad0 + i];
1624 d2factors[1][j * nquad0 + i] = df[2][j * nquad0 * nquad1 + i] *
1625 normal_1[0][j * nquad0 + i];
1627 d0factors[3][j * nquad0 + i] =
1628 df[0][(j + 1) * nquad0 * nquad1 - nquad0 + i] *
1629 normal_3[0][j * nquad0 + i];
1630 d1factors[3][j * nquad0 + i] =
1631 df[1][(j + 1) * nquad0 * nquad1 - nquad0 + i] *
1632 normal_3[0][j * nquad0 + i];
1633 d2factors[3][j * nquad0 + i] =
1634 df[2][(j + 1) * nquad0 * nquad1 - nquad0 + i] *
1635 normal_3[0][j * nquad0 + i];
1639 for (
int n = 1; n < ncoords; ++n)
1641 for (
int j = 0; j < nquad2; ++j)
1643 for (
int i = 0; i < nquad0; ++i)
1645 d0factors[1][j * nquad0 + i] +=
1646 df[3 * n][j * nquad0 * nquad1 + i] *
1647 normal_1[n][j * nquad0 + i];
1648 d1factors[1][j * nquad0 + i] +=
1649 df[3 * n + 1][j * nquad0 * nquad1 + i] *
1650 normal_1[n][j * nquad0 + i];
1651 d2factors[1][j * nquad0 + i] +=
1652 df[3 * n + 2][j * nquad0 * nquad1 + i] *
1653 normal_1[n][j * nquad0 + i];
1655 d0factors[3][j * nquad0 + i] +=
1656 df[3 * n][(j + 1) * nquad0 * nquad1 - nquad0 + i] *
1657 normal_3[n][j * nquad0 + i];
1658 d1factors[3][j * nquad0 + i] +=
1659 df[3 * n + 1][(j + 1) * nquad0 * nquad1 - nquad0 + i] *
1660 normal_3[n][j * nquad0 + i];
1661 d2factors[3][j * nquad0 + i] +=
1662 df[3 * n + 2][(j + 1) * nquad0 * nquad1 - nquad0 + i] *
1663 normal_3[n][j * nquad0 + i];
1669 for (
int j = 0; j < nquad2; ++j)
1671 for (
int i = 0; i < nquad1; ++i)
1673 d0factors[2][j * nquad1 + i] =
1674 df[0][j * nquad0 * nquad1 + (i + 1) * nquad0 - 1] *
1675 normal_2[0][j * nquad1 + i];
1676 d1factors[2][j * nquad1 + i] =
1677 df[1][j * nquad0 * nquad1 + (i + 1) * nquad0 - 1] *
1678 normal_2[0][j * nquad1 + i];
1679 d2factors[2][j * nquad1 + i] =
1680 df[2][j * nquad0 * nquad1 + (i + 1) * nquad0 - 1] *
1681 normal_2[0][j * nquad1 + i];
1683 d0factors[4][j * nquad1 + i] =
1684 df[0][j * nquad0 * nquad1 + i * nquad0] *
1685 normal_4[0][j * nquad1 + i];
1686 d1factors[4][j * nquad1 + i] =
1687 df[1][j * nquad0 * nquad1 + i * nquad0] *
1688 normal_4[0][j * nquad1 + i];
1689 d2factors[4][j * nquad1 + i] =
1690 df[2][j * nquad0 * nquad1 + i * nquad0] *
1691 normal_4[0][j * nquad1 + i];
1695 for (
int n = 1; n < ncoords; ++n)
1697 for (
int j = 0; j < nquad2; ++j)
1699 for (
int i = 0; i < nquad1; ++i)
1701 d0factors[2][j * nquad1 + i] +=
1702 df[3 * n][j * nquad0 * nquad1 + (i + 1) * nquad0 - 1] *
1703 normal_2[n][j * nquad1 + i];
1704 d1factors[2][j * nquad1 + i] +=
1706 [j * nquad0 * nquad1 + (i + 1) * nquad0 - 1] *
1707 normal_2[n][j * nquad1 + i];
1708 d2factors[2][j * nquad1 + i] +=
1710 [j * nquad0 * nquad1 + (i + 1) * nquad0 - 1] *
1711 normal_2[n][j * nquad1 + i];
1713 d0factors[4][j * nquad1 + i] +=
1714 df[3 * n][j * nquad0 * nquad1 + i * nquad0] *
1715 normal_4[n][j * nquad1 + i];
1716 d1factors[4][j * nquad1 + i] +=
1717 df[3 * n + 1][j * nquad0 * nquad1 + i * nquad0] *
1718 normal_4[n][j * nquad1 + i];
1719 d2factors[4][j * nquad1 + i] +=
1720 df[3 * n + 2][j * nquad0 * nquad1 + i * nquad0] *
1721 normal_4[n][j * nquad1 + i];
1729 for (
int i = 0; i < nquad0 * nquad1; ++i)
1731 d0factors[0][i] = df[0][0] * normal_0[0][i];
1732 d1factors[0][i] = df[1][0] * normal_0[0][i];
1733 d2factors[0][i] = df[2][0] * normal_0[0][i];
1736 for (
int n = 1; n < ncoords; ++n)
1738 for (
int i = 0; i < nquad0 * nquad1; ++i)
1740 d0factors[0][i] += df[3 * n][0] * normal_0[n][i];
1741 d1factors[0][i] += df[3 * n + 1][0] * normal_0[n][i];
1742 d2factors[0][i] += df[3 * n + 2][0] * normal_0[n][i];
1747 for (
int i = 0; i < nquad0 * nquad2; ++i)
1749 d0factors[1][i] = df[0][0] * normal_1[0][i];
1750 d0factors[3][i] = df[0][0] * normal_3[0][i];
1752 d1factors[1][i] = df[1][0] * normal_1[0][i];
1753 d1factors[3][i] = df[1][0] * normal_3[0][i];
1755 d2factors[1][i] = df[2][0] * normal_1[0][i];
1756 d2factors[3][i] = df[2][0] * normal_3[0][i];
1759 for (
int n = 1; n < ncoords; ++n)
1761 for (
int i = 0; i < nquad0 * nquad2; ++i)
1763 d0factors[1][i] += df[3 * n][0] * normal_1[n][i];
1764 d0factors[3][i] += df[3 * n][0] * normal_3[n][i];
1766 d1factors[1][i] += df[3 * n + 1][0] * normal_1[n][i];
1767 d1factors[3][i] += df[3 * n + 1][0] * normal_3[n][i];
1769 d2factors[1][i] += df[3 * n + 2][0] * normal_1[n][i];
1770 d2factors[3][i] += df[3 * n + 2][0] * normal_3[n][i];
1775 for (
int i = 0; i < nquad1 * nquad2; ++i)
1777 d0factors[2][i] = df[0][0] * normal_2[0][i];
1778 d0factors[4][i] = df[0][0] * normal_4[0][i];
1780 d1factors[2][i] = df[1][0] * normal_2[0][i];
1781 d1factors[4][i] = df[1][0] * normal_4[0][i];
1783 d2factors[2][i] = df[2][0] * normal_2[0][i];
1784 d2factors[4][i] = df[2][0] * normal_4[0][i];
1787 for (
int n = 1; n < ncoords; ++n)
1789 for (
int i = 0; i < nquad1 * nquad2; ++i)
1791 d0factors[2][i] += df[3 * n][0] * normal_2[n][i];
1792 d0factors[4][i] += df[3 * n][0] * normal_4[n][i];
1794 d1factors[2][i] += df[3 * n + 1][0] * normal_2[n][i];
1795 d1factors[4][i] += df[3 * n + 1][0] * normal_4[n][i];
1797 d2factors[2][i] += df[3 * n + 2][0] * normal_2[n][i];
1798 d2factors[4][i] += df[3 * n + 2][0] * normal_4[n][i];
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
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.
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
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::Geometry * GetGeom() const
SpatialDomains::Geometry * m_geom
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
const NormalVector & GetTraceNormal(const int id)
PrismExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, SpatialDomains::Geometry3D *geom)
Constructor using BasisKey class for quadrature points and order definition.
DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_DropLocStaticCondMatrix(const MatrixKey &mkey) override
void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::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_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true) 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*base1*base2 and put into out...
DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product .
void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2) override
Calculate the derivative of the physical points.
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) 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_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
Get the coordinates #coords at the local coordinates #Lcoords.
void v_NormalTraceDerivFactors(Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors, Array< OneD, Array< OneD, NekDouble > > &d2factors) override
: This method gets all of the factors which are required as part of the Gradient Jump Penalty stabili...
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
void v_ComputeTraceNormal(const int face) override
Get the normals along specficied face Get the face normals interplated to a points0 x points 0 type d...
void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) override
Calculate the Laplacian multiplication in a matrix-free manner.
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals) override
void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
void v_GetTracePhysMap(const int face, Array< OneD, int > &outarray) override
void v_DropLocMatrix(const MatrixKey &mkey) override
NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals) override
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray) override
Integrate the physical point list inarray over prismatic region and return the value.
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
NekDouble GetCoord(const int i, const Array< OneD, const NekDouble > &Lcoord)
Given local collapsed coordinate Lcoord, return the value of physical coordinate in direction i.
NekDouble GetLocCoords(const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords)
Determine the local collapsed coordinates that correspond to a given Cartesian coordinate for this ge...
int GetVid(int i) const
Returns global id of vertex i of this object.
int GetCoordim() const
Return the coordinate dimension of this object (i.e. the dimension of the space in which this object ...
void FillGeom()
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements.
GeomFactorsSharedPtr GetMetricInfo()
Get the geometric factors for this object.
void IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
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.
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
const LibUtilities::PointsKeyVector GetPointsKeys() const
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
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 MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
const LibUtilities::BasisKey GetTraceBasisKey(const int i, int k=-1, bool UseGLL=false) const
This function returns the basis key belonging to the i-th trace.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
MatrixType GetMatrixType() const
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.
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis,...
std::vector< PointsKey > PointsKeyVector
@ eModified_B
Principle Modified Functions .
@ eModified_A
Principle Modified Functions .
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< StdPrismExp > StdPrismExpSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
@ eInvLaplacianWithUnityMean
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
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 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)
scalarT< T > max(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > min(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > sqrt(scalarT< T > in)