46 namespace LocalRegions
54 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
57 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
59 StdPrismExp (Ba, Bb, Bc),
63 boost::bind(&
PrismExp::CreateMatrix, this, _1),
64 std::string(
"PrismExpMatrix")),
65 m_staticCondMatrixManager(
66 boost::bind(&
PrismExp::CreateStaticCondMatrix, this, _1),
67 std::string(
"PrismExpStaticCondMatrix"))
74 StdRegions::StdPrismExp(T),
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);
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());
468 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 &&
469 Lcoords[1] <= -1.0 && Lcoords[1] >= 1.0 &&
470 Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
471 "Local coordinates are not in region [-1,1]");
475 for(i = 0; i <
m_geom->GetCoordim(); ++i)
477 coords[i] =
m_geom->GetCoord(i,Lcoords);
499 return StdPrismExp::v_PhysEvaluate(Lcoord,physvals);
509 m_geom->GetLocCoords(coord, Lcoord);
511 return StdPrismExp::v_PhysEvaluate(Lcoord, physvals);
521 return m_geom->GetCoordim();
526 const std::vector<unsigned int >& nummodes,
527 const int mode_offset,
530 int data_order0 = nummodes[mode_offset];
531 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
532 int data_order1 = nummodes[mode_offset+1];
533 int order1 =
m_base[1]->GetNumModes();
534 int fillorder1 = min(order1,data_order1);
535 int data_order2 = nummodes[mode_offset+2];
536 int order2 =
m_base[2]->GetNumModes();
537 int fillorder2 = min(order2,data_order2);
549 "Extraction routine not set up for this basis");
552 "Extraction routine not set up for this basis");
555 for(j = 0; j < fillorder0; ++j)
557 for(i = 0; i < fillorder1; ++i)
561 cnt += data_order2-j;
566 for(i = fillorder1; i < data_order1; ++i)
568 cnt += data_order2-j;
571 for(i = fillorder1; i < order1; ++i)
579 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.num_elements()!=nq0*nq1)
604 for(
int i = 0; i < nquad0*nquad1; ++i)
613 if(outarray.num_elements()!=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.num_elements()!=nq0*nq1)
638 for(
int j = 0; j < nquad1*nquad2; ++j)
640 outarray[j] = nquad0-1 + j*nquad0;
647 if(outarray.num_elements()!=nq0*nq1)
653 for (
int k=0; k<nquad2; k++)
655 for(
int i = 0; i < nquad0; ++i)
657 outarray[k*nquad0+i] = nquad0*(nquad1-1) + (nquad0*nquad1*k)+i;
665 if(outarray.num_elements()!=nq0*nq1)
671 for(
int j = 0; j < nquad1*nquad2; ++j)
673 outarray[j] = j*nquad0;
678 ASSERTL0(
false,
"face value (> 4) is out of range");
697 int nq0 = ptsKeys[0].GetNumPoints();
698 int nq1 = ptsKeys[1].GetNumPoints();
699 int nq2 = ptsKeys[2].GetNumPoints();
715 for (i = 0; i < vCoordDim; ++i)
730 for(i = 0; i < vCoordDim; ++i)
732 normal[i][0] = -df[3*i+2][0];;
738 for(i = 0; i < vCoordDim; ++i)
740 normal[i][0] = -df[3*i+1][0];
746 for(i = 0; i < vCoordDim; ++i)
748 normal[i][0] = df[3*i][0]+df[3*i+2][0];
754 for(i = 0; i < vCoordDim; ++i)
756 normal[i][0] = df[3*i+1][0];
762 for(i = 0; i < vCoordDim; ++i)
764 normal[i][0] = -df[3*i][0];
769 ASSERTL0(
false,
"face is out of range (face < 4)");
774 for(i = 0; i < vCoordDim; ++i)
776 fac += normal[i][0]*normal[i][0];
779 for (i = 0; i < vCoordDim; ++i)
794 else if (face == 1 || face == 3)
816 for(j = 0; j < nq01; ++j)
818 normals[j] = -df[2][j]*jac[j];
819 normals[nqtot+j] = -df[5][j]*jac[j];
820 normals[2*nqtot+j] = -df[8][j]*jac[j];
824 points0 = ptsKeys[0];
825 points1 = ptsKeys[1];
831 for (j = 0; j < nq0; ++j)
833 for(k = 0; k < nq2; ++k)
837 -df[1][tmp]*jac[tmp];
838 normals[nqtot+j+k*nq0] =
839 -df[4][tmp]*jac[tmp];
840 normals[2*nqtot+j+k*nq0] =
841 -df[7][tmp]*jac[tmp];
842 faceJac[j+k*nq0] = jac[tmp];
846 points0 = ptsKeys[0];
847 points1 = ptsKeys[2];
853 for (j = 0; j < nq1; ++j)
855 for(k = 0; k < nq2; ++k)
857 int tmp = nq0-1+nq0*j+nq01*k;
859 (df[0][tmp]+df[2][tmp])*jac[tmp];
860 normals[nqtot+j+k*nq1] =
861 (df[3][tmp]+df[5][tmp])*jac[tmp];
862 normals[2*nqtot+j+k*nq1] =
863 (df[6][tmp]+df[8][tmp])*jac[tmp];
864 faceJac[j+k*nq1] = jac[tmp];
868 points0 = ptsKeys[1];
869 points1 = ptsKeys[2];
875 for (j = 0; j < nq0; ++j)
877 for(k = 0; k < nq2; ++k)
879 int tmp = nq0*(nq1-1) + j + nq01*k;
882 normals[nqtot+j+k*nq0] =
884 normals[2*nqtot+j+k*nq0] =
886 faceJac[j+k*nq0] = jac[tmp];
890 points0 = ptsKeys[0];
891 points1 = ptsKeys[2];
897 for (j = 0; j < nq1; ++j)
899 for(k = 0; k < nq2; ++k)
901 int tmp = j*nq0+nq01*k;
903 -df[0][tmp]*jac[tmp];
904 normals[nqtot+j+k*nq1] =
905 -df[3][tmp]*jac[tmp];
906 normals[2*nqtot+j+k*nq1] =
907 -df[6][tmp]*jac[tmp];
908 faceJac[j+k*nq1] = jac[tmp];
912 points0 = ptsKeys[1];
913 points1 = ptsKeys[2];
918 ASSERTL0(
false,
"face is out of range (face < 4)");
928 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
931 for(i = 0; i < vCoordDim; ++i)
938 Vmath::Vmul(nq_face,work,1,normal[i],1,normal[i],1);
945 Vmath::Vvtvp(nq_face,normal[i],1,normal[i],1,work,1,work,1);
953 Vmath::Vmul(nq_face,normal[i],1,work,1,normal[i],1);
963 StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
981 StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,mkey);
999 if(inarray.get() == outarray.get())
1004 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1005 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1009 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1010 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1037 StdPrismExp::v_SVVLaplacianFilter( array, mkey);
1064 returnval = StdPrismExp::v_GenMatrix(mkey);
1079 return tmp->GetStdMatrix(mkey);
1103 "Geometric information is not set up");
1188 int rows = deriv0.GetRows();
1189 int cols = deriv1.GetColumns();
1194 (*WeakDeriv) = df[3*dir ][0]*deriv0
1195 + df[3*dir+1][0]*deriv1
1196 + df[3*dir+2][0]*deriv2;
1241 int rows = lap00.GetRows();
1242 int cols = lap00.GetColumns();
1247 (*lap) = gmat[0][0]*lap00
1252 + gmat[7][0]*(lap12 +
Transpose(lap12));
1270 int rows = LapMat.GetRows();
1271 int cols = LapMat.GetColumns();
1276 (*helm) = LapMat + factor*MassMat;
1422 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1423 unsigned int exp_size[] = {nbdry, nint};
1424 unsigned int nblks=2;
1434 goto UseLocRegionsMatrix;
1440 goto UseLocRegionsMatrix;
1445 factor = mat->Scale();
1446 goto UseStdRegionsMatrix;
1449 UseStdRegionsMatrix:
1464 UseLocRegionsMatrix:
1480 for(i = 0; i < nbdry; ++i)
1482 for(j = 0; j < nbdry; ++j)
1484 (*A)(i,j) = mat(bmap[i],bmap[j]);
1487 for(j = 0; j < nint; ++j)
1489 (*B)(i,j) = mat(bmap[i],imap[j]);
1493 for(i = 0; i < nint; ++i)
1495 for(j = 0; j < nbdry; ++j)
1497 (*C)(i,j) = mat(imap[i],bmap[j]);
1500 for(j = 0; j < nint; ++j)
1502 (*D)(i,j) = mat(imap[i],imap[j]);
1511 (*A) = (*A) - (*B)*(*C);
1551 int nquad0 =
m_base[0]->GetNumPoints();
1552 int nquad1 =
m_base[1]->GetNumPoints();
1553 int nquad2 =
m_base[2]->GetNumPoints();
1554 int nqtot = nquad0*nquad1*nquad2;
1588 StdExpansion3D::PhysTensorDeriv(inarray,wsp1,wsp2,wsp3);
1597 for (i = 0; i < nquad2; ++i)
1599 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h0[0]+i*nquad0*nquad1,1);
1600 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h1[0]+i*nquad0*nquad1,1);
1602 for (i = 0; i < nquad0; i++)
1604 Blas::Dscal(nquad1*nquad2, 0.5*(1+z0[i]), &h1[0]+i, nquad0);
1613 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &df[2][0], 1, &h1[0], 1, &wsp4[0], 1);
1615 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &df[5][0], 1, &h1[0], 1, &wsp5[0], 1);
1617 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &df[8][0], 1, &h1[0], 1, &wsp6[0], 1);
1620 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1621 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1624 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &wsp4[0], 1, &df[4][0], 1, &wsp5[0], 1, &g3[0], 1);
1625 Vmath::Vvtvp (nqtot, &df[7][0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1628 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0], 1, &g4[0], 1);
1629 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1633 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[1][0], 1, &df[4][0], 1, &df[4][0], 1, &g1[0], 1);
1634 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[7][0], 1, &g1[0], 1, &g1[0], 1);
1637 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1, &df[5][0], 1, &g2[0], 1);
1638 Vmath::Vvtvp (nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1641 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[2][0], 1, &df[4][0], 1, &df[5][0], 1, &g5[0], 1);
1642 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[8][0], 1, &g5[0], 1, &g5[0], 1);
1647 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[2][0], &h1[0], 1, &wsp4[0], 1);
1649 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[5][0], &h1[0], 1, &wsp5[0], 1);
1651 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[8][0], &h1[0], 1, &wsp6[0], 1);
1654 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1655 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1658 Vmath::Svtsvtp(nqtot, df[1][0], &wsp4[0], 1, df[4][0], &wsp5[0], 1, &g3[0], 1);
1659 Vmath::Svtvp (nqtot, df[7][0], &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1662 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1, &g4[0], 1);
1663 Vmath::Svtvp (nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1667 Vmath::Fill(nqtot, df[1][0]*df[1][0] + df[4][0]*df[4][0] + df[7][0]*df[7][0], &g1[0], 1);
1670 Vmath::Fill(nqtot, df[2][0]*df[2][0] + df[5][0]*df[5][0] + df[8][0]*df[8][0], &g2[0], 1);
1673 Vmath::Fill(nqtot, df[1][0]*df[2][0] + df[4][0]*df[5][0] + df[7][0]*df[8][0], &g5[0], 1);
1677 Vmath::Vvtvvtp(nqtot,&g0[0],1,&wsp1[0],1,&g3[0],1,&wsp2[0],1,&wsp7[0],1);
1678 Vmath::Vvtvp (nqtot,&g4[0],1,&wsp3[0],1,&wsp7[0],1,&wsp7[0],1);
1679 Vmath::Vvtvvtp(nqtot,&g1[0],1,&wsp2[0],1,&g3[0],1,&wsp1[0],1,&wsp8[0],1);
1680 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp3[0],1,&wsp8[0],1,&wsp8[0],1);
1681 Vmath::Vvtvvtp(nqtot,&g2[0],1,&wsp3[0],1,&g4[0],1,&wsp1[0],1,&wsp9[0],1);
1682 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp2[0],1,&wsp9[0],1,&wsp9[0],1);
1706 int np0 =
m_base[0]->GetNumPoints();
1707 int np1 =
m_base[1]->GetNumPoints();
1708 int np2 =
m_base[2]->GetNumPoints();
1709 int np = max(np0,max(np1,np2));
1711 bool standard =
true;
1713 int vid0 =
m_geom->GetVid(0);
1714 int vid1 =
m_geom->GetVid(1);
1715 int vid2 =
m_geom->GetVid(4);
1719 if((vid2 < vid1)&&(vid2 < vid0))
1727 else if((vid1 < vid2)&&(vid1 < vid0))
1735 else if ((vid0 < vid2)&&(vid0 < vid1))
1757 rot[0] = (0+rotate)%3;
1758 rot[1] = (1+rotate)%3;
1759 rot[2] = (2+rotate)%3;
1762 for(
int i = 0; i < np-1; ++i)
1764 planep1 += (np-i)*np;
1769 if(standard ==
false)
1771 for(
int j = 0; j < np-1; ++j)
1775 for(
int k = 0; k < np-i-2; ++k)
1778 prismpt[rot[0]] = plane + row + k;
1779 prismpt[rot[1]] = plane + row + k+1;
1780 prismpt[rot[2]] = planep1 + row1 + k;
1782 prismpt[3+rot[0]] = plane + rowp1 + k;
1783 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1784 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1786 conn[cnt++] = prismpt[0];
1787 conn[cnt++] = prismpt[1];
1788 conn[cnt++] = prismpt[3];
1789 conn[cnt++] = prismpt[2];
1791 conn[cnt++] = prismpt[5];
1792 conn[cnt++] = prismpt[2];
1793 conn[cnt++] = prismpt[3];
1794 conn[cnt++] = prismpt[4];
1796 conn[cnt++] = prismpt[3];
1797 conn[cnt++] = prismpt[1];
1798 conn[cnt++] = prismpt[4];
1799 conn[cnt++] = prismpt[2];
1802 prismpt[rot[0]] = planep1 + row1 + k+1;
1803 prismpt[rot[1]] = planep1 + row1 + k;
1804 prismpt[rot[2]] = plane + row + k+1;
1806 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1807 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1808 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1811 conn[cnt++] = prismpt[0];
1812 conn[cnt++] = prismpt[1];
1813 conn[cnt++] = prismpt[2];
1814 conn[cnt++] = prismpt[5];
1816 conn[cnt++] = prismpt[5];
1817 conn[cnt++] = prismpt[0];
1818 conn[cnt++] = prismpt[4];
1819 conn[cnt++] = prismpt[1];
1821 conn[cnt++] = prismpt[3];
1822 conn[cnt++] = prismpt[4];
1823 conn[cnt++] = prismpt[0];
1824 conn[cnt++] = prismpt[5];
1829 prismpt[rot[0]] = plane + row + np-i-2;
1830 prismpt[rot[1]] = plane + row + np-i-1;
1831 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1833 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1834 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1835 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1837 conn[cnt++] = prismpt[0];
1838 conn[cnt++] = prismpt[1];
1839 conn[cnt++] = prismpt[3];
1840 conn[cnt++] = prismpt[2];
1842 conn[cnt++] = prismpt[5];
1843 conn[cnt++] = prismpt[2];
1844 conn[cnt++] = prismpt[3];
1845 conn[cnt++] = prismpt[4];
1847 conn[cnt++] = prismpt[3];
1848 conn[cnt++] = prismpt[1];
1849 conn[cnt++] = prismpt[4];
1850 conn[cnt++] = prismpt[2];
1859 for(
int j = 0; j < np-1; ++j)
1863 for(
int k = 0; k < np-i-2; ++k)
1866 prismpt[rot[0]] = plane + row + k;
1867 prismpt[rot[1]] = plane + row + k+1;
1868 prismpt[rot[2]] = planep1 + row1 + k;
1870 prismpt[3+rot[0]] = plane + rowp1 + k;
1871 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1872 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1874 conn[cnt++] = prismpt[0];
1875 conn[cnt++] = prismpt[1];
1876 conn[cnt++] = prismpt[4];
1877 conn[cnt++] = prismpt[2];
1879 conn[cnt++] = prismpt[4];
1880 conn[cnt++] = prismpt[3];
1881 conn[cnt++] = prismpt[0];
1882 conn[cnt++] = prismpt[2];
1884 conn[cnt++] = prismpt[3];
1885 conn[cnt++] = prismpt[4];
1886 conn[cnt++] = prismpt[5];
1887 conn[cnt++] = prismpt[2];
1890 prismpt[rot[0]] = planep1 + row1 + k+1;
1891 prismpt[rot[1]] = planep1 + row1 + k;
1892 prismpt[rot[2]] = plane + row + k+1;
1894 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1895 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1896 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1898 conn[cnt++] = prismpt[0];
1899 conn[cnt++] = prismpt[2];
1900 conn[cnt++] = prismpt[1];
1901 conn[cnt++] = prismpt[5];
1903 conn[cnt++] = prismpt[3];
1904 conn[cnt++] = prismpt[5];
1905 conn[cnt++] = prismpt[0];
1906 conn[cnt++] = prismpt[1];
1908 conn[cnt++] = prismpt[5];
1909 conn[cnt++] = prismpt[3];
1910 conn[cnt++] = prismpt[4];
1911 conn[cnt++] = prismpt[1];
1915 prismpt[rot[0]] = plane + row + np-i-2;
1916 prismpt[rot[1]] = plane + row + np-i-1;
1917 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1919 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1920 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1921 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1923 conn[cnt++] = prismpt[0];
1924 conn[cnt++] = prismpt[1];
1925 conn[cnt++] = prismpt[4];
1926 conn[cnt++] = prismpt[2];
1928 conn[cnt++] = prismpt[4];
1929 conn[cnt++] = prismpt[3];
1930 conn[cnt++] = prismpt[0];
1931 conn[cnt++] = prismpt[2];
1933 conn[cnt++] = prismpt[3];
1934 conn[cnt++] = prismpt[4];
1935 conn[cnt++] = prismpt[5];
1936 conn[cnt++] = prismpt[2];
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
const LibUtilities::PointsKeyVector GetPointsKeys() const
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
NekDouble GetConstFactor(const ConstFactorType &factor) const
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
#define ASSERTL0(condition, msg)
const ConstFactorMap & GetConstFactors() const
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
const VarCoeffMap & GetVarCoeffs() const
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)
MatrixType GetMatrixType() const
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
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...
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
boost::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
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.
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)
LibUtilities::ShapeType GetShapeType() const
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)
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
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
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...
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
virtual void v_GetFacePhysMap(const int face, Array< OneD, int > &outarray)
bool ConstFactorExists(const ConstFactorType &factor) const
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
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...
int NumBndryCoeffs(void) const
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)
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)
int GetNumPoints() const
Return points order at which basis is defined.
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
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...
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
Defines a specification for a set of points.
std::map< int, NormalVector > m_faceNormals
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
virtual int v_GetCoordim()
boost::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
PointsKey GetPointsKey() const
Return distribution of points.
SpatialDomains::GeometrySharedPtr GetGeom() const
boost::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
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):
#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.
boost::shared_ptr< PrismGeom > PrismGeomSharedPtr
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 void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs)
Unpack data from input file assuming it comes from the same expansion type.
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
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):
const LibUtilities::BasisKey DetFaceBasisKey(const int i, const int k) const
GeomType
Indicates the type of element geometry.
void Zero(int n, T *x, const int incx)
Zero vector.
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
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
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.
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) 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.