34 #include <boost/core/ignore_unused.hpp>
47 namespace LocalRegions
58 std::bind(&
TriExp::CreateMatrix, this, std::placeholders::_1),
59 std::string(
"TriExpMatrix")),
60 m_staticCondMatrixManager(
61 std::bind(&
TriExp::CreateStaticCondMatrix, this, std::placeholders::_1),
62 std::string(
"TriExpStaticCondMatrix"))
73 m_matrixManager(T.m_matrixManager),
74 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
87 int nquad0 =
m_base[0]->GetNumPoints();
88 int nquad1 =
m_base[1]->GetNumPoints();
96 Vmath::Vmul(nquad0*nquad1, jac, 1, inarray, 1,tmp, 1);
100 Vmath::Smul(nquad0*nquad1, jac[0], inarray, 1, tmp, 1);
104 ival = StdTriExp::v_Integral(tmp);
113 int nquad0 =
m_base[0]->GetNumPoints();
114 int nquad1 =
m_base[1]->GetNumPoints();
115 int nqtot = nquad0*nquad1;
122 StdTriExp::v_PhysDeriv(inarray, diff0, diff1);
129 Vmath::Vvtvp (nqtot,df[1],1,diff1,1, out_d0, 1, out_d0,1);
135 Vmath::Vvtvp (nqtot,df[3],1,diff1,1, out_d1, 1, out_d1,1);
141 Vmath::Vvtvp (nqtot,df[5],1,diff1,1, out_d2, 1, out_d2,1);
148 Vmath::Smul (nqtot, df[0][0], diff0, 1, out_d0, 1);
149 Blas::Daxpy (nqtot, df[1][0], diff1, 1, out_d0, 1);
154 Vmath::Smul (nqtot, df[2][0], diff0, 1, out_d1, 1);
155 Blas::Daxpy (nqtot, df[3][0], diff1, 1, out_d1, 1);
160 Vmath::Smul (nqtot, df[4][0], diff0, 1, out_d2, 1);
161 Blas::Daxpy (nqtot, df[5][0], diff1, 1, out_d2, 1);
190 ASSERTL1(
false,
"input dir is out of range");
206 int nquad0 =
m_base[0]->GetNumPoints();
207 int nquad1 =
m_base[1]->GetNumPoints();
208 int nqtot = nquad0*nquad1;
217 StdTriExp::v_PhysDeriv(inarray, diff0, diff1);
226 for (
int i=0; i< 2; ++i)
229 for (
int k=0; k<(
m_geom->GetCoordim()); ++k)
231 Vmath::Vvtvp(nqtot,&df[2*k+i][0],1,&direction[k*nqtot],1,&tangmat[i][0],1,&tangmat[i][0],1);
236 Vmath::Vmul (nqtot,&tangmat[0][0],1,&diff0[0],1, &out[0], 1);
237 Vmath::Vvtvp (nqtot,&tangmat[1][0],1,&diff1[0],1, &out[0], 1, &out[0],1);
243 for (
int i=0; i< 2; ++i)
246 for (
int k=0; k<(
m_geom->GetCoordim()); ++k)
249 &direction[k*nqtot], 1,
250 &tangmat[i][0], 1, &tangmat[i][0], 1);
289 int npoints[2] = {
m_base[0]->GetNumPoints(),
290 m_base[1]->GetNumPoints()};
291 int nmodes[2] = {
m_base[0]->GetNumModes(),
292 m_base[1]->GetNumModes()};
294 fill(outarray.get(), outarray.get()+
m_ncoeffs, 0.0 );
296 if(nmodes[0] == 1 && nmodes[1] == 1)
298 outarray[0] = inarray[0];
304 for(i = 0; i < 3; i++)
311 for(i = 0; i < npoints[0]; i++)
313 physEdge[0][i] = inarray[i];
317 for(i = 0; i < npoints[1]; i++)
319 physEdge[1][i] = inarray[npoints[0]-1+i*npoints[0]];
320 physEdge[2][i] = inarray[i*npoints[0]];
328 for(i = 1; i < 3; i++)
335 for(i = 1; i < 3; i++)
340 m_base[0]->GetPointsKey(),physEdge[i]);
342 npoints[1] = npoints[0];
353 for(i = 0; i < 3; i++)
355 segexp[i]->FwdTrans_BndConstrained(physEdge[i],coeffEdge[i]);
360 for(j=0; j < nmodes[i!=0]; j++)
363 outarray[ mapArray[j] ] =
sign * coeffEdge[i][j];
368 int nInteriorDofs =
m_ncoeffs - nBoundaryDofs;
370 if (nInteriorDofs > 0) {
391 for(i = 0; i < nInteriorDofs; i++)
393 rhs[i] = tmp1[ mapArray[i] ];
396 Blas::Dgemv(
'N', nInteriorDofs, nInteriorDofs, matsys->Scale(), &((matsys->GetOwnedMatrix())->GetPtr())[0],
397 nInteriorDofs,rhs.get(),1,0.0,result.get(),1);
399 for(i = 0; i < nInteriorDofs; i++)
401 outarray[ mapArray[i] ] = result[i];
424 bool multiplybyweights)
426 int nquad0 =
m_base[0]->GetNumPoints();
427 int nquad1 =
m_base[1]->GetNumPoints();
428 int order0 =
m_base[0]->GetNumModes();
430 if(multiplybyweights)
443 inarray,outarray,wsp);
456 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
465 int nquad0 =
m_base[0]->GetNumPoints();
466 int nquad1 =
m_base[1]->GetNumPoints();
467 int nqtot = nquad0*nquad1;
468 int nmodes0 =
m_base[0]->GetNumModes();
469 int wspsize = max(max(nqtot,
m_ncoeffs),nquad1*nmodes0);
499 ASSERTL1((dir==0)||(dir==1)||(dir==2),
"Invalid direction.");
501 "Invalid direction.");
503 int nquad0 =
m_base[0]->GetNumPoints();
504 int nquad1 =
m_base[1]->GetNumPoints();
505 int nqtot = nquad0*nquad1;
506 int nmodes0 =
m_base[0]->GetNumModes();
507 int wspsize = max(max(nqtot,
m_ncoeffs),nquad1*nmodes0);
524 for (
int i = 0; i < nquad1; ++i)
526 gfac0[i] = 2.0/(1-z1[i]);
528 for (
int i = 0; i < nquad0; ++i)
530 gfac1[i] = 0.5*(1+z0[i]);
533 for (
int i = 0; i < nquad1; ++i)
535 Vmath::Smul(nquad0, gfac0[i], &inarray[0]+i*nquad0, 1,
536 &tmp0[0]+i*nquad0, 1);
539 for (
int i = 0; i < nquad1; ++i)
541 Vmath::Vmul(nquad0, &gfac1[0], 1, &tmp0[0]+i*nquad0, 1,
542 &tmp1[0]+i*nquad0, 1);
547 Vmath::Vmul(nqtot,&df[2*dir][0], 1,&tmp0[0], 1,&tmp0[0],1);
548 Vmath::Vmul(nqtot,&df[2*dir+1][0],1,&tmp1[0], 1,&tmp1[0],1);
549 Vmath::Vmul(nqtot,&df[2*dir+1][0],1,&inarray[0],1,&tmp2[0],1);
553 Vmath::Smul(nqtot, df[2*dir][0], tmp0, 1, tmp0, 1);
554 Vmath::Smul(nqtot, df[2*dir+1][0], tmp1, 1, tmp1, 1);
555 Vmath::Smul(nqtot, df[2*dir+1][0], inarray, 1, tmp2, 1);
586 ASSERTL1(
false,
"input dir is out of range");
595 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
621 int nquad0 =
m_base[0]->GetNumPoints();
622 int nquad1 =
m_base[1]->GetNumPoints();
623 int nqtot = nquad0*nquad1;
624 int nmodes0 =
m_base[0]->GetNumModes();
625 int wspsize = max(max(nqtot,
m_ncoeffs),nquad1*nmodes0);
641 for(i = 0; i < nquad1; ++i)
643 gfac0[i] = 2.0/(1-z1[i]);
645 for(i = 0; i < nquad0; ++i)
647 gfac1[i] = 0.5*(1+z0[i]);
649 for(i = 0; i < nquad1; ++i)
651 Vmath::Smul(nquad0, gfac0[i], &inarray[0] + i*nquad0, 1,
652 &tmp0[0] + i*nquad0, 1);
654 for(i = 0; i < nquad1; ++i)
657 &tmp0[0] + i*nquad0, 1,
658 &tmp1[0] + i*nquad0, 1);
665 Vmath::Vmul(nqtot, &dfdir[0][0], 1, &tmp0[0], 1, &tmp0[0], 1);
666 Vmath::Vmul(nqtot, &dfdir[1][0], 1, &tmp1[0], 1, &tmp1[0], 1);
667 Vmath::Vmul(nqtot, &dfdir[1][0], 1, &inarray[0], 1, &tmp2[0], 1);
669 Vmath::Vadd(nqtot, &tmp0[0], 1, &tmp1[0], 1, &tmp1[0], 1);
679 tmp2, outarray, tmp0);
690 int nq =
m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints();
700 &normals[1][0],1,&Fy[0],1,&Fn[0],1);
701 Vmath::Vvtvp (nq,&normals[2][0],1,&Fz[0],1,&Fn[0],1,&Fn[0],1);
706 normals[1][0],&Fy[0],1,&Fn[0],1);
707 Vmath::Svtvp (nq,normals[2][0],&Fz[0],1,&Fn[0],1,&Fn[0],1);
725 m_base[1]->GetBasisKey());
731 2,
m_base[0]->GetPointsKey());
733 2,
m_base[1]->GetPointsKey());
744 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 &&
745 Lcoords[1] >= -1.0 && Lcoords[1] <=1.0,
746 "Local coordinates are not in region [-1,1]");
750 for(i = 0; i <
m_geom->GetCoordim(); ++i)
752 coords[i] =
m_geom->GetCoord(i,Lcoords);
775 return StdTriExp::v_PhysEvaluate(Lcoord,physvals);
783 m_geom->GetLocCoords(coord,Lcoord);
785 return StdTriExp::v_PhysEvaluate(Lcoord, physvals);
796 int nquad0 =
m_base[0]->GetNumPoints();
797 int nquad1 =
m_base[1]->GetNumPoints();
804 Vmath::Vcopy(nquad0, &(inarray[0]), 1, &(outarray[0]), 1);
808 nquad0, &(outarray[0]), 1);
811 Vmath::Vcopy(nquad1, &(inarray[0]), nquad0, &(outarray[0]), 1);
814 ASSERTL0(
false,
"edge value (< 3) is out of range");
818 ASSERTL1(EdgeExp->GetBasis(0)->GetPointsType()
820 "Edge expansion should be GLL");
823 if(
m_base[edge?1:0]->GetPointsKey() != EdgeExp->GetBasis(0)->GetPointsKey())
831 EdgeExp->GetBasis(0)->GetPointsKey(),
854 boost::ignore_unused(edge, inarray, outarray);
856 "Routine not implemented for triangular elements");
863 boost::ignore_unused(edge, outarray);
865 "Routine not implemented for triangular elements");
874 int nquad0 =
m_base[0]->GetNumPoints();
875 int nquad1 =
m_base[1]->GetNumPoints();
882 for (
int i = 0; i < nquad0; ++i)
889 for (
int i = 0; i < nquad1; ++i)
891 outarray[i] = (nquad0-1) + i * nquad0;
896 for (
int i = 0; i < nquad1; ++i)
898 outarray[i] = i*nquad0;
902 ASSERTL0(
false,
"edge value (< 3) is out of range");
915 for(i = 0; i < ptsKeys.size(); ++i)
928 int nqe =
m_base[0]->GetNumPoints();
933 for (i = 0; i < dim; ++i)
959 Vmath::Fill(nqe,df[2*i+1][0] + df[2*i][0],normal[i],1);
969 ASSERTL0(
false,
"Edge is out of range (edge < 3)");
976 fac += normal[i][0]*normal[i][0];
991 int nquad0 = ptsKeys[0].GetNumPoints();
992 int nquad1 = ptsKeys[1].GetNumPoints();
1005 for(j = 0; j < nquad0; ++j)
1007 edgejac[j] = jac[j];
1010 normals[i*nquad0+j] = -df[2*i+1][j]*edgejac[j];
1013 from_key = ptsKeys[0];
1016 for(j = 0; j < nquad1; ++j)
1018 edgejac[j] = jac[nquad0*j+nquad0-1];
1021 normals[i*nquad1+j] = (df[2*i][nquad0*j + nquad0-1] + df[2*i+1][nquad0*j + nquad0-1])*edgejac[j];
1024 from_key = ptsKeys[1];
1027 for(j = 0; j < nquad1; ++j)
1029 edgejac[j] = jac[nquad0*j];
1032 normals[i*nquad1+j] = -df[2*i][nquad0*j]*edgejac[j];
1035 from_key = ptsKeys[1];
1038 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1060 Vmath::Vvtvp(nqe,normal[i],1, normal[i],1,work,1,work,1);
1087 return m_geom->GetCoordim();
1093 const std::vector<unsigned int > &nummodes,
1094 const int mode_offset,
1096 std::vector<LibUtilities::BasisType> &fromType)
1098 boost::ignore_unused(fromType);
1100 int data_order0 = nummodes[mode_offset];
1101 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
1102 int data_order1 = nummodes[mode_offset+1];
1103 int order1 =
m_base[1]->GetNumModes();
1104 int fillorder1 = min(order1,data_order1);
1117 "Extraction routine not set up for this basis");
1120 for(i = 0; i < fillorder0; ++i)
1122 Vmath::Vcopy(fillorder1-i,&data[cnt],1,&coeffs[cnt1],1);
1123 cnt += data_order1-i;
1129 ASSERTL0(
false,
"basis is either not set up or not hierarchicial");
1141 ASSERTL1(dir >= 0 &&dir <= 1,
"input dir is out of range");
1167 returnval = StdTriExp::v_GenMatrix(mkey);
1182 return tmp->GetStdMatrix(mkey);
1272 int rows = deriv0.GetRows();
1273 int cols = deriv1.GetColumns();
1276 (*WeakDeriv) = df[2*dir][0]*deriv0 + df[2*dir+1][0]*deriv1;
1343 int rows = derivxi.GetRows();
1344 int cols = deriveta.GetColumns();
1349 (*WeakDirDeriv) = derivxi + deriveta;
1363 (*WeakDirDeriv) = (*WeakDirDeriv) + (*DiveMassmat);
1397 int rows = lap00.GetRows();
1398 int cols = lap00.GetColumns();
1402 (*lap) = gmat[0][0] * lap00 +
1403 gmat[1][0] * (lap01 +
Transpose(lap01)) +
1426 int rows = LapMat.GetRows();
1427 int cols = LapMat.GetColumns();
1432 (*helm) = LapMat + factor*MassMat;
1493 int rows = stdiprod0.GetRows();
1494 int cols = stdiprod1.GetColumns();
1497 (*mat) = df[2*dir][0]*stdiprod0 + df[2*dir+1][0]*stdiprod1;
1550 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1551 unsigned int exp_size[] = {nbdry,nint};
1552 unsigned int nblks = 2;
1563 goto UseLocRegionsMatrix;
1568 goto UseStdRegionsMatrix;
1573 goto UseLocRegionsMatrix;
1575 UseStdRegionsMatrix:
1590 UseLocRegionsMatrix:
1608 for(i = 0; i < nbdry; ++i)
1610 for(j = 0; j < nbdry; ++j)
1612 (*A)(i,j) = mat(bmap[i],bmap[j]);
1615 for(j = 0; j < nint; ++j)
1617 (*B)(i,j) = mat(bmap[i],imap[j]);
1621 for(i = 0; i < nint; ++i)
1623 for(j = 0; j < nbdry; ++j)
1625 (*C)(i,j) = mat(imap[i],bmap[j]);
1628 for(j = 0; j < nint; ++j)
1630 (*D)(i,j) = mat(imap[i],imap[j]);
1639 (*A) = (*A) - (*B)*(*C);
1678 StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
1695 StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,mkey);
1704 StdExpansion::WeakDerivMatrixOp_MatFree(i,inarray,outarray,mkey);
1712 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(inarray,outarray,mkey);
1720 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(inarray,outarray,mkey);
1738 if(inarray.get() == outarray.get())
1744 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1749 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1764 int nquad0 =
m_base[0]->GetNumPoints();
1765 int nquad1 =
m_base[1]->GetNumPoints();
1766 int nqtot = nquad0*nquad1;
1767 int nmodes0 =
m_base[0]->GetNumModes();
1768 int nmodes1 =
m_base[1]->GetNumModes();
1769 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
1772 "Workspace is of insufficient size.");
1787 StdExpansion2D::PhysTensorDeriv(inarray,wsp1,wsp2);
1793 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp1[0],1,&metric01[0],1,&wsp2[0],1,&wsp0[0],1);
1794 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp1[0],1,&metric11[0],1,&wsp2[0],1,&wsp2[0],1);
1817 const unsigned int dim = 2;
1826 for (i = 0; i < dim; ++i)
1828 for (j = i; j < dim; ++j)
1836 const unsigned int nquad0 =
m_base[0]->GetNumPoints();
1837 const unsigned int nquad1 =
m_base[1]->GetNumPoints();
1841 for(i = 0; i < nquad1; i++)
1843 Blas::Dscal(nquad0,2.0/(1-z1[i]),&dEta_dXi[0][0]+i*nquad0,1);
1844 Blas::Dscal(nquad0,2.0/(1-z1[i]),&dEta_dXi[1][0]+i*nquad0,1);
1846 for(i = 0; i < nquad0; i++)
1848 Blas::Dscal(nquad1,0.5*(1+z0[i]),&dEta_dXi[1][0]+i,nquad0);
1855 Vmath::Smul (nqtot,df[0][0],&dEta_dXi[0][0],1,&tmp[0],1);
1856 Vmath::Svtvp(nqtot,df[1][0],&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1862 Vmath::Smul (nqtot,df[2][0],&dEta_dXi[0][0],1,&tmp[0],1);
1863 Vmath::Svtvp(nqtot,df[3][0],&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1870 Vmath::Smul (nqtot,df[4][0],&dEta_dXi[0][0],1,&tmp[0],1);
1871 Vmath::Svtvp(nqtot,df[5][0],&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1877 NekDouble g2 = df[1][0]*df[1][0] + df[3][0]*df[3][0];
1880 g2 += df[5][0]*df[5][0];
1887 Vmath::Vmul (nqtot,&df[0][0],1,&dEta_dXi[0][0],1,&tmp[0],1);
1888 Vmath::Vvtvp(nqtot,&df[1][0],1,&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1895 Vmath::Vmul (nqtot,&df[2][0],1,&dEta_dXi[0][0],1,&tmp[0],1);
1896 Vmath::Vvtvp(nqtot,&df[3][0],1,&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1904 Vmath::Vmul (nqtot,&df[4][0],1,&dEta_dXi[0][0],1,&tmp[0],1);
1905 Vmath::Vvtvp(nqtot,&df[5][0],1,&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1913 for (
unsigned int i = 0; i < dim; ++i)
1915 for (
unsigned int j = i; j < dim; ++j)
1941 int n_coeffs = inarray.size();
1942 int nquad0 =
m_base[0]->GetNumPoints();
1943 int nquad1 =
m_base[1]->GetNumPoints();
1944 int nqtot = nquad0*nquad1;
1945 int nmodes0 =
m_base[0]->GetNumModes();
1946 int nmodes1 =
m_base[1]->GetNumModes();
1947 int numMin2 = nmodes0, i;
1981 m_TriExp ->BwdTrans(inarray,phys_tmp);
1982 m_OrthoTriExp->FwdTrans(phys_tmp, coeff);
1984 for (i = 0; i < n_coeffs; i++)
1989 numMin += numMin2 - 1;
1994 m_OrthoTriExp->BwdTrans(coeff,phys_tmp);
1995 m_TriExp ->FwdTrans(phys_tmp, outarray);
2021 StdTriExp::v_SVVLaplacianFilter( array, mkey);
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
#define sign(a, b)
return the sign(b)*a
Describes the specification for a Basis.
Defines a specification for a set of points.
unsigned int GetNumPoints() const
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
SpatialDomains::Geometry2DSharedPtr GetGeom2D() const
std::map< int, NormalVector > m_edgeNormals
std::map< int, Array< OneD, NekDouble > > m_elmtBndNormDirElmtLen
the element length in each element boundary(Vertex, edge or face) normal direction calculated based o...
SpatialDomains::GeometrySharedPtr GetGeom() const
SpatialDomains::GeometrySharedPtr m_geom
ExpansionSharedPtr GetLeftAdjacentElementExp() const
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
void ComputeLaplacianMetric()
void ComputeGmatcdotMF(const Array< TwoD, const NekDouble > &df, const Array< OneD, const NekDouble > &direction, Array< OneD, Array< OneD, NekDouble > > &dfdir)
int GetLeftAdjacentElementTrace() const
void ComputeQuadratureMetric()
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
StdRegions::Orientation GetTraceOrient(int trace)
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
virtual void v_ComputeTraceNormal(const int edge)
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
virtual void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &out)
Physical derivative along a direction vector.
virtual void v_NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, const Array< OneD, const NekDouble > &Fz, Array< OneD, NekDouble > &outarray)
virtual void v_GetTracePhysMap(const int edge, Array< OneD, int > &outarray)
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
virtual void v_WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual DNekScalMatSharedPtr v_GetLocMatrix(const MatrixKey &mkey)
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual const LibUtilities::BasisSharedPtr & v_GetBasis(int dir) const
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix(const MatrixKey &mkey)
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=NullNekDouble1DArray)
Calculate the derivative of the physical points.
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
virtual int v_GetCoordim()
virtual int v_GetNumPoints(const int dir) const
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
virtual void v_GetEdgeInterpVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual StdRegions::Orientation v_GetTraceOrient(int edge)
virtual StdRegions::StdExpansionSharedPtr v_GetStdExp(void) const
virtual void v_GetTraceQFactors(const int edge, Array< OneD, NekDouble > &outarray)
void v_DropLocStaticCondMatrix(const MatrixKey &mkey)
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
virtual void v_MassLevelCurvatureMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_ComputeLaplacianMetric()
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
virtual void v_SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)
virtual void v_IProductWRTBase_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Transform a given function from physical quadrature space to coefficient space.
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[p]*base1[pq] and put into ou...
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 NekDouble v_StdPhysEvaluate(const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
virtual DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_GetTracePhysVals(const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
virtual void v_IProductWRTDirectionalDerivBase(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual StdRegions::StdExpansionSharedPtr v_GetLinStdExp(void) const
virtual void v_IProductWRTDirectionalDerivBase_SumFac(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Directinoal Derivative in the modal space in the dir direction of varcoeffs.
virtual DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
virtual void v_GeneralMatrixOp_MatOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual void v_WeakDirectionalDerivMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_IProductWRTDerivBase_MatOp(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase_SumFac(const int dir, 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...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0=true, bool doCheckCollDir1=true)
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
void HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int NumBndryCoeffs(void) const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
const LibUtilities::PointsKeyVector GetPointsKeys() const
DNekBlkMatSharedPtr GetStdStaticCondMatrix(const StdMatrixKey &mkey)
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
void IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
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 LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void GetTraceToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
void IProductWRTDirectionalDerivBase_SumFac(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
const ConstFactorMap & GetConstFactors() const
LibUtilities::ShapeType GetShapeType() const
const VarCoeffMap & GetVarCoeffs() const
MatrixType GetMatrixType() const
const Array< OneD, const NekDouble > & GetVarCoeff(const StdRegions::VarCoeffType &coeff) const
NekDouble GetConstFactor(const ConstFactorType &factor) const
bool ConstFactorExists(const ConstFactorType &factor) const
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = A x where A[m x n].
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
int getNumberOfCoefficients(int Na)
std::shared_ptr< Basis > BasisSharedPtr
void Interp1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
this function interpolates a 1D function evaluated at the quadrature points of the basis fbasis0 to ...
std::vector< PointsKey > PointsKeyVector
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ eOrtho_A
Principle Orthogonal Functions .
@ eOrtho_B
Principle Orthogonal Functions .
@ eModified_A
Principle Modified Functions .
std::shared_ptr< SegExp > SegExpSharedPtr
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eNoGeomType
No type defined.
@ eMovingRegular
Currently unused.
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< TriGeom > TriGeomSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
@ eInvLaplacianWithUnityMean
std::shared_ptr< StdTriExp > StdTriExpSharedPtr
static ConstFactorMap NullConstFactorMap
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
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):
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.
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
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 Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/y.
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.
void Zero(int n, T *x, const int incx)
Zero vector.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Reverse(int n, const T *x, const int incx, T *y, const int incy)
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):
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
scalarT< T > sqrt(scalarT< T > in)