43 namespace LocalRegions
63 StdExpansion (LibUtilities::StdTetData::
getNumberOfCoefficients(Ba.GetNumModes(),Bb.GetNumModes(),Bc.GetNumModes()),3,Ba,Bb,Bc),
64 StdExpansion3D(LibUtilities::StdTetData::
getNumberOfCoefficients(Ba.GetNumModes(),Bb.GetNumModes(),Bc.GetNumModes()),Ba,Bb,Bc),
65 StdRegions::StdTetExp(Ba,Bb,Bc),
69 boost::bind(&
TetExp::CreateMatrix, this, _1),
70 std::string(
"TetExpMatrix")),
71 m_staticCondMatrixManager(
72 boost::bind(&
TetExp::CreateStaticCondMatrix, this, _1),
73 std::string(
"TetExpStaticCondMatrix"))
84 StdRegions::StdTetExp(T),
87 m_matrixManager(T.m_matrixManager),
88 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
117 int nquad0 =
m_base[0]->GetNumPoints();
118 int nquad1 =
m_base[1]->GetNumPoints();
119 int nquad2 =
m_base[2]->GetNumPoints();
137 retrunVal = StdTetExp::v_Integral(tmp);
161 int TotPts =
m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints()*
162 m_base[2]->GetNumPoints();
170 StdTetExp::v_PhysDeriv(inarray, Diff0, Diff1, Diff2);
174 if(out_d0.num_elements())
176 Vmath::Vmul (TotPts,&df[0][0],1,&Diff0[0],1, &out_d0[0], 1);
177 Vmath::Vvtvp (TotPts,&df[1][0],1,&Diff1[0],1, &out_d0[0], 1,&out_d0[0],1);
178 Vmath::Vvtvp (TotPts,&df[2][0],1,&Diff2[0],1, &out_d0[0], 1,&out_d0[0],1);
181 if(out_d1.num_elements())
183 Vmath::Vmul (TotPts,&df[3][0],1,&Diff0[0],1, &out_d1[0], 1);
184 Vmath::Vvtvp (TotPts,&df[4][0],1,&Diff1[0],1, &out_d1[0], 1,&out_d1[0],1);
185 Vmath::Vvtvp (TotPts,&df[5][0],1,&Diff2[0],1, &out_d1[0], 1,&out_d1[0],1);
188 if(out_d2.num_elements())
190 Vmath::Vmul (TotPts,&df[6][0],1,&Diff0[0],1, &out_d2[0], 1);
191 Vmath::Vvtvp (TotPts,&df[7][0],1,&Diff1[0],1, &out_d2[0], 1, &out_d2[0],1);
192 Vmath::Vvtvp (TotPts,&df[8][0],1,&Diff2[0],1, &out_d2[0], 1, &out_d2[0],1);
197 if(out_d0.num_elements())
199 Vmath::Smul (TotPts,df[0][0],&Diff0[0],1, &out_d0[0], 1);
200 Blas::Daxpy (TotPts,df[1][0],&Diff1[0],1, &out_d0[0], 1);
201 Blas::Daxpy (TotPts,df[2][0],&Diff2[0],1, &out_d0[0], 1);
204 if(out_d1.num_elements())
206 Vmath::Smul (TotPts,df[3][0],&Diff0[0],1, &out_d1[0], 1);
207 Blas::Daxpy (TotPts,df[4][0],&Diff1[0],1, &out_d1[0], 1);
208 Blas::Daxpy (TotPts,df[5][0],&Diff2[0],1, &out_d1[0], 1);
211 if(out_d2.num_elements())
213 Vmath::Smul (TotPts,df[6][0],&Diff0[0],1, &out_d2[0], 1);
214 Blas::Daxpy (TotPts,df[7][0],&Diff1[0],1, &out_d2[0], 1);
215 Blas::Daxpy (TotPts,df[8][0],&Diff2[0],1, &out_d2[0], 1);
237 if((
m_base[0]->Collocation())&&(
m_base[1]->Collocation())&&(
m_base[2]->Collocation()))
297 bool multiplybyweights)
299 const int nquad0 =
m_base[0]->GetNumPoints();
300 const int nquad1 =
m_base[1]->GetNumPoints();
301 const int nquad2 =
m_base[2]->GetNumPoints();
302 const int order0 =
m_base[0]->GetNumModes();
303 const int order1 =
m_base[1]->GetNumModes();
305 nquad2*order0*(order1+1)/2);
307 if(multiplybyweights)
323 inarray,outarray,wsp,
363 const int nquad0 =
m_base[0]->GetNumPoints();
364 const int nquad1 =
m_base[1]->GetNumPoints();
365 const int nquad2 =
m_base[2]->GetNumPoints();
366 const int order0 =
m_base[0]->GetNumModes ();
367 const int order1 =
m_base[1]->GetNumModes ();
368 const int nqtot = nquad0*nquad1*nquad2;
386 nquad2*order0*(order1+1)/2);
395 Vmath::Vmul(nqtot,&df[3*dir][0], 1,tmp1.get(),1,tmp2.get(),1);
396 Vmath::Vmul(nqtot,&df[3*dir+1][0],1,tmp1.get(),1,tmp3.get(),1);
397 Vmath::Vmul(nqtot,&df[3*dir+2][0],1,tmp1.get(),1,tmp4.get(),1);
401 Vmath::Smul(nqtot, df[3*dir ][0],tmp1.get(),1,tmp2.get(), 1);
402 Vmath::Smul(nqtot, df[3*dir+1][0],tmp1.get(),1,tmp3.get(), 1);
403 Vmath::Smul(nqtot, df[3*dir+2][0],tmp1.get(),1,tmp4.get(), 1);
406 const int nq01 = nquad0*nquad1;
407 const int nq12 = nquad1*nquad2;
409 for(j = 0; j < nquad2; ++j)
411 for(i = 0; i < nquad1; ++i)
414 &h0[0]+i*nquad0 + j*nq01,1);
416 &h1[0]+i*nquad0 + j*nq01,1);
418 &h2[0]+i*nquad0 + j*nq01,1);
420 &h3[0]+i*nquad0 + j*nq01,1);
424 for(i = 0; i < nquad0; i++)
426 Blas::Dscal(nq12, 1+z0[i], &h1[0]+i, nquad0);
431 &tmp3[0], 1, &h1[0], 1,
434 &tmp5[0], 1, &tmp5[0], 1);
444 &tmp4[0], 1, &h3[0], 1,
480 return StdTetExp::v_PhysEvaluate(Lcoord,physvals);
496 m_geom->GetLocCoords(coord,Lcoord);
499 return StdTetExp::v_PhysEvaluate(Lcoord,physvals);
511 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 &&
512 Lcoords[1] <= -1.0 && Lcoords[1] >= 1.0 &&
513 Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
514 "Local coordinates are not in region [-1,1]");
518 for(i = 0; i <
m_geom->GetCoordim(); ++i)
520 coords[i] =
m_geom->GetCoord(i,Lcoords);
550 m_base[2]->GetBasisKey());
555 return m_geom->GetCoordim();
560 const std::vector<unsigned int > &nummodes,
561 const int mode_offset,
564 int data_order0 = nummodes[mode_offset];
565 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
566 int data_order1 = nummodes[mode_offset+1];
567 int order1 =
m_base[1]->GetNumModes();
568 int fillorder1 = min(order1,data_order1);
569 int data_order2 = nummodes[mode_offset+2];
570 int order2 =
m_base[2]->GetNumModes();
571 int fillorder2 = min(order2,data_order2);
583 "Extraction routine not set up for this basis");
586 "Extraction routine not set up for this basis");
589 for(j = 0; j < fillorder0; ++j)
591 for(i = 0; i < fillorder1-j; ++i)
595 cnt += data_order2-j-i;
600 for(i = fillorder1-j; i < data_order1-j; ++i)
602 cnt += data_order2-j-i;
605 for(i = fillorder1-j; i < order1-j; ++i)
614 ASSERTL0(
false,
"basis is either not set up or not "
643 int nquad0 =
m_base[0]->GetNumPoints();
644 int nquad1 =
m_base[1]->GetNumPoints();
645 int nquad2 =
m_base[2]->GetNumPoints();
661 Vmath::Vcopy(nquad0*nquad1,inarray.get(),1,o_tmp.get(),1);
664 m_base[1]->GetPointsKey(),
666 FaceExp->GetBasis(0)->GetPointsKey(),
667 FaceExp->GetBasis(1)->GetPointsKey(),
674 for (
int k=0; k<nquad2; k++)
676 Vmath::Vcopy(nquad0,inarray.get()+(nquad0*nquad1*k),1,o_tmp.get()+(k*nquad0),1);
680 m_base[2]->GetPointsKey(),
682 FaceExp->GetBasis(0)->GetPointsKey(),
683 FaceExp->GetBasis(1)->GetPointsKey(),
690 Vmath::Vcopy(nquad1*nquad2,inarray.get()+(nquad0-1),nquad0,o_tmp.get(),1);
693 FaceExp->GetBasis(0)->GetPointsKey(),FaceExp->GetBasis(1)->GetPointsKey(),o_tmp2.get());
699 Vmath::Vcopy(nquad1*nquad2,inarray.get(),nquad0,o_tmp.get(),1);
702 FaceExp->GetBasis(0)->GetPointsKey(),FaceExp->GetBasis(1)->GetPointsKey(),o_tmp2.get());
706 ASSERTL0(
false,
"face value (> 3) is out of range");
710 int nq1 = FaceExp->GetNumPoints(0);
711 int nq2 = FaceExp->GetNumPoints(1);
713 if ((
int)orient == 7)
715 for (
int j = 0; j < nq2; ++j)
717 Vmath::Vcopy(nq1, o_tmp2.get()+((j+1)*nq1-1), -1, outarray.get()+j*nq1, 1);
722 Vmath::Vcopy(nq1*nq2, o_tmp2.get(), 1, outarray.get(), 1);
750 for (i = 0; i < vCoordDim; ++i)
766 for (i = 0; i < vCoordDim; ++i)
768 normal[i][0] = -df[3*i+2][0];
775 for (i = 0; i < vCoordDim; ++i)
777 normal[i][0] = -df[3*i+1][0];
784 for (i = 0; i < vCoordDim; ++i)
786 normal[i][0] = df[3*i][0]+df[3*i+1][0]+
794 for(i = 0; i < vCoordDim; ++i)
796 normal[i][0] = -df[3*i][0];
801 ASSERTL0(
false,
"face is out of range (edge < 3)");
806 for (i = 0; i < vCoordDim; ++i)
808 fac += normal[i][0]*normal[i][0];
812 for (i = 0; i < vCoordDim; ++i)
822 int nq0 = ptsKeys[0].GetNumPoints();
823 int nq1 = ptsKeys[1].GetNumPoints();
824 int nq2 = ptsKeys[2].GetNumPoints();
855 for(j = 0; j < nq01; ++j)
857 normals[j] = -df[2][j]*jac[j];
858 normals[nqtot+j] = -df[5][j]*jac[j];
859 normals[2*nqtot+j] = -df[8][j]*jac[j];
863 points0 = ptsKeys[0];
864 points1 = ptsKeys[1];
870 for (j = 0; j < nq0; ++j)
872 for(k = 0; k < nq2; ++k)
876 -df[1][tmp]*jac[tmp];
877 normals[nqtot+j+k*nq0] =
878 -df[4][tmp]*jac[tmp];
879 normals[2*nqtot+j+k*nq0] =
880 -df[7][tmp]*jac[tmp];
881 faceJac[j+k*nq0] = jac[tmp];
885 points0 = ptsKeys[0];
886 points1 = ptsKeys[2];
892 for (j = 0; j < nq1; ++j)
894 for(k = 0; k < nq2; ++k)
896 int tmp = nq0-1+nq0*j+nq01*k;
898 (df[0][tmp]+df[1][tmp]+df[2][tmp])*
900 normals[nqtot+j+k*nq1] =
901 (df[3][tmp]+df[4][tmp]+df[5][tmp])*
903 normals[2*nqtot+j+k*nq1] =
904 (df[6][tmp]+df[7][tmp]+df[8][tmp])*
906 faceJac[j+k*nq1] = jac[tmp];
910 points0 = ptsKeys[1];
911 points1 = ptsKeys[2];
917 for (j = 0; j < nq1; ++j)
919 for(k = 0; k < nq2; ++k)
921 int tmp = j*nq0+nq01*k;
923 -df[0][tmp]*jac[tmp];
924 normals[nqtot+j+k*nq1] =
925 -df[3][tmp]*jac[tmp];
926 normals[2*nqtot+j+k*nq1] =
927 -df[6][tmp]*jac[tmp];
928 faceJac[j+k*nq1] = jac[tmp];
932 points0 = ptsKeys[1];
933 points1 = ptsKeys[2];
938 ASSERTL0(
false,
"face is out of range (face < 3)");
947 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
950 for(i = 0; i < vCoordDim; ++i)
957 Vmath::Vmul(nq_face,work,1,normal[i],1,normal[i],1);
964 Vmath::Vvtvp(nq_face,normal[i],1,normal[i],1,work,1,work,1);
972 Vmath::Vmul(nq_face,normal[i],1,work,1,normal[i],1);
1004 StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,
1031 StdTetExp::v_SVVLaplacianFilter( array, mkey);
1058 returnval = StdTetExp::v_GenMatrix(mkey);
1156 int rows = deriv0.GetRows();
1157 int cols = deriv1.GetColumns();
1161 (*WeakDeriv) = df[3*dir][0]*deriv0
1162 + df[3*dir+1][0]*deriv1
1163 + df[3*dir+2][0]*deriv2;
1207 int rows = lap00.GetRows();
1208 int cols = lap00.GetColumns();
1213 (*lap) = gmat[0][0]*lap00
1218 + gmat[7][0]*(lap12 +
Transpose(lap12));
1233 int rows = LapMat.GetRows();
1234 int cols = LapMat.GetColumns();
1239 (*helm) = LapMat + factor*MassMat;
1383 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1384 unsigned int exp_size[] = {nbdry, nint};
1385 unsigned int nblks = 2;
1397 goto UseLocRegionsMatrix;
1404 goto UseLocRegionsMatrix;
1409 factor = mat->Scale();
1410 goto UseStdRegionsMatrix;
1413 UseStdRegionsMatrix:
1428 UseLocRegionsMatrix:
1444 for(i = 0; i < nbdry; ++i)
1446 for(j = 0; j < nbdry; ++j)
1448 (*A)(i,j) = mat(bmap[i],bmap[j]);
1451 for(j = 0; j < nint; ++j)
1453 (*B)(i,j) = mat(bmap[i],imap[j]);
1457 for(i = 0; i < nint; ++i)
1459 for(j = 0; j < nbdry; ++j)
1461 (*C)(i,j) = mat(imap[i],bmap[j]);
1464 for(j = 0; j < nint; ++j)
1466 (*D)(i,j) = mat(imap[i],imap[j]);
1475 (*A) = (*A) - (*B)*(*C);
1500 return tmp->GetStdMatrix(mkey);
1525 if(inarray.get() == outarray.get())
1530 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1531 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1535 Blas::Dgemv(
'N',
m_ncoeffs,
m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1536 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1553 int nquad0 =
m_base[0]->GetNumPoints();
1554 int nquad1 =
m_base[1]->GetNumPoints();
1555 int nquad2 =
m_base[2]->GetNumPoints();
1556 int nqtot = nquad0*nquad1*nquad2;
1558 ASSERTL1(wsp.num_elements() >= 6*nqtot,
1559 "Insufficient workspace size.");
1561 "Workspace not set up for ncoeffs > nqtot");
1588 StdExpansion3D::PhysTensorDeriv(inarray,wsp0,wsp1,wsp2);
1594 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp0[0],1,&metric01[0],1,&wsp1[0],1,&wsp3[0],1);
1595 Vmath::Vvtvp (nqtot,&metric02[0],1,&wsp2[0],1,&wsp3[0],1,&wsp3[0],1);
1596 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp0[0],1,&metric11[0],1,&wsp1[0],1,&wsp4[0],1);
1597 Vmath::Vvtvp (nqtot,&metric12[0],1,&wsp2[0],1,&wsp4[0],1,&wsp4[0],1);
1598 Vmath::Vvtvvtp(nqtot,&metric02[0],1,&wsp0[0],1,&metric12[0],1,&wsp1[0],1,&wsp5[0],1);
1599 Vmath::Vvtvp (nqtot,&metric22[0],1,&wsp2[0],1,&wsp5[0],1,&wsp5[0],1);
1620 const unsigned int dim = 3;
1626 for (
unsigned int i = 0; i < dim; ++i)
1628 for (
unsigned int j = i; j < dim; ++j)
1661 const unsigned int nquad0 =
m_base[0]->GetNumPoints();
1662 const unsigned int nquad1 =
m_base[1]->GetNumPoints();
1663 const unsigned int nquad2 =
m_base[2]->GetNumPoints();
1665 for(j = 0; j < nquad2; ++j)
1667 for(i = 0; i < nquad1; ++i)
1669 Vmath::Fill(nquad0, 4.0/(1.0-z1[i])/(1.0-z2[j]), &h0[0]+i*nquad0 + j*nquad0*nquad1,1);
1670 Vmath::Fill(nquad0, 2.0/(1.0-z1[i])/(1.0-z2[j]), &h1[0]+i*nquad0 + j*nquad0*nquad1,1);
1671 Vmath::Fill(nquad0, 2.0/(1.0-z2[j]), &h2[0]+i*nquad0 + j*nquad0*nquad1,1);
1672 Vmath::Fill(nquad0, (1.0+z1[i])/(1.0-z2[j]), &h3[0]+i*nquad0 + j*nquad0*nquad1,1);
1675 for(i = 0; i < nquad0; i++)
1677 Blas::Dscal(nquad1*nquad2, 1+z0[i], &h1[0]+i, nquad0);
1686 Vmath::Vadd(nqtot, &df[1][0], 1, &df[2][0], 1, &wsp4[0], 1);
1687 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &wsp4[0], 1, &h1[0], 1, &wsp4[0], 1);
1689 Vmath::Vadd(nqtot, &df[4][0], 1, &df[5][0], 1, &wsp5[0], 1);
1690 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &wsp5[0], 1, &h1[0], 1, &wsp5[0], 1);
1692 Vmath::Vadd(nqtot, &df[7][0], 1, &df[8][0], 1, &wsp6[0], 1);
1693 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &wsp6[0], 1, &h1[0], 1, &wsp6[0], 1);
1696 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1697 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1700 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0], 1, &g4[0], 1);
1701 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1705 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &h2[0], 1, &df[2][0], 1, &h3[0], 1, &wsp7[0], 1);
1707 Vmath::Vvtvvtp(nqtot, &df[4][0], 1, &h2[0], 1, &df[5][0], 1, &h3[0], 1, &wsp8[0], 1);
1709 Vmath::Vvtvvtp(nqtot, &df[7][0], 1, &h2[0], 1, &df[8][0], 1, &h3[0], 1, &wsp9[0], 1);
1712 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp7[0], 1, &wsp5[0], 1, &wsp8[0], 1, &g3[0], 1);
1713 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp9[0], 1, &g3[0], 1, &g3[0], 1);
1717 Vmath::Vvtvvtp(nqtot, &wsp7[0], 1, &wsp7[0], 1, &wsp8[0], 1, &wsp8[0], 1, &g1[0], 1);
1718 Vmath::Vvtvp (nqtot, &wsp9[0], 1, &wsp9[0], 1, &g1[0], 1, &g1[0], 1);
1721 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp7[0], 1, &df[5][0], 1, &wsp8[0], 1, &g5[0], 1);
1722 Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp9[0], 1, &g5[0], 1, &g5[0], 1);
1725 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1, &df[5][0], 1, &g2[0], 1);
1726 Vmath::Vvtvp (nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1731 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[1][0] + df[2][0], &h1[0], 1, &wsp4[0], 1);
1733 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[4][0] + df[5][0], &h1[0], 1, &wsp5[0], 1);
1735 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[7][0] + df[8][0], &h1[0], 1, &wsp6[0], 1);
1738 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1739 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1742 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1, &g4[0], 1);
1743 Vmath::Svtvp (nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1747 Vmath::Svtsvtp(nqtot, df[1][0], &h2[0], 1, df[2][0], &h3[0], 1, &wsp7[0], 1);
1749 Vmath::Svtsvtp(nqtot, df[4][0], &h2[0], 1, df[5][0], &h3[0], 1, &wsp8[0], 1);
1751 Vmath::Svtsvtp(nqtot, df[7][0], &h2[0], 1, df[8][0], &h3[0], 1, &wsp9[0], 1);
1754 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp7[0], 1, &wsp5[0], 1, &wsp8[0], 1, &g3[0], 1);
1755 Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp9[0], 1, &g3[0], 1, &g3[0], 1);
1759 Vmath::Vvtvvtp(nqtot, &wsp7[0], 1, &wsp7[0], 1, &wsp8[0], 1, &wsp8[0], 1, &g1[0], 1);
1760 Vmath::Vvtvp (nqtot, &wsp9[0], 1, &wsp9[0], 1, &g1[0], 1, &g1[0], 1);
1763 Vmath::Svtsvtp(nqtot, df[2][0], &wsp7[0], 1, df[5][0], &wsp8[0], 1, &g5[0], 1);
1764 Vmath::Svtvp (nqtot, df[8][0], &wsp9[0], 1, &g5[0], 1, &g5[0], 1);
1767 Vmath::Fill(nqtot, df[2][0]*df[2][0] + df[5][0]*df[5][0] + df[8][0]*df[8][0], &g2[0], 1);
1770 for (
unsigned int i = 0; i < dim; ++i)
1772 for (
unsigned int j = i; j < dim; ++j)
void ComputeLaplacianMetric()
const LibUtilities::PointsKeyVector GetPointsKeys() const
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
NekDouble GetConstFactor(const ConstFactorType &factor) const
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
#define ASSERTL0(condition, msg)
int GetFaceNumPoints(const int i) const
This function returns the number of quadrature points belonging to the i-th face. ...
const ConstFactorMap & GetConstFactors() const
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over region.
const VarCoeffMap & GetVarCoeffs() const
void GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
std::vector< PointsKey > PointsKeyVector
Principle Modified Functions .
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.
virtual void v_LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
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)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
virtual NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
this function calculates the inner product of a given function f with the different modes of the expa...
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
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_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=m_base0*m_base1*m_base2 and put in...
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
LibUtilities::ShapeType GetShapeType() const
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...
virtual void v_HelmholtzMatrixOp(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
StdRegions::Orientation GetForient(int face)
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
virtual void v_GetFacePhysVals(const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
Returns the physical values at the quadrature points of a face.
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
LibUtilities::ShapeType DetShapeType() const
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
bool ConstFactorExists(const ConstFactorType &factor) const
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &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
DNekBlkMatSharedPtr GetStdStaticCondMatrix(const StdMatrixKey &mkey)
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_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.
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
int getNumberOfCoefficients(int Na)
Principle Modified Functions .
virtual void v_GetTracePhysVals(const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
Returns the physical values at the quadrature points of a face Wrapper function to v_GetFacePhysVals...
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
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
Defines a specification for a set of points.
void v_ComputeFaceNormal(const int face)
Compute the normal of a triangular face.
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
std::map< int, NormalVector > m_faceNormals
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
boost::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
virtual int v_GetCoordim()
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):
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculates the inner product .
#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.
void ComputeQuadratureMetric()
boost::shared_ptr< TetGeom > TetGeomSharedPtr
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
Get the coordinates "coords" at the local coordinates "Lcoords".
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
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
boost::shared_ptr< StdTetExp > StdTetExpSharedPtr
GeomType
Indicates the type of element geometry.
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)
Differentiate inarray in the three coordinate directions.
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)
Geometry is curved or has non-constant factors.
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
Describes the specification for a Basis.
virtual void v_ComputeLaplacianMetric()
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
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.
virtual LibUtilities::ShapeType v_DetShapeType() const
Return Shape of region, using ShapeType enum list.