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),
64 std::string(
"PrismExpMatrix")),
65 m_staticCondMatrixManager(
66 std::bind(&
PrismExp::CreateStaticCondMatrix, this,
std::placeholders::_1),
67 std::string(
"PrismExpStaticCondMatrix"))
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);
154 if(out_d0.num_elements())
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);
161 if(out_d1.num_elements())
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);
168 if(out_d2.num_elements())
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);
177 if(out_d0.num_elements())
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);
184 if(out_d1.num_elements())
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);
191 if(out_d2.num_elements())
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;
385 Vmath::Vmul(nqtot,&df[3*dir][0], 1,tmp1.get(),1,tmp2.get(),1);
386 Vmath::Vmul(nqtot,&df[3*dir+1][0],1,tmp1.get(),1,tmp3.get(),1);
387 Vmath::Vmul(nqtot,&df[3*dir+2][0],1,tmp1.get(),1,tmp4.get(),1);
391 Vmath::Smul(nqtot, df[3*dir][0], tmp1.get(),1,tmp2.get(), 1);
392 Vmath::Smul(nqtot, df[3*dir+1][0],tmp1.get(),1,tmp3.get(), 1);
393 Vmath::Smul(nqtot, df[3*dir+2][0],tmp1.get(),1,tmp4.get(), 1);
397 for (i = 0; i < nquad0; ++i)
399 gfac0[i] = 0.5*(1+z0[i]);
403 for (i = 0; i < nquad2; ++i)
405 gfac2[i] = 2.0/(1-z2[i]);
408 const int nq01 = nquad0*nquad1;
410 for (i = 0; i < nquad2; ++i)
412 Vmath::Smul(nq01,gfac2[i],&tmp2[0]+i*nq01,1,&tmp2[0]+i*nq01,1);
413 Vmath::Smul(nq01,gfac2[i],&tmp4[0]+i*nq01,1,&tmp5[0]+i*nq01,1);
416 for(i = 0; i < nquad1*nquad2; ++i)
418 Vmath::Vmul(nquad0,&gfac0[0],1,&tmp5[0]+i*nquad0,1,
419 &tmp5[0]+i*nquad0,1);
422 Vmath::Vadd(nqtot, &tmp2[0], 1, &tmp5[0], 1, &tmp2[0], 1);
456 m_base[2]->GetBasisKey());
462 2,
m_base[0]->GetPointsKey());
464 2,
m_base[1]->GetPointsKey());
466 2,
m_base[2]->GetPointsKey());
481 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 &&
482 Lcoords[1] <= -1.0 && Lcoords[1] >= 1.0 &&
483 Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
484 "Local coordinates are not in region [-1,1]");
488 for(i = 0; i <
m_geom->GetCoordim(); ++i)
490 coords[i] =
m_geom->GetCoord(i,Lcoords);
512 return StdPrismExp::v_PhysEvaluate(Lcoord,physvals);
522 m_geom->GetLocCoords(coord, Lcoord);
524 return StdPrismExp::v_PhysEvaluate(Lcoord, physvals);
534 return m_geom->GetCoordim();
539 const std::vector<unsigned int >& nummodes,
540 const int mode_offset,
542 std::vector<LibUtilities::BasisType> &fromType)
544 boost::ignore_unused(fromType);
546 int data_order0 = nummodes[mode_offset];
547 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
548 int data_order1 = nummodes[mode_offset+1];
549 int order1 =
m_base[1]->GetNumModes();
550 int fillorder1 = min(order1,data_order1);
551 int data_order2 = nummodes[mode_offset+2];
552 int order2 =
m_base[2]->GetNumModes();
553 int fillorder2 = min(order2,data_order2);
565 "Extraction routine not set up for this basis");
568 "Extraction routine not set up for this basis");
571 for(j = 0; j < fillorder0; ++j)
573 for(i = 0; i < fillorder1; ++i)
577 cnt += data_order2-j;
582 for(i = fillorder1; i < data_order1; ++i)
584 cnt += data_order2-j;
587 for(i = fillorder1; i < order1; ++i)
595 ASSERTL0(
false,
"basis is either not set up or not " 603 int nquad0 =
m_base[0]->GetNumPoints();
604 int nquad1 =
m_base[1]->GetNumPoints();
605 int nquad2 =
m_base[2]->GetNumPoints();
614 if(outarray.num_elements()!=nq0*nq1)
620 for(
int i = 0; i < nquad0*nquad1; ++i)
629 if(outarray.num_elements()!=nq0*nq1)
635 for (
int k=0; k<nquad2; k++)
637 for(
int i = 0; i < nquad0; ++i)
639 outarray[k*nquad0+i] = (nquad0*nquad1*k)+i;
648 if(outarray.num_elements()!=nq0*nq1)
654 for(
int j = 0; j < nquad1*nquad2; ++j)
656 outarray[j] = nquad0-1 + j*nquad0;
663 if(outarray.num_elements()!=nq0*nq1)
669 for (
int k=0; k<nquad2; k++)
671 for(
int i = 0; i < nquad0; ++i)
673 outarray[k*nquad0+i] = nquad0*(nquad1-1) + (nquad0*nquad1*k)+i;
681 if(outarray.num_elements()!=nq0*nq1)
687 for(
int j = 0; j < nquad1*nquad2; ++j)
689 outarray[j] = j*nquad0;
694 ASSERTL0(
false,
"face value (> 4) is out of range");
710 for(
int i = 0; i < ptsKeys.size(); ++i)
724 int nq0 = ptsKeys[0].GetNumPoints();
725 int nq1 = ptsKeys[1].GetNumPoints();
726 int nq2 = ptsKeys[2].GetNumPoints();
742 for (i = 0; i < vCoordDim; ++i)
757 for(i = 0; i < vCoordDim; ++i)
759 normal[i][0] = -df[3*i+2][0];;
765 for(i = 0; i < vCoordDim; ++i)
767 normal[i][0] = -df[3*i+1][0];
773 for(i = 0; i < vCoordDim; ++i)
775 normal[i][0] = df[3*i][0]+df[3*i+2][0];
781 for(i = 0; i < vCoordDim; ++i)
783 normal[i][0] = df[3*i+1][0];
789 for(i = 0; i < vCoordDim; ++i)
791 normal[i][0] = -df[3*i][0];
796 ASSERTL0(
false,
"face is out of range (face < 4)");
801 for(i = 0; i < vCoordDim; ++i)
803 fac += normal[i][0]*normal[i][0];
806 for (i = 0; i < vCoordDim; ++i)
821 else if (face == 1 || face == 3)
843 for(j = 0; j < nq01; ++j)
845 normals[j] = -df[2][j]*jac[j];
846 normals[nqtot+j] = -df[5][j]*jac[j];
847 normals[2*nqtot+j] = -df[8][j]*jac[j];
851 points0 = ptsKeys[0];
852 points1 = ptsKeys[1];
858 for (j = 0; j < nq0; ++j)
860 for(k = 0; k < nq2; ++k)
864 -df[1][tmp]*jac[tmp];
865 normals[nqtot+j+k*nq0] =
866 -df[4][tmp]*jac[tmp];
867 normals[2*nqtot+j+k*nq0] =
868 -df[7][tmp]*jac[tmp];
869 faceJac[j+k*nq0] = jac[tmp];
873 points0 = ptsKeys[0];
874 points1 = ptsKeys[2];
880 for (j = 0; j < nq1; ++j)
882 for(k = 0; k < nq2; ++k)
884 int tmp = nq0-1+nq0*j+nq01*k;
886 (df[0][tmp]+df[2][tmp])*jac[tmp];
887 normals[nqtot+j+k*nq1] =
888 (df[3][tmp]+df[5][tmp])*jac[tmp];
889 normals[2*nqtot+j+k*nq1] =
890 (df[6][tmp]+df[8][tmp])*jac[tmp];
891 faceJac[j+k*nq1] = jac[tmp];
895 points0 = ptsKeys[1];
896 points1 = ptsKeys[2];
902 for (j = 0; j < nq0; ++j)
904 for(k = 0; k < nq2; ++k)
906 int tmp = nq0*(nq1-1) + j + nq01*k;
909 normals[nqtot+j+k*nq0] =
911 normals[2*nqtot+j+k*nq0] =
913 faceJac[j+k*nq0] = jac[tmp];
917 points0 = ptsKeys[0];
918 points1 = ptsKeys[2];
924 for (j = 0; j < nq1; ++j)
926 for(k = 0; k < nq2; ++k)
928 int tmp = j*nq0+nq01*k;
930 -df[0][tmp]*jac[tmp];
931 normals[nqtot+j+k*nq1] =
932 -df[3][tmp]*jac[tmp];
933 normals[2*nqtot+j+k*nq1] =
934 -df[6][tmp]*jac[tmp];
935 faceJac[j+k*nq1] = jac[tmp];
939 points0 = ptsKeys[1];
940 points1 = ptsKeys[2];
945 ASSERTL0(
false,
"face is out of range (face < 4)");
955 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
958 for(i = 0; i < vCoordDim; ++i)
965 Vmath::Vmul(nq_face,work,1,normal[i],1,normal[i],1);
972 Vmath::Vvtvp(nq_face,normal[i],1,normal[i],1,work,1,work,1);
980 Vmath::Vmul(nq_face,normal[i],1,work,1,normal[i],1);
990 StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
1008 StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,mkey);
1026 if(inarray.get() == outarray.get())
1032 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1037 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1064 StdPrismExp::v_SVVLaplacianFilter( array, mkey);
1091 returnval = StdPrismExp::v_GenMatrix(mkey);
1106 return tmp->GetStdMatrix(mkey);
1130 "Geometric information is not set up");
1215 int rows = deriv0.GetRows();
1216 int cols = deriv1.GetColumns();
1221 (*WeakDeriv) = df[3*dir ][0]*deriv0
1222 + df[3*dir+1][0]*deriv1
1223 + df[3*dir+2][0]*deriv2;
1268 int rows = lap00.GetRows();
1269 int cols = lap00.GetColumns();
1274 (*lap) = gmat[0][0]*lap00
1279 + gmat[7][0]*(lap12 +
Transpose(lap12));
1297 int rows = LapMat.GetRows();
1298 int cols = LapMat.GetColumns();
1303 (*helm) = LapMat + factor*MassMat;
1423 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1424 unsigned int exp_size[] = {nbdry, nint};
1425 unsigned int nblks=2;
1435 goto UseLocRegionsMatrix;
1441 goto UseLocRegionsMatrix;
1446 factor = mat->Scale();
1447 goto UseStdRegionsMatrix;
1450 UseStdRegionsMatrix:
1465 UseLocRegionsMatrix:
1481 for(i = 0; i < nbdry; ++i)
1483 for(j = 0; j < nbdry; ++j)
1485 (*A)(i,j) = mat(bmap[i],bmap[j]);
1488 for(j = 0; j < nint; ++j)
1490 (*B)(i,j) = mat(bmap[i],imap[j]);
1494 for(i = 0; i < nint; ++i)
1496 for(j = 0; j < nbdry; ++j)
1498 (*C)(i,j) = mat(imap[i],bmap[j]);
1501 for(j = 0; j < nint; ++j)
1503 (*D)(i,j) = mat(imap[i],imap[j]);
1512 (*A) = (*A) - (*B)*(*C);
1552 int nquad0 =
m_base[0]->GetNumPoints();
1553 int nquad1 =
m_base[1]->GetNumPoints();
1554 int nquad2 =
m_base[2]->GetNumPoints();
1555 int nqtot = nquad0*nquad1*nquad2;
1589 StdExpansion3D::PhysTensorDeriv(inarray,wsp1,wsp2,wsp3);
1598 for (i = 0; i < nquad2; ++i)
1600 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h0[0]+i*nquad0*nquad1,1);
1601 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h1[0]+i*nquad0*nquad1,1);
1603 for (i = 0; i < nquad0; i++)
1605 Blas::Dscal(nquad1*nquad2, 0.5*(1+z0[i]), &h1[0]+i, nquad0);
1614 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &df[2][0], 1, &h1[0], 1, &wsp4[0], 1);
1616 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &df[5][0], 1, &h1[0], 1, &wsp5[0], 1);
1618 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &df[8][0], 1, &h1[0], 1, &wsp6[0], 1);
1621 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1622 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1625 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &wsp4[0], 1, &df[4][0], 1, &wsp5[0], 1, &g3[0], 1);
1626 Vmath::Vvtvp (nqtot, &df[7][0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1629 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0], 1, &g4[0], 1);
1630 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1634 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[1][0], 1, &df[4][0], 1, &df[4][0], 1, &g1[0], 1);
1635 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[7][0], 1, &g1[0], 1, &g1[0], 1);
1638 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1, &df[5][0], 1, &g2[0], 1);
1639 Vmath::Vvtvp (nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1642 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[2][0], 1, &df[4][0], 1, &df[5][0], 1, &g5[0], 1);
1643 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[8][0], 1, &g5[0], 1, &g5[0], 1);
1648 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[2][0], &h1[0], 1, &wsp4[0], 1);
1650 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[5][0], &h1[0], 1, &wsp5[0], 1);
1652 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[8][0], &h1[0], 1, &wsp6[0], 1);
1655 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1656 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1659 Vmath::Svtsvtp(nqtot, df[1][0], &wsp4[0], 1, df[4][0], &wsp5[0], 1, &g3[0], 1);
1660 Vmath::Svtvp (nqtot, df[7][0], &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1663 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1, &g4[0], 1);
1664 Vmath::Svtvp (nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1668 Vmath::Fill(nqtot, df[1][0]*df[1][0] + df[4][0]*df[4][0] + df[7][0]*df[7][0], &g1[0], 1);
1671 Vmath::Fill(nqtot, df[2][0]*df[2][0] + df[5][0]*df[5][0] + df[8][0]*df[8][0], &g2[0], 1);
1674 Vmath::Fill(nqtot, df[1][0]*df[2][0] + df[4][0]*df[5][0] + df[7][0]*df[8][0], &g5[0], 1);
1678 Vmath::Vvtvvtp(nqtot,&g0[0],1,&wsp1[0],1,&g3[0],1,&wsp2[0],1,&wsp7[0],1);
1679 Vmath::Vvtvp (nqtot,&g4[0],1,&wsp3[0],1,&wsp7[0],1,&wsp7[0],1);
1680 Vmath::Vvtvvtp(nqtot,&g1[0],1,&wsp2[0],1,&g3[0],1,&wsp1[0],1,&wsp8[0],1);
1681 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp3[0],1,&wsp8[0],1,&wsp8[0],1);
1682 Vmath::Vvtvvtp(nqtot,&g2[0],1,&wsp3[0],1,&g4[0],1,&wsp1[0],1,&wsp9[0],1);
1683 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp2[0],1,&wsp9[0],1,&wsp9[0],1);
1707 boost::ignore_unused(oldstandard);
1709 int np0 =
m_base[0]->GetNumPoints();
1710 int np1 =
m_base[1]->GetNumPoints();
1711 int np2 =
m_base[2]->GetNumPoints();
1712 int np = max(np0,max(np1,np2));
1714 bool standard =
true;
1716 int vid0 =
m_geom->GetVid(0);
1717 int vid1 =
m_geom->GetVid(1);
1718 int vid2 =
m_geom->GetVid(4);
1722 if((vid2 < vid1)&&(vid2 < vid0))
1730 else if((vid1 < vid2)&&(vid1 < vid0))
1738 else if ((vid0 < vid2)&&(vid0 < vid1))
1760 rot[0] = (0+rotate)%3;
1761 rot[1] = (1+rotate)%3;
1762 rot[2] = (2+rotate)%3;
1765 for(
int i = 0; i < np-1; ++i)
1767 planep1 += (np-i)*np;
1772 if(standard ==
false)
1774 for(
int j = 0; j < np-1; ++j)
1778 for(
int k = 0; k < np-i-2; ++k)
1781 prismpt[rot[0]] = plane + row + k;
1782 prismpt[rot[1]] = plane + row + k+1;
1783 prismpt[rot[2]] = planep1 + row1 + k;
1785 prismpt[3+rot[0]] = plane + rowp1 + k;
1786 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1787 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1789 conn[cnt++] = prismpt[0];
1790 conn[cnt++] = prismpt[1];
1791 conn[cnt++] = prismpt[3];
1792 conn[cnt++] = prismpt[2];
1794 conn[cnt++] = prismpt[5];
1795 conn[cnt++] = prismpt[2];
1796 conn[cnt++] = prismpt[3];
1797 conn[cnt++] = prismpt[4];
1799 conn[cnt++] = prismpt[3];
1800 conn[cnt++] = prismpt[1];
1801 conn[cnt++] = prismpt[4];
1802 conn[cnt++] = prismpt[2];
1805 prismpt[rot[0]] = planep1 + row1 + k+1;
1806 prismpt[rot[1]] = planep1 + row1 + k;
1807 prismpt[rot[2]] = plane + row + k+1;
1809 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1810 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1811 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1814 conn[cnt++] = prismpt[0];
1815 conn[cnt++] = prismpt[1];
1816 conn[cnt++] = prismpt[2];
1817 conn[cnt++] = prismpt[5];
1819 conn[cnt++] = prismpt[5];
1820 conn[cnt++] = prismpt[0];
1821 conn[cnt++] = prismpt[4];
1822 conn[cnt++] = prismpt[1];
1824 conn[cnt++] = prismpt[3];
1825 conn[cnt++] = prismpt[4];
1826 conn[cnt++] = prismpt[0];
1827 conn[cnt++] = prismpt[5];
1832 prismpt[rot[0]] = plane + row + np-i-2;
1833 prismpt[rot[1]] = plane + row + np-i-1;
1834 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1836 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1837 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1838 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1840 conn[cnt++] = prismpt[0];
1841 conn[cnt++] = prismpt[1];
1842 conn[cnt++] = prismpt[3];
1843 conn[cnt++] = prismpt[2];
1845 conn[cnt++] = prismpt[5];
1846 conn[cnt++] = prismpt[2];
1847 conn[cnt++] = prismpt[3];
1848 conn[cnt++] = prismpt[4];
1850 conn[cnt++] = prismpt[3];
1851 conn[cnt++] = prismpt[1];
1852 conn[cnt++] = prismpt[4];
1853 conn[cnt++] = prismpt[2];
1862 for(
int j = 0; j < np-1; ++j)
1866 for(
int k = 0; k < np-i-2; ++k)
1869 prismpt[rot[0]] = plane + row + k;
1870 prismpt[rot[1]] = plane + row + k+1;
1871 prismpt[rot[2]] = planep1 + row1 + k;
1873 prismpt[3+rot[0]] = plane + rowp1 + k;
1874 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1875 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1877 conn[cnt++] = prismpt[0];
1878 conn[cnt++] = prismpt[1];
1879 conn[cnt++] = prismpt[4];
1880 conn[cnt++] = prismpt[2];
1882 conn[cnt++] = prismpt[4];
1883 conn[cnt++] = prismpt[3];
1884 conn[cnt++] = prismpt[0];
1885 conn[cnt++] = prismpt[2];
1887 conn[cnt++] = prismpt[3];
1888 conn[cnt++] = prismpt[4];
1889 conn[cnt++] = prismpt[5];
1890 conn[cnt++] = prismpt[2];
1893 prismpt[rot[0]] = planep1 + row1 + k+1;
1894 prismpt[rot[1]] = planep1 + row1 + k;
1895 prismpt[rot[2]] = plane + row + k+1;
1897 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1898 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1899 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1901 conn[cnt++] = prismpt[0];
1902 conn[cnt++] = prismpt[2];
1903 conn[cnt++] = prismpt[1];
1904 conn[cnt++] = prismpt[5];
1906 conn[cnt++] = prismpt[3];
1907 conn[cnt++] = prismpt[5];
1908 conn[cnt++] = prismpt[0];
1909 conn[cnt++] = prismpt[1];
1911 conn[cnt++] = prismpt[5];
1912 conn[cnt++] = prismpt[3];
1913 conn[cnt++] = prismpt[4];
1914 conn[cnt++] = prismpt[1];
1918 prismpt[rot[0]] = plane + row + np-i-2;
1919 prismpt[rot[1]] = plane + row + np-i-1;
1920 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1922 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1923 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1924 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1926 conn[cnt++] = prismpt[0];
1927 conn[cnt++] = prismpt[1];
1928 conn[cnt++] = prismpt[4];
1929 conn[cnt++] = prismpt[2];
1931 conn[cnt++] = prismpt[4];
1932 conn[cnt++] = prismpt[3];
1933 conn[cnt++] = prismpt[0];
1934 conn[cnt++] = prismpt[2];
1936 conn[cnt++] = prismpt[3];
1937 conn[cnt++] = prismpt[4];
1938 conn[cnt++] = prismpt[5];
1939 conn[cnt++] = prismpt[2];
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
int GetNumPoints() const
Return points order at which basis is defined.
const VarCoeffMap & GetVarCoeffs() const
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
#define ASSERTL0(condition, msg)
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 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 .
std::vector< PointsKey > PointsKeyVector
DNekMatSharedPtr BuildTransformationMatrix(const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int NumBndryCoeffs(void) const
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...
SpatialDomains::GeometrySharedPtr GetGeom() const
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
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
Principle Modified Functions .
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/y.
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
std::shared_ptr< DNekMat > DNekMatSharedPtr
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.
SpatialDomains::GeometrySharedPtr m_geom
MatrixType GetMatrixType() const
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
PointsKey GetPointsKey() const
Return distribution of points.
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_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...
std::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
virtual void v_GetFacePhysMap(const int face, Array< OneD, int > &outarray)
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
const LibUtilities::PointsKeyVector GetPointsKeys() const
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...
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over prismatic region and return the value.
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
DNekBlkMatSharedPtr GetStdStaticCondMatrix(const StdMatrixKey &mkey)
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
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_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.
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
int getNumberOfCoefficients(int Na)
Principle Modified Functions .
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
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 void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
void v_ComputeFaceNormal(const int face)
Get the normals along specficied face Get the face normals interplated to a points0 x points 0 type d...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
std::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
Defines a specification for a set of points.
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].
std::map< int, NormalVector > m_faceNormals
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
NekDouble GetConstFactor(const ConstFactorType &factor) const
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
virtual int v_GetCoordim()
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
const ConstFactorMap & GetConstFactors() const
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
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):
bool ConstFactorExists(const ConstFactorType &factor) const
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Geometry is straight-sided with constant geometric factors.
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
const LibUtilities::BasisKey DetFaceBasisKey(const int i, const int k) const
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.
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
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):
StdExpansion()
Default Constructor.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
std::shared_ptr< PrismGeom > PrismGeomSharedPtr
GeomType
Indicates the type of element geometry.
void Zero(int n, T *x, const int incx)
Zero vector.
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Array< OneD, LibUtilities::BasisSharedPtr > m_base
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 Vcopy(int n, const T *x, const int incx, T *y, const int incy)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Geometry is curved or has non-constant factors.
LibUtilities::ShapeType GetShapeType() const
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Describes the specification for a Basis.
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 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.