35 #include <boost/core/ignore_unused.hpp>
46 namespace LocalRegions
54 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
57 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
59 StdPrismExp (Ba, Bb, Bc),
63 std::bind(&
PrismExp::CreateMatrix, this, std::placeholders::_1),
64 std::string(
"PrismExpMatrix")),
65 m_staticCondMatrixManager(
66 std::bind(&
PrismExp::CreateStaticCondMatrix, this, std::placeholders::_1),
67 std::string(
"PrismExpStaticCondMatrix"))
77 m_matrixManager(T.m_matrixManager),
78 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
113 int nquad0 =
m_base[0]->GetNumPoints();
114 int nquad1 =
m_base[1]->GetNumPoints();
115 int nquad2 =
m_base[2]->GetNumPoints();
130 return StdPrismExp::v_Integral(tmp);
150 StdPrismExp::v_PhysDeriv(inarray, diff0, diff1, diff2);
156 Vmath::Vmul (nqtot,&df[0][0],1,&diff0[0],1,&out_d0[0],1);
157 Vmath::Vvtvp (nqtot,&df[1][0],1,&diff1[0],1,&out_d0[0],1,&out_d0[0],1);
158 Vmath::Vvtvp (nqtot,&df[2][0],1,&diff2[0],1,&out_d0[0],1,&out_d0[0],1);
163 Vmath::Vmul (nqtot,&df[3][0],1,&diff0[0],1,&out_d1[0],1);
164 Vmath::Vvtvp (nqtot,&df[4][0],1,&diff1[0],1,&out_d1[0],1,&out_d1[0],1);
165 Vmath::Vvtvp (nqtot,&df[5][0],1,&diff2[0],1,&out_d1[0],1,&out_d1[0],1);
170 Vmath::Vmul (nqtot,&df[6][0],1,&diff0[0],1,&out_d2[0],1);
171 Vmath::Vvtvp (nqtot,&df[7][0],1,&diff1[0],1,&out_d2[0],1,&out_d2[0],1);
172 Vmath::Vvtvp (nqtot,&df[8][0],1,&diff2[0],1,&out_d2[0],1,&out_d2[0],1);
179 Vmath::Smul (nqtot,df[0][0],&diff0[0],1,&out_d0[0],1);
180 Blas::Daxpy (nqtot,df[1][0],&diff1[0],1,&out_d0[0],1);
181 Blas::Daxpy (nqtot,df[2][0],&diff2[0],1,&out_d0[0],1);
186 Vmath::Smul (nqtot,df[3][0],&diff0[0],1,&out_d1[0],1);
187 Blas::Daxpy (nqtot,df[4][0],&diff1[0],1,&out_d1[0],1);
188 Blas::Daxpy (nqtot,df[5][0],&diff2[0],1,&out_d1[0],1);
193 Vmath::Smul (nqtot,df[6][0],&diff0[0],1,&out_d2[0],1);
194 Blas::Daxpy (nqtot,df[7][0],&diff1[0],1,&out_d2[0],1);
195 Blas::Daxpy (nqtot,df[8][0],&diff2[0],1,&out_d2[0],1);
220 if(
m_base[0]->Collocation() &&
221 m_base[1]->Collocation() &&
282 bool multiplybyweights)
284 const int nquad0 =
m_base[0]->GetNumPoints();
285 const int nquad1 =
m_base[1]->GetNumPoints();
286 const int nquad2 =
m_base[2]->GetNumPoints();
287 const int order0 =
m_base[0]->GetNumModes();
288 const int order1 =
m_base[1]->GetNumModes();
292 if(multiplybyweights)
309 inarray,outarray,wsp,
357 const int nquad0 =
m_base[0]->GetNumPoints();
358 const int nquad1 =
m_base[1]->GetNumPoints();
359 const int nquad2 =
m_base[2]->GetNumPoints();
360 const int order0 =
m_base[0]->GetNumModes ();
361 const int order1 =
m_base[1]->GetNumModes ();
362 const int nqtot = nquad0*nquad1*nquad2;
408 const int nquad0 =
m_base[0]->GetNumPoints();
409 const int nquad1 =
m_base[1]->GetNumPoints();
410 const int nquad2 =
m_base[2]->GetNumPoints();
411 const int order0 =
m_base[0]->GetNumModes ();
412 const int order1 =
m_base[1]->GetNumModes ();
413 const int nqtot = nquad0*nquad1*nquad2;
437 Vmath::Vmul(nqtot,&df[3*dir][0], 1,tmp1.get(),1,tmp2.get(),1);
438 Vmath::Vmul(nqtot,&df[3*dir+1][0],1,tmp1.get(),1,tmp3.get(),1);
439 Vmath::Vmul(nqtot,&df[3*dir+2][0],1,tmp1.get(),1,tmp4.get(),1);
443 Vmath::Smul(nqtot, df[3*dir][0], tmp1.get(),1,tmp2.get(), 1);
444 Vmath::Smul(nqtot, df[3*dir+1][0],tmp1.get(),1,tmp3.get(), 1);
445 Vmath::Smul(nqtot, df[3*dir+2][0],tmp1.get(),1,tmp4.get(), 1);
449 for (
int i = 0; i < nquad0; ++i)
451 gfac0[i] = 0.5*(1+z0[i]);
455 for (
int i = 0; i < nquad2; ++i)
457 gfac2[i] = 2.0/(1-z2[i]);
460 const int nq01 = nquad0*nquad1;
462 for (
int i = 0; i < nquad2; ++i)
464 Vmath::Smul(nq01,gfac2[i],&tmp2[0]+i*nq01,1,&tmp2[0]+i*nq01,1);
465 Vmath::Smul(nq01,gfac2[i],&tmp4[0]+i*nq01,1,&tmp5[0]+i*nq01,1);
468 for (
int i = 0; i < nquad1*nquad2; ++i)
470 Vmath::Vmul(nquad0,&gfac0[0],1,&tmp5[0]+i*nquad0,1,
471 &tmp5[0]+i*nquad0,1);
474 Vmath::Vadd(nqtot, &tmp2[0], 1, &tmp5[0], 1, &tmp2[0], 1);
486 m_base[2]->GetBasisKey());
492 2,
m_base[0]->GetPointsKey());
494 2,
m_base[1]->GetPointsKey());
496 2,
m_base[2]->GetPointsKey());
511 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 &&
512 Lcoords[1] <= -1.0 && Lcoords[1] >= 1.0 &&
513 Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
514 "Local coordinates are not in region [-1,1]");
518 for(i = 0; i <
m_geom->GetCoordim(); ++i)
520 coords[i] =
m_geom->GetCoord(i,Lcoords);
542 return StdPrismExp::v_PhysEvaluate(Lcoord,physvals);
552 m_geom->GetLocCoords(coord, Lcoord);
554 return StdPrismExp::v_PhysEvaluate(Lcoord, physvals);
564 return m_geom->GetCoordim();
569 const std::vector<unsigned int >& nummodes,
570 const int mode_offset,
572 std::vector<LibUtilities::BasisType> &fromType)
574 boost::ignore_unused(fromType);
576 int data_order0 = nummodes[mode_offset];
577 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
578 int data_order1 = nummodes[mode_offset+1];
579 int order1 =
m_base[1]->GetNumModes();
580 int fillorder1 = min(order1,data_order1);
581 int data_order2 = nummodes[mode_offset+2];
582 int order2 =
m_base[2]->GetNumModes();
583 int fillorder2 = min(order2,data_order2);
595 "Extraction routine not set up for this basis");
598 "Extraction routine not set up for this basis");
601 for(j = 0; j < fillorder0; ++j)
603 for(i = 0; i < fillorder1; ++i)
607 cnt += data_order2-j;
612 for(i = fillorder1; i < data_order1; ++i)
614 cnt += data_order2-j;
617 for(i = fillorder1; i < order1; ++i)
625 ASSERTL0(
false,
"basis is either not set up or not "
633 int nquad0 =
m_base[0]->GetNumPoints();
634 int nquad1 =
m_base[1]->GetNumPoints();
635 int nquad2 =
m_base[2]->GetNumPoints();
644 if(outarray.size()!=nq0*nq1)
650 for(
int i = 0; i < nquad0*nquad1; ++i)
659 if(outarray.size()!=nq0*nq1)
665 for (
int k=0; k<nquad2; k++)
667 for(
int i = 0; i < nquad0; ++i)
669 outarray[k*nquad0+i] = (nquad0*nquad1*k)+i;
678 if(outarray.size()!=nq0*nq1)
684 for(
int j = 0; j < nquad1*nquad2; ++j)
686 outarray[j] = nquad0-1 + j*nquad0;
693 if(outarray.size()!=nq0*nq1)
699 for (
int k=0; k<nquad2; k++)
701 for(
int i = 0; i < nquad0; ++i)
703 outarray[k*nquad0+i] = nquad0*(nquad1-1) + (nquad0*nquad1*k)+i;
711 if(outarray.size()!=nq0*nq1)
717 for(
int j = 0; j < nquad1*nquad2; ++j)
719 outarray[j] = j*nquad0;
724 ASSERTL0(
false,
"face value (> 4) is out of range");
740 for(
int i = 0; i < ptsKeys.size(); ++i)
754 int nq0 = ptsKeys[0].GetNumPoints();
755 int nq1 = ptsKeys[1].GetNumPoints();
756 int nq2 = ptsKeys[2].GetNumPoints();
772 for (i = 0; i < vCoordDim; ++i)
777 size_t nqb = nq_face;
792 for(i = 0; i < vCoordDim; ++i)
794 normal[i][0] = -df[3*i+2][0];;
800 for(i = 0; i < vCoordDim; ++i)
802 normal[i][0] = -df[3*i+1][0];
808 for(i = 0; i < vCoordDim; ++i)
810 normal[i][0] = df[3*i][0]+df[3*i+2][0];
816 for(i = 0; i < vCoordDim; ++i)
818 normal[i][0] = df[3*i+1][0];
824 for(i = 0; i < vCoordDim; ++i)
826 normal[i][0] = -df[3*i][0];
831 ASSERTL0(
false,
"face is out of range (face < 4)");
836 for(i = 0; i < vCoordDim; ++i)
838 fac += normal[i][0]*normal[i][0];
844 for (i = 0; i < vCoordDim; ++i)
859 else if (face == 1 || face == 3)
881 for(j = 0; j < nq01; ++j)
883 normals[j] = -df[2][j]*jac[j];
884 normals[nqtot+j] = -df[5][j]*jac[j];
885 normals[2*nqtot+j] = -df[8][j]*jac[j];
889 points0 = ptsKeys[0];
890 points1 = ptsKeys[1];
896 for (j = 0; j < nq0; ++j)
898 for(k = 0; k < nq2; ++k)
902 -df[1][tmp]*jac[tmp];
903 normals[nqtot+j+k*nq0] =
904 -df[4][tmp]*jac[tmp];
905 normals[2*nqtot+j+k*nq0] =
906 -df[7][tmp]*jac[tmp];
907 faceJac[j+k*nq0] = jac[tmp];
911 points0 = ptsKeys[0];
912 points1 = ptsKeys[2];
918 for (j = 0; j < nq1; ++j)
920 for(k = 0; k < nq2; ++k)
922 int tmp = nq0-1+nq0*j+nq01*k;
924 (df[0][tmp]+df[2][tmp])*jac[tmp];
925 normals[nqtot+j+k*nq1] =
926 (df[3][tmp]+df[5][tmp])*jac[tmp];
927 normals[2*nqtot+j+k*nq1] =
928 (df[6][tmp]+df[8][tmp])*jac[tmp];
929 faceJac[j+k*nq1] = jac[tmp];
933 points0 = ptsKeys[1];
934 points1 = ptsKeys[2];
940 for (j = 0; j < nq0; ++j)
942 for(k = 0; k < nq2; ++k)
944 int tmp = nq0*(nq1-1) + j + nq01*k;
947 normals[nqtot+j+k*nq0] =
949 normals[2*nqtot+j+k*nq0] =
951 faceJac[j+k*nq0] = jac[tmp];
955 points0 = ptsKeys[0];
956 points1 = ptsKeys[2];
962 for (j = 0; j < nq1; ++j)
964 for(k = 0; k < nq2; ++k)
966 int tmp = j*nq0+nq01*k;
968 -df[0][tmp]*jac[tmp];
969 normals[nqtot+j+k*nq1] =
970 -df[3][tmp]*jac[tmp];
971 normals[2*nqtot+j+k*nq1] =
972 -df[6][tmp]*jac[tmp];
973 faceJac[j+k*nq1] = jac[tmp];
977 points0 = ptsKeys[1];
978 points1 = ptsKeys[2];
983 ASSERTL0(
false,
"face is out of range (face < 4)");
993 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
996 for(i = 0; i < vCoordDim; ++i)
1003 Vmath::Vmul(nq_face,work,1,normal[i],1,normal[i],1);
1010 Vmath::Vvtvp(nq_face,normal[i],1,normal[i],1,work,1,work,1);
1020 Vmath::Vmul(nq_face,normal[i],1,work,1,normal[i],1);
1030 StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
1048 StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,mkey);
1066 if(inarray.get() == outarray.get())
1072 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1077 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1104 StdPrismExp::v_SVVLaplacianFilter( array, mkey);
1131 returnval = StdPrismExp::v_GenMatrix(mkey);
1146 return tmp->GetStdMatrix(mkey);
1170 "Geometric information is not set up");
1255 int rows = deriv0.GetRows();
1256 int cols = deriv1.GetColumns();
1261 (*WeakDeriv) = df[3*dir ][0]*deriv0
1262 + df[3*dir+1][0]*deriv1
1263 + df[3*dir+2][0]*deriv2;
1308 int rows = lap00.GetRows();
1309 int cols = lap00.GetColumns();
1314 (*lap) = gmat[0][0]*lap00
1319 + gmat[7][0]*(lap12 +
Transpose(lap12));
1337 int rows = LapMat.GetRows();
1338 int cols = LapMat.GetColumns();
1343 (*helm) = LapMat + factor*MassMat;
1463 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1464 unsigned int exp_size[] = {nbdry, nint};
1465 unsigned int nblks=2;
1475 goto UseLocRegionsMatrix;
1481 goto UseLocRegionsMatrix;
1486 factor = mat->Scale();
1487 goto UseStdRegionsMatrix;
1490 UseStdRegionsMatrix:
1505 UseLocRegionsMatrix:
1521 for(i = 0; i < nbdry; ++i)
1523 for(j = 0; j < nbdry; ++j)
1525 (*A)(i,j) = mat(bmap[i],bmap[j]);
1528 for(j = 0; j < nint; ++j)
1530 (*B)(i,j) = mat(bmap[i],imap[j]);
1534 for(i = 0; i < nint; ++i)
1536 for(j = 0; j < nbdry; ++j)
1538 (*C)(i,j) = mat(imap[i],bmap[j]);
1541 for(j = 0; j < nint; ++j)
1543 (*D)(i,j) = mat(imap[i],imap[j]);
1552 (*A) = (*A) - (*B)*(*C);
1592 int nquad0 =
m_base[0]->GetNumPoints();
1593 int nquad1 =
m_base[1]->GetNumPoints();
1594 int nquad2 =
m_base[2]->GetNumPoints();
1595 int nqtot = nquad0*nquad1*nquad2;
1629 StdExpansion3D::PhysTensorDeriv(inarray,wsp1,wsp2,wsp3);
1638 for (i = 0; i < nquad2; ++i)
1640 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h0[0]+i*nquad0*nquad1,1);
1641 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h1[0]+i*nquad0*nquad1,1);
1643 for (i = 0; i < nquad0; i++)
1645 Blas::Dscal(nquad1*nquad2, 0.5*(1+z0[i]), &h1[0]+i, nquad0);
1654 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &df[2][0], 1, &h1[0], 1, &wsp4[0], 1);
1656 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &df[5][0], 1, &h1[0], 1, &wsp5[0], 1);
1658 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &df[8][0], 1, &h1[0], 1, &wsp6[0], 1);
1661 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1662 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1665 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &wsp4[0], 1, &df[4][0], 1, &wsp5[0], 1, &g3[0], 1);
1666 Vmath::Vvtvp (nqtot, &df[7][0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1669 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0], 1, &g4[0], 1);
1670 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1674 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[1][0], 1, &df[4][0], 1, &df[4][0], 1, &g1[0], 1);
1675 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[7][0], 1, &g1[0], 1, &g1[0], 1);
1678 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1, &df[5][0], 1, &g2[0], 1);
1679 Vmath::Vvtvp (nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1682 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[2][0], 1, &df[4][0], 1, &df[5][0], 1, &g5[0], 1);
1683 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[8][0], 1, &g5[0], 1, &g5[0], 1);
1688 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[2][0], &h1[0], 1, &wsp4[0], 1);
1690 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[5][0], &h1[0], 1, &wsp5[0], 1);
1692 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[8][0], &h1[0], 1, &wsp6[0], 1);
1695 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1696 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1699 Vmath::Svtsvtp(nqtot, df[1][0], &wsp4[0], 1, df[4][0], &wsp5[0], 1, &g3[0], 1);
1700 Vmath::Svtvp (nqtot, df[7][0], &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1703 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1, &g4[0], 1);
1704 Vmath::Svtvp (nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1708 Vmath::Fill(nqtot, df[1][0]*df[1][0] + df[4][0]*df[4][0] + df[7][0]*df[7][0], &g1[0], 1);
1711 Vmath::Fill(nqtot, df[2][0]*df[2][0] + df[5][0]*df[5][0] + df[8][0]*df[8][0], &g2[0], 1);
1714 Vmath::Fill(nqtot, df[1][0]*df[2][0] + df[4][0]*df[5][0] + df[7][0]*df[8][0], &g5[0], 1);
1718 Vmath::Vvtvvtp(nqtot,&g0[0],1,&wsp1[0],1,&g3[0],1,&wsp2[0],1,&wsp7[0],1);
1719 Vmath::Vvtvp (nqtot,&g4[0],1,&wsp3[0],1,&wsp7[0],1,&wsp7[0],1);
1720 Vmath::Vvtvvtp(nqtot,&g1[0],1,&wsp2[0],1,&g3[0],1,&wsp1[0],1,&wsp8[0],1);
1721 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp3[0],1,&wsp8[0],1,&wsp8[0],1);
1722 Vmath::Vvtvvtp(nqtot,&g2[0],1,&wsp3[0],1,&g4[0],1,&wsp1[0],1,&wsp9[0],1);
1723 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp2[0],1,&wsp9[0],1,&wsp9[0],1);
1747 boost::ignore_unused(oldstandard);
1749 int np0 =
m_base[0]->GetNumPoints();
1750 int np1 =
m_base[1]->GetNumPoints();
1751 int np2 =
m_base[2]->GetNumPoints();
1752 int np = max(np0,max(np1,np2));
1754 bool standard =
true;
1756 int vid0 =
m_geom->GetVid(0);
1757 int vid1 =
m_geom->GetVid(1);
1758 int vid2 =
m_geom->GetVid(4);
1762 if((vid2 < vid1)&&(vid2 < vid0))
1770 else if((vid1 < vid2)&&(vid1 < vid0))
1778 else if ((vid0 < vid2)&&(vid0 < vid1))
1800 rot[0] = (0+rotate)%3;
1801 rot[1] = (1+rotate)%3;
1802 rot[2] = (2+rotate)%3;
1805 for(
int i = 0; i < np-1; ++i)
1807 planep1 += (np-i)*np;
1812 if(standard ==
false)
1814 for(
int j = 0; j < np-1; ++j)
1818 for(
int k = 0; k < np-i-2; ++k)
1821 prismpt[rot[0]] = plane + row + k;
1822 prismpt[rot[1]] = plane + row + k+1;
1823 prismpt[rot[2]] = planep1 + row1 + k;
1825 prismpt[3+rot[0]] = plane + rowp1 + k;
1826 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1827 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1829 conn[cnt++] = prismpt[0];
1830 conn[cnt++] = prismpt[1];
1831 conn[cnt++] = prismpt[3];
1832 conn[cnt++] = prismpt[2];
1834 conn[cnt++] = prismpt[5];
1835 conn[cnt++] = prismpt[2];
1836 conn[cnt++] = prismpt[3];
1837 conn[cnt++] = prismpt[4];
1839 conn[cnt++] = prismpt[3];
1840 conn[cnt++] = prismpt[1];
1841 conn[cnt++] = prismpt[4];
1842 conn[cnt++] = prismpt[2];
1845 prismpt[rot[0]] = planep1 + row1 + k+1;
1846 prismpt[rot[1]] = planep1 + row1 + k;
1847 prismpt[rot[2]] = plane + row + k+1;
1849 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1850 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1851 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1854 conn[cnt++] = prismpt[0];
1855 conn[cnt++] = prismpt[1];
1856 conn[cnt++] = prismpt[2];
1857 conn[cnt++] = prismpt[5];
1859 conn[cnt++] = prismpt[5];
1860 conn[cnt++] = prismpt[0];
1861 conn[cnt++] = prismpt[4];
1862 conn[cnt++] = prismpt[1];
1864 conn[cnt++] = prismpt[3];
1865 conn[cnt++] = prismpt[4];
1866 conn[cnt++] = prismpt[0];
1867 conn[cnt++] = prismpt[5];
1872 prismpt[rot[0]] = plane + row + np-i-2;
1873 prismpt[rot[1]] = plane + row + np-i-1;
1874 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1876 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1877 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1878 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1880 conn[cnt++] = prismpt[0];
1881 conn[cnt++] = prismpt[1];
1882 conn[cnt++] = prismpt[3];
1883 conn[cnt++] = prismpt[2];
1885 conn[cnt++] = prismpt[5];
1886 conn[cnt++] = prismpt[2];
1887 conn[cnt++] = prismpt[3];
1888 conn[cnt++] = prismpt[4];
1890 conn[cnt++] = prismpt[3];
1891 conn[cnt++] = prismpt[1];
1892 conn[cnt++] = prismpt[4];
1893 conn[cnt++] = prismpt[2];
1902 for(
int j = 0; j < np-1; ++j)
1906 for(
int k = 0; k < np-i-2; ++k)
1909 prismpt[rot[0]] = plane + row + k;
1910 prismpt[rot[1]] = plane + row + k+1;
1911 prismpt[rot[2]] = planep1 + row1 + k;
1913 prismpt[3+rot[0]] = plane + rowp1 + k;
1914 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1915 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1917 conn[cnt++] = prismpt[0];
1918 conn[cnt++] = prismpt[1];
1919 conn[cnt++] = prismpt[4];
1920 conn[cnt++] = prismpt[2];
1922 conn[cnt++] = prismpt[4];
1923 conn[cnt++] = prismpt[3];
1924 conn[cnt++] = prismpt[0];
1925 conn[cnt++] = prismpt[2];
1927 conn[cnt++] = prismpt[3];
1928 conn[cnt++] = prismpt[4];
1929 conn[cnt++] = prismpt[5];
1930 conn[cnt++] = prismpt[2];
1933 prismpt[rot[0]] = planep1 + row1 + k+1;
1934 prismpt[rot[1]] = planep1 + row1 + k;
1935 prismpt[rot[2]] = plane + row + k+1;
1937 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1938 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1939 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1941 conn[cnt++] = prismpt[0];
1942 conn[cnt++] = prismpt[2];
1943 conn[cnt++] = prismpt[1];
1944 conn[cnt++] = prismpt[5];
1946 conn[cnt++] = prismpt[3];
1947 conn[cnt++] = prismpt[5];
1948 conn[cnt++] = prismpt[0];
1949 conn[cnt++] = prismpt[1];
1951 conn[cnt++] = prismpt[5];
1952 conn[cnt++] = prismpt[3];
1953 conn[cnt++] = prismpt[4];
1954 conn[cnt++] = prismpt[1];
1958 prismpt[rot[0]] = plane + row + np-i-2;
1959 prismpt[rot[1]] = plane + row + np-i-1;
1960 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1962 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1963 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1964 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1966 conn[cnt++] = prismpt[0];
1967 conn[cnt++] = prismpt[1];
1968 conn[cnt++] = prismpt[4];
1969 conn[cnt++] = prismpt[2];
1971 conn[cnt++] = prismpt[4];
1972 conn[cnt++] = prismpt[3];
1973 conn[cnt++] = prismpt[0];
1974 conn[cnt++] = prismpt[2];
1976 conn[cnt++] = prismpt[3];
1977 conn[cnt++] = prismpt[4];
1978 conn[cnt++] = prismpt[5];
1979 conn[cnt++] = prismpt[2];
#define ASSERTL0(condition, msg)
#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...
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.
std::map< int, NormalVector > m_faceNormals
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
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
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
DNekMatSharedPtr BuildTransformationMatrix(const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
void v_ComputeTraceNormal(const int face)
Get the normals along specficied face Get the face normals interplated to a points0 x points 0 type d...
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
virtual void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals)
This function evaluates the expansion at a single (arbitrary) point of the domain.
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
Calculate the Laplacian multiplication in a matrix-free manner.
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into out...
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculates the inner product .
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
Calculate the derivative of the physical points.
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over prismatic region and return the value.
PrismExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, const SpatialDomains::PrismGeomSharedPtr &geom)
Constructor using BasisKey class for quadrature points and order definition.
virtual int v_GetCoordim()
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_GetTracePhysMap(const int face, Array< OneD, int > &outarray)
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
Get the coordinates #coords at the local coordinates #Lcoords.
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
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 > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
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.
int NumBndryCoeffs(void) const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
const LibUtilities::PointsKeyVector GetPointsKeys() const
DNekBlkMatSharedPtr GetStdStaticCondMatrix(const StdMatrixKey &mkey)
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &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 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.
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
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)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
const ConstFactorMap & GetConstFactors() const
LibUtilities::ShapeType GetShapeType() const
const VarCoeffMap & GetVarCoeffs() const
MatrixType GetMatrixType() const
NekDouble GetConstFactor(const ConstFactorType &factor) const
bool ConstFactorExists(const ConstFactorType &factor) 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 = A x 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 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.
std::shared_ptr< PrismGeom > PrismGeomSharedPtr
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eNoGeomType
No type defined.
@ eMovingRegular
Currently unused.
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
@ eInvLaplacianWithUnityMean
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
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)
vvtvvtp (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/y.
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 > sqrt(scalarT< T > in)