44 namespace LocalRegions
52 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
55 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
57 StdPrismExp (Ba, Bb, Bc),
61 boost::bind(&
PrismExp::CreateMatrix, this, _1),
62 std::string(
"PrismExpMatrix")),
63 m_staticCondMatrixManager(
64 boost::bind(&
PrismExp::CreateStaticCondMatrix, this, _1),
65 std::string(
"PrismExpStaticCondMatrix"))
72 StdRegions::StdPrismExp(T),
75 m_matrixManager(T.m_matrixManager),
76 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
111 int nquad0 =
m_base[0]->GetNumPoints();
112 int nquad1 =
m_base[1]->GetNumPoints();
113 int nquad2 =
m_base[2]->GetNumPoints();
128 return StdPrismExp::v_Integral(tmp);
148 StdPrismExp::v_PhysDeriv(inarray, diff0, diff1, diff2);
152 if(out_d0.num_elements())
154 Vmath::Vmul (nqtot,&df[0][0],1,&diff0[0],1,&out_d0[0],1);
155 Vmath::Vvtvp (nqtot,&df[1][0],1,&diff1[0],1,&out_d0[0],1,&out_d0[0],1);
156 Vmath::Vvtvp (nqtot,&df[2][0],1,&diff2[0],1,&out_d0[0],1,&out_d0[0],1);
159 if(out_d1.num_elements())
161 Vmath::Vmul (nqtot,&df[3][0],1,&diff0[0],1,&out_d1[0],1);
162 Vmath::Vvtvp (nqtot,&df[4][0],1,&diff1[0],1,&out_d1[0],1,&out_d1[0],1);
163 Vmath::Vvtvp (nqtot,&df[5][0],1,&diff2[0],1,&out_d1[0],1,&out_d1[0],1);
166 if(out_d2.num_elements())
168 Vmath::Vmul (nqtot,&df[6][0],1,&diff0[0],1,&out_d2[0],1);
169 Vmath::Vvtvp (nqtot,&df[7][0],1,&diff1[0],1,&out_d2[0],1,&out_d2[0],1);
170 Vmath::Vvtvp (nqtot,&df[8][0],1,&diff2[0],1,&out_d2[0],1,&out_d2[0],1);
175 if(out_d0.num_elements())
177 Vmath::Smul (nqtot,df[0][0],&diff0[0],1,&out_d0[0],1);
178 Blas::Daxpy (nqtot,df[1][0],&diff1[0],1,&out_d0[0],1);
179 Blas::Daxpy (nqtot,df[2][0],&diff2[0],1,&out_d0[0],1);
182 if(out_d1.num_elements())
184 Vmath::Smul (nqtot,df[3][0],&diff0[0],1,&out_d1[0],1);
185 Blas::Daxpy (nqtot,df[4][0],&diff1[0],1,&out_d1[0],1);
186 Blas::Daxpy (nqtot,df[5][0],&diff2[0],1,&out_d1[0],1);
189 if(out_d2.num_elements())
191 Vmath::Smul (nqtot,df[6][0],&diff0[0],1,&out_d2[0],1);
192 Blas::Daxpy (nqtot,df[7][0],&diff1[0],1,&out_d2[0],1);
193 Blas::Daxpy (nqtot,df[8][0],&diff2[0],1,&out_d2[0],1);
218 if(
m_base[0]->Collocation() &&
219 m_base[1]->Collocation() &&
280 bool multiplybyweights)
282 const int nquad0 =
m_base[0]->GetNumPoints();
283 const int nquad1 =
m_base[1]->GetNumPoints();
284 const int nquad2 =
m_base[2]->GetNumPoints();
285 const int order0 =
m_base[0]->GetNumModes();
286 const int order1 =
m_base[1]->GetNumModes();
290 if(multiplybyweights)
307 inarray,outarray,wsp,
355 const int nquad0 =
m_base[0]->GetNumPoints();
356 const int nquad1 =
m_base[1]->GetNumPoints();
357 const int nquad2 =
m_base[2]->GetNumPoints();
358 const int order0 =
m_base[0]->GetNumModes ();
359 const int order1 =
m_base[1]->GetNumModes ();
360 const int nqtot = nquad0*nquad1*nquad2;
383 Vmath::Vmul(nqtot,&df[3*dir][0], 1,tmp1.get(),1,tmp2.get(),1);
384 Vmath::Vmul(nqtot,&df[3*dir+1][0],1,tmp1.get(),1,tmp3.get(),1);
385 Vmath::Vmul(nqtot,&df[3*dir+2][0],1,tmp1.get(),1,tmp4.get(),1);
389 Vmath::Smul(nqtot, df[3*dir][0], tmp1.get(),1,tmp2.get(), 1);
390 Vmath::Smul(nqtot, df[3*dir+1][0],tmp1.get(),1,tmp3.get(), 1);
391 Vmath::Smul(nqtot, df[3*dir+2][0],tmp1.get(),1,tmp4.get(), 1);
395 for (i = 0; i < nquad0; ++i)
397 gfac0[i] = 0.5*(1+z0[i]);
401 for (i = 0; i < nquad2; ++i)
403 gfac2[i] = 2.0/(1-z2[i]);
406 const int nq01 = nquad0*nquad1;
408 for (i = 0; i < nquad2; ++i)
410 Vmath::Smul(nq01,gfac2[i],&tmp2[0]+i*nq01,1,&tmp2[0]+i*nq01,1);
411 Vmath::Smul(nq01,gfac2[i],&tmp4[0]+i*nq01,1,&tmp5[0]+i*nq01,1);
414 for(i = 0; i < nquad1*nquad2; ++i)
416 Vmath::Vmul(nquad0,&gfac0[0],1,&tmp5[0]+i*nquad0,1,
417 &tmp5[0]+i*nquad0,1);
420 Vmath::Vadd(nqtot, &tmp2[0], 1, &tmp5[0], 1, &tmp2[0], 1);
454 m_base[2]->GetBasisKey());
466 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 &&
467 Lcoords[1] <= -1.0 && Lcoords[1] >= 1.0 &&
468 Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
469 "Local coordinates are not in region [-1,1]");
473 for(i = 0; i <
m_geom->GetCoordim(); ++i)
475 coords[i] =
m_geom->GetCoord(i,Lcoords);
497 return StdPrismExp::v_PhysEvaluate(Lcoord,physvals);
507 m_geom->GetLocCoords(coord, Lcoord);
509 return StdPrismExp::v_PhysEvaluate(Lcoord, physvals);
519 return m_geom->GetCoordim();
524 const std::vector<unsigned int >& nummodes,
525 const int mode_offset,
528 int data_order0 = nummodes[mode_offset];
529 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
530 int data_order1 = nummodes[mode_offset+1];
531 int order1 =
m_base[1]->GetNumModes();
532 int fillorder1 = min(order1,data_order1);
533 int data_order2 = nummodes[mode_offset+2];
534 int order2 =
m_base[2]->GetNumModes();
535 int fillorder2 = min(order2,data_order2);
547 "Extraction routine not set up for this basis");
550 "Extraction routine not set up for this basis");
553 for(j = 0; j < fillorder0; ++j)
555 for(i = 0; i < fillorder1; ++i)
559 cnt += data_order2-j;
564 for(i = fillorder1; i < data_order1; ++i)
566 cnt += data_order2-j;
569 for(i = fillorder1; i < order1; ++i)
577 ASSERTL0(
false,
"basis is either not set up or not "
585 int nquad0 =
m_base[0]->GetNumPoints();
586 int nquad1 =
m_base[1]->GetNumPoints();
587 int nquad2 =
m_base[2]->GetNumPoints();
596 if(outarray.num_elements()!=nq0*nq1)
602 for(
int i = 0; i < nquad0*nquad1; ++i)
611 if(outarray.num_elements()!=nq0*nq1)
617 for (
int k=0; k<nquad2; k++)
619 for(
int i = 0; i < nquad0; ++i)
621 outarray[k*nquad0+i] = (nquad0*nquad1*k)+i;
630 if(outarray.num_elements()!=nq0*nq1)
636 for(
int j = 0; j < nquad1*nquad2; ++j)
638 outarray[j] = nquad0-1 + j*nquad0;
645 if(outarray.num_elements()!=nq0*nq1)
651 for (
int k=0; k<nquad2; k++)
653 for(
int i = 0; i < nquad0; ++i)
655 outarray[k*nquad0+i] = nquad0*(nquad1-1) + (nquad0*nquad1*k)+i;
663 if(outarray.num_elements()!=nq0*nq1)
669 for(
int j = 0; j < nquad1*nquad2; ++j)
671 outarray[j] = j*nquad0;
676 ASSERTL0(
false,
"face value (> 4) is out of range");
695 int nq0 = ptsKeys[0].GetNumPoints();
696 int nq1 = ptsKeys[1].GetNumPoints();
697 int nq2 = ptsKeys[2].GetNumPoints();
713 for (i = 0; i < vCoordDim; ++i)
728 for(i = 0; i < vCoordDim; ++i)
730 normal[i][0] = -df[3*i+2][0];;
736 for(i = 0; i < vCoordDim; ++i)
738 normal[i][0] = -df[3*i+1][0];
744 for(i = 0; i < vCoordDim; ++i)
746 normal[i][0] = df[3*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];
767 ASSERTL0(
false,
"face is out of range (face < 4)");
772 for(i = 0; i < vCoordDim; ++i)
774 fac += normal[i][0]*normal[i][0];
777 for (i = 0; i < vCoordDim; ++i)
792 else if (face == 1 || face == 3)
814 for(j = 0; j < nq01; ++j)
816 normals[j] = -df[2][j]*jac[j];
817 normals[nqtot+j] = -df[5][j]*jac[j];
818 normals[2*nqtot+j] = -df[8][j]*jac[j];
822 points0 = ptsKeys[0];
823 points1 = ptsKeys[1];
829 for (j = 0; j < nq0; ++j)
831 for(k = 0; k < nq2; ++k)
835 -df[1][tmp]*jac[tmp];
836 normals[nqtot+j+k*nq0] =
837 -df[4][tmp]*jac[tmp];
838 normals[2*nqtot+j+k*nq0] =
839 -df[7][tmp]*jac[tmp];
840 faceJac[j+k*nq0] = jac[tmp];
844 points0 = ptsKeys[0];
845 points1 = ptsKeys[2];
851 for (j = 0; j < nq1; ++j)
853 for(k = 0; k < nq2; ++k)
855 int tmp = nq0-1+nq0*j+nq01*k;
857 (df[0][tmp]+df[2][tmp])*jac[tmp];
858 normals[nqtot+j+k*nq1] =
859 (df[3][tmp]+df[5][tmp])*jac[tmp];
860 normals[2*nqtot+j+k*nq1] =
861 (df[6][tmp]+df[8][tmp])*jac[tmp];
862 faceJac[j+k*nq1] = jac[tmp];
866 points0 = ptsKeys[1];
867 points1 = ptsKeys[2];
873 for (j = 0; j < nq0; ++j)
875 for(k = 0; k < nq2; ++k)
877 int tmp = nq0*(nq1-1) + j + nq01*k;
880 normals[nqtot+j+k*nq0] =
882 normals[2*nqtot+j+k*nq0] =
884 faceJac[j+k*nq0] = jac[tmp];
888 points0 = ptsKeys[0];
889 points1 = ptsKeys[2];
895 for (j = 0; j < nq1; ++j)
897 for(k = 0; k < nq2; ++k)
899 int tmp = j*nq0+nq01*k;
901 -df[0][tmp]*jac[tmp];
902 normals[nqtot+j+k*nq1] =
903 -df[3][tmp]*jac[tmp];
904 normals[2*nqtot+j+k*nq1] =
905 -df[6][tmp]*jac[tmp];
906 faceJac[j+k*nq1] = jac[tmp];
910 points0 = ptsKeys[1];
911 points1 = ptsKeys[2];
916 ASSERTL0(
false,
"face is out of range (face < 4)");
926 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
929 for(i = 0; i < vCoordDim; ++i)
936 Vmath::Vmul(nq_face,work,1,normal[i],1,normal[i],1);
943 Vmath::Vvtvp(nq_face,normal[i],1,normal[i],1,work,1,work,1);
951 Vmath::Vmul(nq_face,normal[i],1,work,1,normal[i],1);
961 StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
979 StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,mkey);
997 if(inarray.get() == outarray.get())
1002 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1003 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1007 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1008 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1035 StdPrismExp::v_SVVLaplacianFilter( array, mkey);
1062 returnval = StdPrismExp::v_GenMatrix(mkey);
1077 return tmp->GetStdMatrix(mkey);
1101 "Geometric information is not set up");
1186 int rows = deriv0.GetRows();
1187 int cols = deriv1.GetColumns();
1192 (*WeakDeriv) = df[3*dir ][0]*deriv0
1193 + df[3*dir+1][0]*deriv1
1194 + df[3*dir+2][0]*deriv2;
1239 int rows = lap00.GetRows();
1240 int cols = lap00.GetColumns();
1245 (*lap) = gmat[0][0]*lap00
1250 + gmat[7][0]*(lap12 +
Transpose(lap12));
1268 int rows = LapMat.GetRows();
1269 int cols = LapMat.GetColumns();
1274 (*helm) = LapMat + factor*MassMat;
1420 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1421 unsigned int exp_size[] = {nbdry, nint};
1422 unsigned int nblks=2;
1432 goto UseLocRegionsMatrix;
1438 goto UseLocRegionsMatrix;
1443 factor = mat->Scale();
1444 goto UseStdRegionsMatrix;
1447 UseStdRegionsMatrix:
1462 UseLocRegionsMatrix:
1478 for(i = 0; i < nbdry; ++i)
1480 for(j = 0; j < nbdry; ++j)
1482 (*A)(i,j) = mat(bmap[i],bmap[j]);
1485 for(j = 0; j < nint; ++j)
1487 (*B)(i,j) = mat(bmap[i],imap[j]);
1491 for(i = 0; i < nint; ++i)
1493 for(j = 0; j < nbdry; ++j)
1495 (*C)(i,j) = mat(imap[i],bmap[j]);
1498 for(j = 0; j < nint; ++j)
1500 (*D)(i,j) = mat(imap[i],imap[j]);
1509 (*A) = (*A) - (*B)*(*C);
1549 int nquad0 =
m_base[0]->GetNumPoints();
1550 int nquad1 =
m_base[1]->GetNumPoints();
1551 int nquad2 =
m_base[2]->GetNumPoints();
1552 int nqtot = nquad0*nquad1*nquad2;
1586 StdExpansion3D::PhysTensorDeriv(inarray,wsp1,wsp2,wsp3);
1595 for (i = 0; i < nquad2; ++i)
1597 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h0[0]+i*nquad0*nquad1,1);
1598 Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h1[0]+i*nquad0*nquad1,1);
1600 for (i = 0; i < nquad0; i++)
1602 Blas::Dscal(nquad1*nquad2, 0.5*(1+z0[i]), &h1[0]+i, nquad0);
1611 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &df[2][0], 1, &h1[0], 1, &wsp4[0], 1);
1613 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &df[5][0], 1, &h1[0], 1, &wsp5[0], 1);
1615 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &df[8][0], 1, &h1[0], 1, &wsp6[0], 1);
1618 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1619 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1622 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &wsp4[0], 1, &df[4][0], 1, &wsp5[0], 1, &g3[0], 1);
1623 Vmath::Vvtvp (nqtot, &df[7][0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1626 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0], 1, &g4[0], 1);
1627 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1631 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[1][0], 1, &df[4][0], 1, &df[4][0], 1, &g1[0], 1);
1632 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[7][0], 1, &g1[0], 1, &g1[0], 1);
1635 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1, &df[5][0], 1, &g2[0], 1);
1636 Vmath::Vvtvp (nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1639 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[2][0], 1, &df[4][0], 1, &df[5][0], 1, &g5[0], 1);
1640 Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[8][0], 1, &g5[0], 1, &g5[0], 1);
1645 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[2][0], &h1[0], 1, &wsp4[0], 1);
1647 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[5][0], &h1[0], 1, &wsp5[0], 1);
1649 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[8][0], &h1[0], 1, &wsp6[0], 1);
1652 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1653 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1656 Vmath::Svtsvtp(nqtot, df[1][0], &wsp4[0], 1, df[4][0], &wsp5[0], 1, &g3[0], 1);
1657 Vmath::Svtvp (nqtot, df[7][0], &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1660 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1, &g4[0], 1);
1661 Vmath::Svtvp (nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1665 Vmath::Fill(nqtot, df[1][0]*df[1][0] + df[4][0]*df[4][0] + df[7][0]*df[7][0], &g1[0], 1);
1668 Vmath::Fill(nqtot, df[2][0]*df[2][0] + df[5][0]*df[5][0] + df[8][0]*df[8][0], &g2[0], 1);
1671 Vmath::Fill(nqtot, df[1][0]*df[2][0] + df[4][0]*df[5][0] + df[7][0]*df[8][0], &g5[0], 1);
1675 Vmath::Vvtvvtp(nqtot,&g0[0],1,&wsp1[0],1,&g3[0],1,&wsp2[0],1,&wsp7[0],1);
1676 Vmath::Vvtvp (nqtot,&g4[0],1,&wsp3[0],1,&wsp7[0],1,&wsp7[0],1);
1677 Vmath::Vvtvvtp(nqtot,&g1[0],1,&wsp2[0],1,&g3[0],1,&wsp1[0],1,&wsp8[0],1);
1678 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp3[0],1,&wsp8[0],1,&wsp8[0],1);
1679 Vmath::Vvtvvtp(nqtot,&g2[0],1,&wsp3[0],1,&g4[0],1,&wsp1[0],1,&wsp9[0],1);
1680 Vmath::Vvtvp (nqtot,&g5[0],1,&wsp2[0],1,&wsp9[0],1,&wsp9[0],1);
1704 int np0 =
m_base[0]->GetNumPoints();
1705 int np1 =
m_base[1]->GetNumPoints();
1706 int np2 =
m_base[2]->GetNumPoints();
1707 int np = max(np0,max(np1,np2));
1709 bool standard =
true;
1711 int vid0 =
m_geom->GetVid(0);
1712 int vid1 =
m_geom->GetVid(1);
1713 int vid2 =
m_geom->GetVid(4);
1717 if((vid2 < vid1)&&(vid2 < vid0))
1725 else if((vid1 < vid2)&&(vid1 < vid0))
1733 else if ((vid0 < vid2)&&(vid0 < vid1))
1755 rot[0] = (0+rotate)%3;
1756 rot[1] = (1+rotate)%3;
1757 rot[2] = (2+rotate)%3;
1760 for(
int i = 0; i < np-1; ++i)
1762 planep1 += (np-i)*np;
1767 if(standard ==
false)
1769 for(
int j = 0; j < np-1; ++j)
1773 for(
int k = 0; k < np-i-2; ++k)
1776 prismpt[rot[0]] = plane + row + k;
1777 prismpt[rot[1]] = plane + row + k+1;
1778 prismpt[rot[2]] = planep1 + row1 + k;
1780 prismpt[3+rot[0]] = plane + rowp1 + k;
1781 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1782 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1784 conn[cnt++] = prismpt[0];
1785 conn[cnt++] = prismpt[1];
1786 conn[cnt++] = prismpt[3];
1787 conn[cnt++] = prismpt[2];
1789 conn[cnt++] = prismpt[5];
1790 conn[cnt++] = prismpt[2];
1791 conn[cnt++] = prismpt[3];
1792 conn[cnt++] = prismpt[4];
1794 conn[cnt++] = prismpt[3];
1795 conn[cnt++] = prismpt[1];
1796 conn[cnt++] = prismpt[4];
1797 conn[cnt++] = prismpt[2];
1800 prismpt[rot[0]] = planep1 + row1 + k+1;
1801 prismpt[rot[1]] = planep1 + row1 + k;
1802 prismpt[rot[2]] = plane + row + k+1;
1804 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1805 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1806 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1809 conn[cnt++] = prismpt[0];
1810 conn[cnt++] = prismpt[1];
1811 conn[cnt++] = prismpt[2];
1812 conn[cnt++] = prismpt[5];
1814 conn[cnt++] = prismpt[5];
1815 conn[cnt++] = prismpt[0];
1816 conn[cnt++] = prismpt[4];
1817 conn[cnt++] = prismpt[1];
1819 conn[cnt++] = prismpt[3];
1820 conn[cnt++] = prismpt[4];
1821 conn[cnt++] = prismpt[0];
1822 conn[cnt++] = prismpt[5];
1827 prismpt[rot[0]] = plane + row + np-i-2;
1828 prismpt[rot[1]] = plane + row + np-i-1;
1829 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1831 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1832 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1833 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1835 conn[cnt++] = prismpt[0];
1836 conn[cnt++] = prismpt[1];
1837 conn[cnt++] = prismpt[3];
1838 conn[cnt++] = prismpt[2];
1840 conn[cnt++] = prismpt[5];
1841 conn[cnt++] = prismpt[2];
1842 conn[cnt++] = prismpt[3];
1843 conn[cnt++] = prismpt[4];
1845 conn[cnt++] = prismpt[3];
1846 conn[cnt++] = prismpt[1];
1847 conn[cnt++] = prismpt[4];
1848 conn[cnt++] = prismpt[2];
1857 for(
int j = 0; j < np-1; ++j)
1861 for(
int k = 0; k < np-i-2; ++k)
1864 prismpt[rot[0]] = plane + row + k;
1865 prismpt[rot[1]] = plane + row + k+1;
1866 prismpt[rot[2]] = planep1 + row1 + k;
1868 prismpt[3+rot[0]] = plane + rowp1 + k;
1869 prismpt[3+rot[1]] = plane + rowp1 + k+1;
1870 prismpt[3+rot[2]] = planep1 + row1p1 + k;
1872 conn[cnt++] = prismpt[0];
1873 conn[cnt++] = prismpt[1];
1874 conn[cnt++] = prismpt[4];
1875 conn[cnt++] = prismpt[2];
1877 conn[cnt++] = prismpt[4];
1878 conn[cnt++] = prismpt[3];
1879 conn[cnt++] = prismpt[0];
1880 conn[cnt++] = prismpt[2];
1882 conn[cnt++] = prismpt[3];
1883 conn[cnt++] = prismpt[4];
1884 conn[cnt++] = prismpt[5];
1885 conn[cnt++] = prismpt[2];
1888 prismpt[rot[0]] = planep1 + row1 + k+1;
1889 prismpt[rot[1]] = planep1 + row1 + k;
1890 prismpt[rot[2]] = plane + row + k+1;
1892 prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1893 prismpt[3+rot[1]] = planep1 + row1p1 + k;
1894 prismpt[3+rot[2]] = plane + rowp1 + k+1;
1896 conn[cnt++] = prismpt[0];
1897 conn[cnt++] = prismpt[2];
1898 conn[cnt++] = prismpt[1];
1899 conn[cnt++] = prismpt[5];
1901 conn[cnt++] = prismpt[3];
1902 conn[cnt++] = prismpt[5];
1903 conn[cnt++] = prismpt[0];
1904 conn[cnt++] = prismpt[1];
1906 conn[cnt++] = prismpt[5];
1907 conn[cnt++] = prismpt[3];
1908 conn[cnt++] = prismpt[4];
1909 conn[cnt++] = prismpt[1];
1913 prismpt[rot[0]] = plane + row + np-i-2;
1914 prismpt[rot[1]] = plane + row + np-i-1;
1915 prismpt[rot[2]] = planep1 + row1 + np-i-2;
1917 prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1918 prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1919 prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1921 conn[cnt++] = prismpt[0];
1922 conn[cnt++] = prismpt[1];
1923 conn[cnt++] = prismpt[4];
1924 conn[cnt++] = prismpt[2];
1926 conn[cnt++] = prismpt[4];
1927 conn[cnt++] = prismpt[3];
1928 conn[cnt++] = prismpt[0];
1929 conn[cnt++] = prismpt[2];
1931 conn[cnt++] = prismpt[3];
1932 conn[cnt++] = prismpt[4];
1933 conn[cnt++] = prismpt[5];
1934 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.