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());
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 int data_order0 = nummodes[mode_offset];
545 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
546 int data_order1 = nummodes[mode_offset+1];
547 int order1 =
m_base[1]->GetNumModes();
548 int fillorder1 = min(order1,data_order1);
549 int data_order2 = nummodes[mode_offset+2];
550 int order2 =
m_base[2]->GetNumModes();
551 int fillorder2 = min(order2,data_order2);
563 "Extraction routine not set up for this basis");
566 "Extraction routine not set up for this basis");
569 for(j = 0; j < fillorder0; ++j)
571 for(i = 0; i < fillorder1; ++i)
575 cnt += data_order2-j;
580 for(i = fillorder1; i < data_order1; ++i)
582 cnt += data_order2-j;
585 for(i = fillorder1; i < order1; ++i)
593 ASSERTL0(
false,
"basis is either not set up or not "
601 int nquad0 =
m_base[0]->GetNumPoints();
602 int nquad1 =
m_base[1]->GetNumPoints();
603 int nquad2 =
m_base[2]->GetNumPoints();
612 if(outarray.num_elements()!=nq0*nq1)
618 for(
int i = 0; i < nquad0*nquad1; ++i)
627 if(outarray.num_elements()!=nq0*nq1)
633 for (
int k=0; k<nquad2; k++)
635 for(
int i = 0; i < nquad0; ++i)
637 outarray[k*nquad0+i] = (nquad0*nquad1*k)+i;
646 if(outarray.num_elements()!=nq0*nq1)
652 for(
int j = 0; j < nquad1*nquad2; ++j)
654 outarray[j] = nquad0-1 + j*nquad0;
661 if(outarray.num_elements()!=nq0*nq1)
667 for (
int k=0; k<nquad2; k++)
669 for(
int i = 0; i < nquad0; ++i)
671 outarray[k*nquad0+i] = nquad0*(nquad1-1) + (nquad0*nquad1*k)+i;
679 if(outarray.num_elements()!=nq0*nq1)
685 for(
int j = 0; j < nquad1*nquad2; ++j)
687 outarray[j] = j*nquad0;
692 ASSERTL0(
false,
"face value (> 4) is out of range");
711 int nq0 = ptsKeys[0].GetNumPoints();
712 int nq1 = ptsKeys[1].GetNumPoints();
713 int nq2 = ptsKeys[2].GetNumPoints();
729 for (i = 0; i < vCoordDim; ++i)
744 for(i = 0; i < vCoordDim; ++i)
746 normal[i][0] = -df[3*i+2][0];;
752 for(i = 0; i < vCoordDim; ++i)
754 normal[i][0] = -df[3*i+1][0];
760 for(i = 0; i < vCoordDim; ++i)
762 normal[i][0] = df[3*i][0]+df[3*i+2][0];
768 for(i = 0; i < vCoordDim; ++i)
770 normal[i][0] = df[3*i+1][0];
776 for(i = 0; i < vCoordDim; ++i)
778 normal[i][0] = -df[3*i][0];
783 ASSERTL0(
false,
"face is out of range (face < 4)");
788 for(i = 0; i < vCoordDim; ++i)
790 fac += normal[i][0]*normal[i][0];
793 for (i = 0; i < vCoordDim; ++i)
808 else if (face == 1 || face == 3)
830 for(j = 0; j < nq01; ++j)
832 normals[j] = -df[2][j]*jac[j];
833 normals[nqtot+j] = -df[5][j]*jac[j];
834 normals[2*nqtot+j] = -df[8][j]*jac[j];
838 points0 = ptsKeys[0];
839 points1 = ptsKeys[1];
845 for (j = 0; j < nq0; ++j)
847 for(k = 0; k < nq2; ++k)
851 -df[1][tmp]*jac[tmp];
852 normals[nqtot+j+k*nq0] =
853 -df[4][tmp]*jac[tmp];
854 normals[2*nqtot+j+k*nq0] =
855 -df[7][tmp]*jac[tmp];
856 faceJac[j+k*nq0] = jac[tmp];
860 points0 = ptsKeys[0];
861 points1 = ptsKeys[2];
867 for (j = 0; j < nq1; ++j)
869 for(k = 0; k < nq2; ++k)
871 int tmp = nq0-1+nq0*j+nq01*k;
873 (df[0][tmp]+df[2][tmp])*jac[tmp];
874 normals[nqtot+j+k*nq1] =
875 (df[3][tmp]+df[5][tmp])*jac[tmp];
876 normals[2*nqtot+j+k*nq1] =
877 (df[6][tmp]+df[8][tmp])*jac[tmp];
878 faceJac[j+k*nq1] = jac[tmp];
882 points0 = ptsKeys[1];
883 points1 = ptsKeys[2];
889 for (j = 0; j < nq0; ++j)
891 for(k = 0; k < nq2; ++k)
893 int tmp = nq0*(nq1-1) + j + nq01*k;
896 normals[nqtot+j+k*nq0] =
898 normals[2*nqtot+j+k*nq0] =
900 faceJac[j+k*nq0] = jac[tmp];
904 points0 = ptsKeys[0];
905 points1 = ptsKeys[2];
911 for (j = 0; j < nq1; ++j)
913 for(k = 0; k < nq2; ++k)
915 int tmp = j*nq0+nq01*k;
917 -df[0][tmp]*jac[tmp];
918 normals[nqtot+j+k*nq1] =
919 -df[3][tmp]*jac[tmp];
920 normals[2*nqtot+j+k*nq1] =
921 -df[6][tmp]*jac[tmp];
922 faceJac[j+k*nq1] = jac[tmp];
926 points0 = ptsKeys[1];
927 points1 = ptsKeys[2];
932 ASSERTL0(
false,
"face is out of range (face < 4)");
942 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
945 for(i = 0; i < vCoordDim; ++i)
952 Vmath::Vmul(nq_face,work,1,normal[i],1,normal[i],1);
959 Vmath::Vvtvp(nq_face,normal[i],1,normal[i],1,work,1,work,1);
967 Vmath::Vmul(nq_face,normal[i],1,work,1,normal[i],1);
977 StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
995 StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,mkey);
1013 if(inarray.get() == outarray.get())
1018 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1019 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1023 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1024 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1051 StdPrismExp::v_SVVLaplacianFilter( array, mkey);
1078 returnval = StdPrismExp::v_GenMatrix(mkey);
1093 return tmp->GetStdMatrix(mkey);
1117 "Geometric information is not set up");
1202 int rows = deriv0.GetRows();
1203 int cols = deriv1.GetColumns();
1208 (*WeakDeriv) = df[3*dir ][0]*deriv0
1209 + df[3*dir+1][0]*deriv1
1210 + df[3*dir+2][0]*deriv2;
1255 int rows = lap00.GetRows();
1256 int cols = lap00.GetColumns();
1261 (*lap) = gmat[0][0]*lap00
1266 + gmat[7][0]*(lap12 +
Transpose(lap12));
1284 int rows = LapMat.GetRows();
1285 int cols = LapMat.GetColumns();
1290 (*helm) = LapMat + factor*MassMat;
1436 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1437 unsigned int exp_size[] = {nbdry, nint};
1438 unsigned int nblks=2;
1448 goto UseLocRegionsMatrix;
1454 goto UseLocRegionsMatrix;
1459 factor = mat->Scale();
1460 goto UseStdRegionsMatrix;
1463 UseStdRegionsMatrix:
1478 UseLocRegionsMatrix:
1494 for(i = 0; i < nbdry; ++i)
1496 for(j = 0; j < nbdry; ++j)
1498 (*A)(i,j) = mat(bmap[i],bmap[j]);
1501 for(j = 0; j < nint; ++j)
1503 (*B)(i,j) = mat(bmap[i],imap[j]);
1507 for(i = 0; i < nint; ++i)
1509 for(j = 0; j < nbdry; ++j)
1511 (*C)(i,j) = mat(imap[i],bmap[j]);
1514 for(j = 0; j < nint; ++j)
1516 (*D)(i,j) = mat(imap[i],imap[j]);
1525 (*A) = (*A) - (*B)*(*C);
1565 int nquad0 =
m_base[0]->GetNumPoints();
1566 int nquad1 =
m_base[1]->GetNumPoints();
1567 int nquad2 =
m_base[2]->GetNumPoints();
1568 int nqtot = nquad0*nquad1*nquad2;
1602 StdExpansion3D::PhysTensorDeriv(inarray,wsp1,wsp2,wsp3);
1611 for (i = 0; i < nquad2; ++i)
1613 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h0[0]+i*nquad0*nquad1,1);
1614 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h1[0]+i*nquad0*nquad1,1);
1616 for (i = 0; i < nquad0; i++)
1618 Blas::Dscal(nquad1*nquad2, 0.5*(1+z0[i]), &h1[0]+i, nquad0);
1627 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &df[2][0], 1, &h1[0], 1, &wsp4[0], 1);
1629 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &df[5][0], 1, &h1[0], 1, &wsp5[0], 1);
1631 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &df[8][0], 1, &h1[0], 1, &wsp6[0], 1);
1634 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1635 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1638 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &wsp4[0], 1, &df[4][0], 1, &wsp5[0], 1, &g3[0], 1);
1639 Vmath::Vvtvp (nqtot, &df[7][0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1642 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0], 1, &g4[0], 1);
1643 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1647 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[1][0], 1, &df[4][0], 1, &df[4][0], 1, &g1[0], 1);
1648 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[7][0], 1, &g1[0], 1, &g1[0], 1);
1651 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1, &df[5][0], 1, &g2[0], 1);
1652 Vmath::Vvtvp (nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1655 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[2][0], 1, &df[4][0], 1, &df[5][0], 1, &g5[0], 1);
1656 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[8][0], 1, &g5[0], 1, &g5[0], 1);
1661 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[2][0], &h1[0], 1, &wsp4[0], 1);
1663 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[5][0], &h1[0], 1, &wsp5[0], 1);
1665 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[8][0], &h1[0], 1, &wsp6[0], 1);
1668 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1669 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1672 Vmath::Svtsvtp(nqtot, df[1][0], &wsp4[0], 1, df[4][0], &wsp5[0], 1, &g3[0], 1);
1673 Vmath::Svtvp (nqtot, df[7][0], &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1676 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1, &g4[0], 1);
1677 Vmath::Svtvp (nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1681 Vmath::Fill(nqtot, df[1][0]*df[1][0] + df[4][0]*df[4][0] + df[7][0]*df[7][0], &g1[0], 1);
1684 Vmath::Fill(nqtot, df[2][0]*df[2][0] + df[5][0]*df[5][0] + df[8][0]*df[8][0], &g2[0], 1);
1687 Vmath::Fill(nqtot, df[1][0]*df[2][0] + df[4][0]*df[5][0] + df[7][0]*df[8][0], &g5[0], 1);
1691 Vmath::Vvtvvtp(nqtot,&g0[0],1,&wsp1[0],1,&g3[0],1,&wsp2[0],1,&wsp7[0],1);
1692 Vmath::Vvtvp (nqtot,&g4[0],1,&wsp3[0],1,&wsp7[0],1,&wsp7[0],1);
1693 Vmath::Vvtvvtp(nqtot,&g1[0],1,&wsp2[0],1,&g3[0],1,&wsp1[0],1,&wsp8[0],1);
1694 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp3[0],1,&wsp8[0],1,&wsp8[0],1);
1695 Vmath::Vvtvvtp(nqtot,&g2[0],1,&wsp3[0],1,&g4[0],1,&wsp1[0],1,&wsp9[0],1);
1696 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp2[0],1,&wsp9[0],1,&wsp9[0],1);
1720 int np0 =
m_base[0]->GetNumPoints();
1721 int np1 =
m_base[1]->GetNumPoints();
1722 int np2 =
m_base[2]->GetNumPoints();
1723 int np = max(np0,max(np1,np2));
1725 bool standard =
true;
1727 int vid0 =
m_geom->GetVid(0);
1728 int vid1 =
m_geom->GetVid(1);
1729 int vid2 =
m_geom->GetVid(4);
1733 if((vid2 < vid1)&&(vid2 < vid0))
1741 else if((vid1 < vid2)&&(vid1 < vid0))
1749 else if ((vid0 < vid2)&&(vid0 < vid1))
1771 rot[0] = (0+rotate)%3;
1772 rot[1] = (1+rotate)%3;
1773 rot[2] = (2+rotate)%3;
1776 for(
int i = 0; i < np-1; ++i)
1778 planep1 += (np-i)*np;
1783 if(standard ==
false)
1785 for(
int j = 0; j < np-1; ++j)
1789 for(
int k = 0; k < np-i-2; ++k)
1792 prismpt[rot[0]] = plane + row + k;
1793 prismpt[rot[1]] = plane + row + k+1;
1794 prismpt[rot[2]] = planep1 + row1 + k;
1796 prismpt[3+rot[0]] = plane + rowp1 + k;
1797 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1798 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1800 conn[cnt++] = prismpt[0];
1801 conn[cnt++] = prismpt[1];
1802 conn[cnt++] = prismpt[3];
1803 conn[cnt++] = prismpt[2];
1805 conn[cnt++] = prismpt[5];
1806 conn[cnt++] = prismpt[2];
1807 conn[cnt++] = prismpt[3];
1808 conn[cnt++] = prismpt[4];
1810 conn[cnt++] = prismpt[3];
1811 conn[cnt++] = prismpt[1];
1812 conn[cnt++] = prismpt[4];
1813 conn[cnt++] = prismpt[2];
1816 prismpt[rot[0]] = planep1 + row1 + k+1;
1817 prismpt[rot[1]] = planep1 + row1 + k;
1818 prismpt[rot[2]] = plane + row + k+1;
1820 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1821 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1822 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1825 conn[cnt++] = prismpt[0];
1826 conn[cnt++] = prismpt[1];
1827 conn[cnt++] = prismpt[2];
1828 conn[cnt++] = prismpt[5];
1830 conn[cnt++] = prismpt[5];
1831 conn[cnt++] = prismpt[0];
1832 conn[cnt++] = prismpt[4];
1833 conn[cnt++] = prismpt[1];
1835 conn[cnt++] = prismpt[3];
1836 conn[cnt++] = prismpt[4];
1837 conn[cnt++] = prismpt[0];
1838 conn[cnt++] = prismpt[5];
1843 prismpt[rot[0]] = plane + row + np-i-2;
1844 prismpt[rot[1]] = plane + row + np-i-1;
1845 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1847 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1848 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1849 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1851 conn[cnt++] = prismpt[0];
1852 conn[cnt++] = prismpt[1];
1853 conn[cnt++] = prismpt[3];
1854 conn[cnt++] = prismpt[2];
1856 conn[cnt++] = prismpt[5];
1857 conn[cnt++] = prismpt[2];
1858 conn[cnt++] = prismpt[3];
1859 conn[cnt++] = prismpt[4];
1861 conn[cnt++] = prismpt[3];
1862 conn[cnt++] = prismpt[1];
1863 conn[cnt++] = prismpt[4];
1864 conn[cnt++] = prismpt[2];
1873 for(
int j = 0; j < np-1; ++j)
1877 for(
int k = 0; k < np-i-2; ++k)
1880 prismpt[rot[0]] = plane + row + k;
1881 prismpt[rot[1]] = plane + row + k+1;
1882 prismpt[rot[2]] = planep1 + row1 + k;
1884 prismpt[3+rot[0]] = plane + rowp1 + k;
1885 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1886 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1888 conn[cnt++] = prismpt[0];
1889 conn[cnt++] = prismpt[1];
1890 conn[cnt++] = prismpt[4];
1891 conn[cnt++] = prismpt[2];
1893 conn[cnt++] = prismpt[4];
1894 conn[cnt++] = prismpt[3];
1895 conn[cnt++] = prismpt[0];
1896 conn[cnt++] = prismpt[2];
1898 conn[cnt++] = prismpt[3];
1899 conn[cnt++] = prismpt[4];
1900 conn[cnt++] = prismpt[5];
1901 conn[cnt++] = prismpt[2];
1904 prismpt[rot[0]] = planep1 + row1 + k+1;
1905 prismpt[rot[1]] = planep1 + row1 + k;
1906 prismpt[rot[2]] = plane + row + k+1;
1908 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1909 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1910 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1912 conn[cnt++] = prismpt[0];
1913 conn[cnt++] = prismpt[2];
1914 conn[cnt++] = prismpt[1];
1915 conn[cnt++] = prismpt[5];
1917 conn[cnt++] = prismpt[3];
1918 conn[cnt++] = prismpt[5];
1919 conn[cnt++] = prismpt[0];
1920 conn[cnt++] = prismpt[1];
1922 conn[cnt++] = prismpt[5];
1923 conn[cnt++] = prismpt[3];
1924 conn[cnt++] = prismpt[4];
1925 conn[cnt++] = prismpt[1];
1929 prismpt[rot[0]] = plane + row + np-i-2;
1930 prismpt[rot[1]] = plane + row + np-i-1;
1931 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1933 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1934 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1935 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1937 conn[cnt++] = prismpt[0];
1938 conn[cnt++] = prismpt[1];
1939 conn[cnt++] = prismpt[4];
1940 conn[cnt++] = prismpt[2];
1942 conn[cnt++] = prismpt[4];
1943 conn[cnt++] = prismpt[3];
1944 conn[cnt++] = prismpt[0];
1945 conn[cnt++] = prismpt[2];
1947 conn[cnt++] = prismpt[3];
1948 conn[cnt++] = prismpt[4];
1949 conn[cnt++] = prismpt[5];
1950 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.
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)
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.
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
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.
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.