61 : StdExpansion(LibUtilities::StdTetData::getNumberOfCoefficients(
62 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
64 StdExpansion3D(LibUtilities::StdTetData::getNumberOfCoefficients(
65 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
70 m_staticCondMatrixManager(
std::bind(&
Expansion::CreateStaticCondMatrix,
71 this,
std::placeholders::_1))
79 : StdRegions::StdExpansion(T), StdRegions::StdExpansion3D(T),
81 m_matrixManager(T.m_matrixManager),
82 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
124 const int nquad1 =
m_base[1]->GetNumPoints();
125 const int nquad2 =
m_base[2]->GetNumPoints();
126 const int nqtot = nquad0 * nquad1 * nquad2;
144 m_base[2]->GetBdata(), tmp2, outarray, jac,
148 m_base[2]->GetBdata(), tmp3, tmp6, jac, Deformed);
152 m_base[2]->GetDbdata(), tmp4, tmp6, jac, Deformed);
162 const int nquad0 =
m_base[0]->GetNumPoints();
163 const int nquad1 =
m_base[1]->GetNumPoints();
164 const int nquad2 =
m_base[2]->GetNumPoints();
165 const int nqtot = nquad0 * nquad1 * nquad2;
178 Vmath::Vmul(nqtot, &df[3 * dir][0], 1, inarray.data(), 1, tmp2.data(),
180 Vmath::Vmul(nqtot, &df[3 * dir + 1][0], 1, inarray.data(), 1,
182 Vmath::Vmul(nqtot, &df[3 * dir + 2][0], 1, inarray.data(), 1,
183 outarray[2].data(), 1);
187 Vmath::Smul(nqtot, df[3 * dir][0], inarray.data(), 1, tmp2.data(), 1);
188 Vmath::Smul(nqtot, df[3 * dir + 1][0], inarray.data(), 1, tmp3.data(),
190 Vmath::Smul(nqtot, df[3 * dir + 2][0], inarray.data(), 1,
191 outarray[2].data(), 1);
197 for (cnt = 0, k = 0; k < nquad2; ++k)
199 g2 = 2.0 / (1.0 - z2[k]);
200 for (j = 0; j < nquad1; ++j)
202 g1 = g2 / (1.0 - z1[j]);
204 g3 = (1.0 + z1[j]) * g2 * 0.5;
206 for (i = 0; i < nquad0; ++i, ++cnt)
208 g1a = g1 * (1 + z0[i]);
211 g0 * tmp2[cnt] + g1a * (tmp3[cnt] + outarray[2][cnt]);
213 outarray[1][cnt] = g2 * tmp3[cnt] + g3 * outarray[2][cnt];
225 std::array<NekDouble, 3> &firstOrderDerivs)
230 return StdTetExp::v_PhysEvalFirstDeriv(Lcoord, inarray, firstOrderDerivs);
241 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 && Lcoords[1] <= -1.0 &&
242 Lcoords[1] >= 1.0 && Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
243 "Local coordinates are not in region [-1,1]");
268 m_base[2]->GetBasisKey());
274 m_base[0]->GetPointsKey());
276 m_base[1]->GetPointsKey());
278 m_base[2]->GetPointsKey());
285 const NekDouble *data,
const std::vector<unsigned int> &nummodes,
286 const int mode_offset,
NekDouble *coeffs,
287 [[maybe_unused]] std::vector<LibUtilities::BasisType> &fromType)
289 int data_order0 = nummodes[mode_offset];
290 int fillorder0 =
min(
m_base[0]->GetNumModes(), data_order0);
291 int data_order1 = nummodes[mode_offset + 1];
292 int order1 =
m_base[1]->GetNumModes();
293 int fillorder1 =
min(order1, data_order1);
294 int data_order2 = nummodes[mode_offset + 2];
295 int order2 =
m_base[2]->GetNumModes();
296 int fillorder2 =
min(order2, data_order2);
307 "Extraction routine not set up for this basis");
309 "Extraction routine not set up for this basis");
312 for (j = 0; j < fillorder0; ++j)
314 for (i = 0; i < fillorder1 - j; ++i)
318 cnt += data_order2 - j - i;
319 cnt1 += order2 - j - i;
323 for (i = fillorder1 - j; i < data_order1 - j; ++i)
325 cnt += data_order2 - j - i;
328 for (i = fillorder1 - j; i < order1 - j; ++i)
330 cnt1 += order2 - j - i;
336 ASSERTL0(
false,
"basis is either not set up or not "
346 int nquad0 =
m_base[0]->GetNumPoints();
347 int nquad1 =
m_base[1]->GetNumPoints();
348 int nquad2 =
m_base[2]->GetNumPoints();
360 if (outarray.size() != nq0 * nq1)
365 for (
int i = 0; i < nquad0 * nquad1; ++i)
376 if (outarray.size() != nq0 * nq1)
382 for (
int k = 0; k < nquad2; k++)
384 for (
int i = 0; i < nquad0; ++i)
386 outarray[k * nquad0 + i] = (nquad0 * nquad1 * k) + i;
395 if (outarray.size() != nq0 * nq1)
401 for (
int j = 0; j < nquad1 * nquad2; ++j)
403 outarray[j] = nquad0 - 1 + j * nquad0;
411 if (outarray.size() != nq0 * nq1)
417 for (
int j = 0; j < nquad1 * nquad2; ++j)
419 outarray[j] = j * nquad0;
424 ASSERTL0(
false,
"face value (> 3) is out of range");
436 for (
int i = 0; i < ptsKeys.size(); ++i)
462 for (i = 0; i < vCoordDim; ++i)
467 size_t nqb = nq_face;
483 for (i = 0; i < vCoordDim; ++i)
485 normal[i][0] = -df[3 * i + 2][0];
492 for (i = 0; i < vCoordDim; ++i)
494 normal[i][0] = -df[3 * i + 1][0];
501 for (i = 0; i < vCoordDim; ++i)
504 df[3 * i][0] + df[3 * i + 1][0] + df[3 * i + 2][0];
511 for (i = 0; i < vCoordDim; ++i)
513 normal[i][0] = -df[3 * i][0];
518 ASSERTL0(
false,
"face is out of range (edge < 3)");
523 for (i = 0; i < vCoordDim; ++i)
525 fac += normal[i][0] * normal[i][0];
527 fac = 1.0 /
sqrt(fac);
530 for (i = 0; i < vCoordDim; ++i)
532 Vmath::Fill(nq_face, fac * normal[i][0], normal[i], 1);
540 int nq0 = ptsKeys[0].GetNumPoints();
541 int nq1 = ptsKeys[1].GetNumPoints();
542 int nq2 = ptsKeys[2].GetNumPoints();
544 int nq01 = nq0 * nq1;
573 for (j = 0; j < nq01; ++j)
575 normals[j] = -df[2][j] * jac[j];
576 normals[nqtot + j] = -df[5][j] * jac[j];
577 normals[2 * nqtot + j] = -df[8][j] * jac[j];
581 points0 = ptsKeys[0];
582 points1 = ptsKeys[1];
588 for (j = 0; j < nq0; ++j)
590 for (k = 0; k < nq2; ++k)
592 int tmp = j + nq01 * k;
593 normals[j + k * nq0] = -df[1][tmp] * jac[tmp];
594 normals[nqtot + j + k * nq0] = -df[4][tmp] * jac[tmp];
595 normals[2 * nqtot + j + k * nq0] =
596 -df[7][tmp] * jac[tmp];
597 faceJac[j + k * nq0] = jac[tmp];
601 points0 = ptsKeys[0];
602 points1 = ptsKeys[2];
608 for (j = 0; j < nq1; ++j)
610 for (k = 0; k < nq2; ++k)
612 int tmp = nq0 - 1 + nq0 * j + nq01 * k;
613 normals[j + k * nq1] =
614 (df[0][tmp] + df[1][tmp] + df[2][tmp]) * jac[tmp];
615 normals[nqtot + j + k * nq1] =
616 (df[3][tmp] + df[4][tmp] + df[5][tmp]) * jac[tmp];
617 normals[2 * nqtot + j + k * nq1] =
618 (df[6][tmp] + df[7][tmp] + df[8][tmp]) * jac[tmp];
619 faceJac[j + k * nq1] = jac[tmp];
623 points0 = ptsKeys[1];
624 points1 = ptsKeys[2];
630 for (j = 0; j < nq1; ++j)
632 for (k = 0; k < nq2; ++k)
634 int tmp = j * nq0 + nq01 * k;
635 normals[j + k * nq1] = -df[0][tmp] * jac[tmp];
636 normals[nqtot + j + k * nq1] = -df[3][tmp] * jac[tmp];
637 normals[2 * nqtot + j + k * nq1] =
638 -df[6][tmp] * jac[tmp];
639 faceJac[j + k * nq1] = jac[tmp];
643 points0 = ptsKeys[1];
644 points1 = ptsKeys[2];
649 ASSERTL0(
false,
"face is out of range (face < 3)");
657 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
660 for (i = 0; i < vCoordDim; ++i)
665 Vmath::Vmul(nq_face, work, 1, normal[i], 1, normal[i], 1);
672 Vmath::Vvtvp(nq_face, normal[i], 1, normal[i], 1, work, 1, work, 1);
682 Vmath::Vmul(nq_face, normal[i], 1, work, 1, normal[i], 1);
702 StdExpansion::LaplacianMatrixOp_MatFree(k1, k2, inarray, outarray, mkey);
726 StdTetExp::v_SVVLaplacianFilter(array, mkey);
751 returnval = StdTetExp::v_GenMatrix(mkey);
765 return tmp->GetStdMatrix(mkey);
794 if (inarray.data() == outarray.data())
800 (mat->GetOwnedMatrix())->GetPtr().data(),
m_ncoeffs,
801 tmp.data(), 1, 0.0, outarray.data(), 1);
806 (mat->GetOwnedMatrix())->GetPtr().data(),
m_ncoeffs,
807 inarray.data(), 1, 0.0, outarray.data(), 1);
822 int nquad0 =
m_base[0]->GetNumPoints();
823 int nquad1 =
m_base[1]->GetNumPoints();
824 int nquad2 =
m_base[2]->GetNumPoints();
825 int nqtot = nquad0 * nquad1 * nquad2;
827 ASSERTL1(wsp.size() >= 6 * nqtot,
"Insufficient workspace size.");
828 ASSERTL1(m_ncoeffs <= nqtot, "Workspace not set up for ncoeffs > nqtot
");
830 const Array<OneD, const NekDouble> &base0 = m_base[0]->GetBdata();
831 const Array<OneD, const NekDouble> &base1 = m_base[1]->GetBdata();
832 const Array<OneD, const NekDouble> &base2 = m_base[2]->GetBdata();
833 const Array<OneD, const NekDouble> &dbase0 = m_base[0]->GetDbdata();
834 const Array<OneD, const NekDouble> &dbase1 = m_base[1]->GetDbdata();
835 const Array<OneD, const NekDouble> &dbase2 = m_base[2]->GetDbdata();
836 const Array<OneD, const NekDouble> &metric00 =
837 m_metrics[eMetricLaplacian00];
838 const Array<OneD, const NekDouble> &metric01 =
839 m_metrics[eMetricLaplacian01];
840 const Array<OneD, const NekDouble> &metric02 =
841 m_metrics[eMetricLaplacian02];
842 const Array<OneD, const NekDouble> &metric11 =
843 m_metrics[eMetricLaplacian11];
844 const Array<OneD, const NekDouble> &metric12 =
845 m_metrics[eMetricLaplacian12];
846 const Array<OneD, const NekDouble> &metric22 =
847 m_metrics[eMetricLaplacian22];
849 // Allocate temporary storage
850 Array<OneD, NekDouble> wsp0(2 * nqtot, wsp);
851 Array<OneD, NekDouble> wsp1(nqtot, wsp + 1 * nqtot);
852 Array<OneD, NekDouble> wsp2(nqtot, wsp + 2 * nqtot);
853 Array<OneD, NekDouble> wsp3(nqtot, wsp + 3 * nqtot);
854 Array<OneD, NekDouble> wsp4(nqtot, wsp + 4 * nqtot);
855 Array<OneD, NekDouble> wsp5(nqtot, wsp + 5 * nqtot);
857 // LAPLACIAN MATRIX OPERATION
858 // wsp1 = du_dxi1 = D_xi1 * inarray = D_xi1 * u
859 // wsp2 = du_dxi2 = D_xi2 * inarray = D_xi2 * u
860 // wsp2 = du_dxi3 = D_xi3 * inarray = D_xi3 * u
861 PhysTensorDeriv(inarray, wsp0, wsp1, wsp2);
863 // wsp0 = k = g0 * wsp1 + g1 * wsp2 = g0 * du_dxi1 + g1 * du_dxi2
864 // wsp2 = l = g1 * wsp1 + g2 * wsp2 = g0 * du_dxi1 + g1 * du_dxi2
865 // where g0, g1 and g2 are the metric terms set up in the GeomFactors class
866 // especially for this purpose
867 Vmath::Vvtvvtp(nqtot, &metric00[0], 1, &wsp0[0], 1, &metric01[0], 1,
868 &wsp1[0], 1, &wsp3[0], 1);
869 Vmath::Vvtvp(nqtot, &metric02[0], 1, &wsp2[0], 1, &wsp3[0], 1, &wsp3[0], 1);
870 Vmath::Vvtvvtp(nqtot, &metric01[0], 1, &wsp0[0], 1, &metric11[0], 1,
871 &wsp1[0], 1, &wsp4[0], 1);
872 Vmath::Vvtvp(nqtot, &metric12[0], 1, &wsp2[0], 1, &wsp4[0], 1, &wsp4[0], 1);
873 Vmath::Vvtvvtp(nqtot, &metric02[0], 1, &wsp0[0], 1, &metric12[0], 1,
874 &wsp1[0], 1, &wsp5[0], 1);
875 Vmath::Vvtvp(nqtot, &metric22[0], 1, &wsp2[0], 1, &wsp5[0], 1, &wsp5[0], 1);
877 // outarray = m = (D_xi1 * B)^T * k
878 // wsp1 = n = (D_xi2 * B)^T * l
879 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
880 bool Deformed = (m_geomFactors->GetGtype() == SpatialDomains::eDeformed);
882 v_IProductWRTBaseKernel(dbase0, base1, base2, wsp3, outarray, jac,
884 v_IProductWRTBaseKernel(base0, dbase1, base2, wsp4, wsp2, jac, Deformed);
885 Vmath::Vadd(m_ncoeffs, wsp2.data(), 1, outarray.data(), 1, outarray.data(),
887 v_IProductWRTBaseKernel(base0, base1, dbase2, wsp5, wsp2, jac, Deformed);
888 Vmath::Vadd(m_ncoeffs, wsp2.data(), 1, outarray.data(), 1, outarray.data(),
892void TetExp::v_ComputeLaplacianMetric()
895 const unsigned int nqtot = GetTotPoints();
896 const unsigned int dim = 3;
897 const MetricType m[3][3] = {
898 {eMetricLaplacian00, eMetricLaplacian01, eMetricLaplacian02},
899 {eMetricLaplacian01, eMetricLaplacian11, eMetricLaplacian12},
900 {eMetricLaplacian02, eMetricLaplacian12, eMetricLaplacian22}};
902 for (unsigned int i = 0; i < dim; ++i)
904 for (unsigned int j = i; j < dim; ++j)
906 m_metrics[m[i][j]] = Array<OneD, NekDouble>(nqtot);
910 // Define shorthand synonyms for m_metrics storage
911 Array<OneD, NekDouble> g0(m_metrics[m[0][0]]);
912 Array<OneD, NekDouble> g1(m_metrics[m[1][1]]);
913 Array<OneD, NekDouble> g2(m_metrics[m[2][2]]);
914 Array<OneD, NekDouble> g3(m_metrics[m[0][1]]);
915 Array<OneD, NekDouble> g4(m_metrics[m[0][2]]);
916 Array<OneD, NekDouble> g5(m_metrics[m[1][2]]);
918 // Allocate temporary storage
919 Array<OneD, NekDouble> alloc(7 * nqtot, 0.0);
920 Array<OneD, NekDouble> h0(alloc); // h0
921 Array<OneD, NekDouble> h1(alloc + 1 * nqtot); // h1
922 Array<OneD, NekDouble> h2(alloc + 2 * nqtot); // h2
923 Array<OneD, NekDouble> h3(alloc + 3 * nqtot); // h3
924 Array<OneD, NekDouble> wsp4(alloc + 4 * nqtot); // wsp4
925 Array<OneD, NekDouble> wsp5(alloc + 5 * nqtot); // wsp5
926 Array<OneD, NekDouble> wsp6(alloc + 6 * nqtot); // wsp6
927 // Reuse some of the storage as workspace
928 Array<OneD, NekDouble> wsp7(alloc); // wsp7
929 Array<OneD, NekDouble> wsp8(alloc + 1 * nqtot); // wsp8
930 Array<OneD, NekDouble> wsp9(alloc + 2 * nqtot); // wsp9
932 const Array<TwoD, const NekDouble> &df = m_geomFactors->GetDerivFactors();
933 const Array<OneD, const NekDouble> &z0 = m_base[0]->GetZ();
934 const Array<OneD, const NekDouble> &z1 = m_base[1]->GetZ();
935 const Array<OneD, const NekDouble> &z2 = m_base[2]->GetZ();
936 const unsigned int nquad0 = m_base[0]->GetNumPoints();
937 const unsigned int nquad1 = m_base[1]->GetNumPoints();
938 const unsigned int nquad2 = m_base[2]->GetNumPoints();
940 for (j = 0; j < nquad2; ++j)
942 for (i = 0; i < nquad1; ++i)
944 Vmath::Fill(nquad0, 4.0 / (1.0 - z1[i]) / (1.0 - z2[j]),
945 &h0[0] + i * nquad0 + j * nquad0 * nquad1, 1);
946 Vmath::Fill(nquad0, 2.0 / (1.0 - z1[i]) / (1.0 - z2[j]),
947 &h1[0] + i * nquad0 + j * nquad0 * nquad1, 1);
948 Vmath::Fill(nquad0, 2.0 / (1.0 - z2[j]),
949 &h2[0] + i * nquad0 + j * nquad0 * nquad1, 1);
950 Vmath::Fill(nquad0, (1.0 + z1[i]) / (1.0 - z2[j]),
951 &h3[0] + i * nquad0 + j * nquad0 * nquad1, 1);
954 for (i = 0; i < nquad0; i++)
956 Blas::Dscal(nquad1 * nquad2, 1 + z0[i], &h1[0] + i, nquad0);
959 // Step 3. Construct combined metric terms for physical space to
960 // collapsed coordinate system.
961 // Order of construction optimised to minimise temporary storage
962 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
965 Vmath::Vadd(nqtot, &df[1][0], 1, &df[2][0], 1, &wsp4[0], 1);
966 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &wsp4[0], 1, &h1[0], 1,
969 Vmath::Vadd(nqtot, &df[4][0], 1, &df[5][0], 1, &wsp5[0], 1);
970 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &wsp5[0], 1, &h1[0], 1,
973 Vmath::Vadd(nqtot, &df[7][0], 1, &df[8][0], 1, &wsp6[0], 1);
974 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &wsp6[0], 1, &h1[0], 1,
978 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0],
980 Vmath::Vvtvp(nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
983 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0],
985 Vmath::Vvtvp(nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
987 // overwrite h0, h1, h2
988 // wsp7 (h2f1 + h3f2)
989 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &h2[0], 1, &df[2][0], 1, &h3[0], 1,
991 // wsp8 (h2f4 + h3f5)
992 Vmath::Vvtvvtp(nqtot, &df[4][0], 1, &h2[0], 1, &df[5][0], 1, &h3[0], 1,
994 // wsp9 (h2f7 + h3f8)
995 Vmath::Vvtvvtp(nqtot, &df[7][0], 1, &h2[0], 1, &df[8][0], 1, &h3[0], 1,
999 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp7[0], 1, &wsp5[0], 1, &wsp8[0],
1001 Vmath::Vvtvp(nqtot, &wsp6[0], 1, &wsp9[0], 1, &g3[0], 1, &g3[0], 1);
1003 // overwrite wsp4, wsp5, wsp6
1005 Vmath::Vvtvvtp(nqtot, &wsp7[0], 1, &wsp7[0], 1, &wsp8[0], 1, &wsp8[0],
1007 Vmath::Vvtvp(nqtot, &wsp9[0], 1, &wsp9[0], 1, &g1[0], 1, &g1[0], 1);
1010 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp7[0], 1, &df[5][0], 1, &wsp8[0],
1012 Vmath::Vvtvp(nqtot, &df[8][0], 1, &wsp9[0], 1, &g5[0], 1, &g5[0], 1);
1015 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1,
1016 &df[5][0], 1, &g2[0], 1);
1017 Vmath::Vvtvp(nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1022 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[1][0] + df[2][0], &h1[0],
1025 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[4][0] + df[5][0], &h1[0],
1028 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[7][0] + df[8][0], &h1[0],
1032 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0],
1034 Vmath::Vvtvp(nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1037 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1,
1039 Vmath::Svtvp(nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1041 // overwrite h0, h1, h2
1042 // wsp7 (h2f1 + h3f2)
1043 Vmath::Svtsvtp(nqtot, df[1][0], &h2[0], 1, df[2][0], &h3[0], 1,
1045 // wsp8 (h2f4 + h3f5)
1046 Vmath::Svtsvtp(nqtot, df[4][0], &h2[0], 1, df[5][0], &h3[0], 1,
1048 // wsp9 (h2f7 + h3f8)
1049 Vmath::Svtsvtp(nqtot, df[7][0], &h2[0], 1, df[8][0], &h3[0], 1,
1053 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp7[0], 1, &wsp5[0], 1, &wsp8[0],
1055 Vmath::Vvtvp(nqtot, &wsp6[0], 1, &wsp9[0], 1, &g3[0], 1, &g3[0], 1);
1057 // overwrite wsp4, wsp5, wsp6
1059 Vmath::Vvtvvtp(nqtot, &wsp7[0], 1, &wsp7[0], 1, &wsp8[0], 1, &wsp8[0],
1061 Vmath::Vvtvp(nqtot, &wsp9[0], 1, &wsp9[0], 1, &g1[0], 1, &g1[0], 1);
1064 Vmath::Svtsvtp(nqtot, df[2][0], &wsp7[0], 1, df[5][0], &wsp8[0], 1,
1066 Vmath::Svtvp(nqtot, df[8][0], &wsp9[0], 1, &g5[0], 1, &g5[0], 1);
1070 df[2][0] * df[2][0] + df[5][0] * df[5][0] +
1071 df[8][0] * df[8][0],
1075} // namespace Nektar::LocalRegions
#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...
void ComputeLaplacianMetric()
SpatialDomains::Geometry * m_geom
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
SpatialDomains::GeomFactorsUniquePtr m_geomFactors
void v_ComputeTraceNormal(const int face) override
Compute the normal of a triangular face.
DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey) override
void v_DropLocMatrix(const MatrixKey &mkey) override
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
void v_LaplacianMatrixOp(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
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey) override
void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
Get the coordinates "coords" at the local coordinates "Lcoords".
TetExp(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.
StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const override
DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey) override
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product .
StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const override
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
void GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
void v_DropLocStaticCondMatrix(const MatrixKey &mkey) override
void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
void v_GetTracePhysMap(const int face, Array< OneD, int > &outarray) override
Returns the physical values at the quadrature points of a face.
void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) 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
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 GetCoordim() const
Return the coordinate dimension of this object (i.e. the dimension of the space in which this object ...
virtual void v_LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
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
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.
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
void v_IProductWRTBaseKernel(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, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false, bool CollDir2=false) override
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
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].
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_C
Principle Modified Functions .
@ eModified_A
Principle Modified Functions .
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< StdTetExp > StdTetExpSharedPtr
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 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 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 Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > min(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > sqrt(scalarT< T > in)