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);
126 if(out_d0.num_elements())
129 Vmath::Vvtvp (nqtot,df[1],1,diff1,1, out_d0, 1, out_d0,1);
132 if(out_d1.num_elements())
135 Vmath::Vvtvp (nqtot,df[3],1,diff1,1, out_d1, 1, out_d1,1);
138 if(out_d2.num_elements())
141 Vmath::Vvtvp (nqtot,df[5],1,diff1,1, out_d2, 1, out_d2,1);
146 if(out_d0.num_elements())
148 Vmath::Smul (nqtot, df[0][0], diff0, 1, out_d0, 1);
149 Blas::Daxpy (nqtot, df[1][0], diff1, 1, out_d0, 1);
152 if(out_d1.num_elements())
154 Vmath::Smul (nqtot, df[2][0], diff0, 1, out_d1, 1);
155 Blas::Daxpy (nqtot, df[3][0], diff1, 1, out_d1, 1);
158 if(out_d2.num_elements())
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");
201 if(! out.num_elements())
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 ASSERTL1((dir==0)||(dir==1)||(dir==2),
"Invalid direction.");
466 ASSERTL1((dir==2)?(
m_geom->GetCoordim()==3):
true,
"Invalid direction.");
469 int nquad0 =
m_base[0]->GetNumPoints();
470 int nquad1 =
m_base[1]->GetNumPoints();
471 int nqtot = nquad0*nquad1;
472 int nmodes0 =
m_base[0]->GetNumModes();
473 int wspsize = max(max(nqtot,
m_ncoeffs),nquad1*nmodes0);
489 for(i = 0; i < nquad1; ++i)
491 gfac0[i] = 2.0/(1-z1[i]);
493 for(i = 0; i < nquad0; ++i)
495 gfac1[i] = 0.5*(1+z0[i]);
498 for(i = 0; i < nquad1; ++i)
500 Vmath::Smul(nquad0,gfac0[i],&inarray[0]+i*nquad0,1,&tmp0[0]+i*nquad0,1);
503 for(i = 0; i < nquad1; ++i)
505 Vmath::Vmul(nquad0,&gfac1[0],1,&tmp0[0]+i*nquad0,1,&tmp1[0]+i*nquad0,1);
510 Vmath::Vmul(nqtot,&df[2*dir][0], 1,&tmp0[0], 1,&tmp0[0],1);
511 Vmath::Vmul(nqtot,&df[2*dir+1][0],1,&tmp1[0], 1,&tmp1[0],1);
512 Vmath::Vmul(nqtot,&df[2*dir+1][0],1,&inarray[0],1,&tmp2[0],1);
516 Vmath::Smul(nqtot, df[2*dir][0], tmp0, 1, tmp0, 1);
517 Vmath::Smul(nqtot, df[2*dir+1][0], tmp1, 1, tmp1, 1);
518 Vmath::Smul(nqtot, df[2*dir+1][0], inarray, 1, tmp2, 1);
557 ASSERTL1(
false,
"input dir is out of range");
566 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
592 int nquad0 =
m_base[0]->GetNumPoints();
593 int nquad1 =
m_base[1]->GetNumPoints();
594 int nqtot = nquad0*nquad1;
595 int nmodes0 =
m_base[0]->GetNumModes();
596 int wspsize = max(max(nqtot,
m_ncoeffs),nquad1*nmodes0);
612 for(i = 0; i < nquad1; ++i)
614 gfac0[i] = 2.0/(1-z1[i]);
616 for(i = 0; i < nquad0; ++i)
618 gfac1[i] = 0.5*(1+z0[i]);
620 for(i = 0; i < nquad1; ++i)
622 Vmath::Smul(nquad0, gfac0[i], &inarray[0] + i*nquad0, 1,
623 &tmp0[0] + i*nquad0, 1);
625 for(i = 0; i < nquad1; ++i)
628 &tmp0[0] + i*nquad0, 1,
629 &tmp1[0] + i*nquad0, 1);
636 Vmath::Vmul(nqtot, &dfdir[0][0], 1, &tmp0[0], 1, &tmp0[0], 1);
637 Vmath::Vmul(nqtot, &dfdir[1][0], 1, &tmp1[0], 1, &tmp1[0], 1);
638 Vmath::Vmul(nqtot, &dfdir[1][0], 1, &inarray[0], 1, &tmp2[0], 1);
640 Vmath::Vadd(nqtot, &tmp0[0], 1, &tmp1[0], 1, &tmp1[0], 1);
650 tmp2, outarray, tmp0);
661 int nq =
m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints();
671 &normals[1][0],1,&Fy[0],1,&Fn[0],1);
672 Vmath::Vvtvp (nq,&normals[2][0],1,&Fz[0],1,&Fn[0],1,&Fn[0],1);
677 normals[1][0],&Fy[0],1,&Fn[0],1);
678 Vmath::Svtvp (nq,normals[2][0],&Fz[0],1,&Fn[0],1,&Fn[0],1);
696 m_base[1]->GetBasisKey());
702 2,
m_base[0]->GetPointsKey());
704 2,
m_base[1]->GetPointsKey());
715 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 &&
716 Lcoords[1] >= -1.0 && Lcoords[1] <=1.0,
717 "Local coordinates are not in region [-1,1]");
721 for(i = 0; i <
m_geom->GetCoordim(); ++i)
723 coords[i] =
m_geom->GetCoord(i,Lcoords);
746 return StdTriExp::v_PhysEvaluate(Lcoord,physvals);
754 m_geom->GetLocCoords(coord,Lcoord);
756 return StdTriExp::v_PhysEvaluate(Lcoord, physvals);
767 boost::ignore_unused(orient);
776 int nquad0 =
m_base[0]->GetNumPoints();
777 int nquad1 =
m_base[1]->GetNumPoints();
802 -nquad0, &(outarray[0]),1);
809 -nquad0,&(outarray[0]),1);
818 ASSERTL0(
false,
"edge value (< 3) is out of range");
829 int nquad0 =
m_base[0]->GetNumPoints();
830 int nquad1 =
m_base[1]->GetNumPoints();
837 Vmath::Vcopy(nquad0, &(inarray[0]), 1, &(outarray[0]), 1);
841 nquad0, &(outarray[0]), 1);
844 Vmath::Vcopy(nquad1, &(inarray[0]), nquad0, &(outarray[0]), 1);
847 ASSERTL0(
false,
"edge value (< 3) is out of range");
851 ASSERTL1(EdgeExp->GetBasis(0)->GetPointsType()
853 "Edge expansion should be GLL");
856 if(
m_base[edge?1:0]->GetPointsKey() != EdgeExp->GetBasis(0)->GetPointsKey())
864 EdgeExp->GetBasis(0)->GetPointsKey(),
884 boost::ignore_unused(edge, inarray, outarray);
886 "Routine not implemented for triangular elements");
893 boost::ignore_unused(edge, outarray);
895 "Routine not implemented for triangular elements");
904 int nquad0 =
m_base[0]->GetNumPoints();
905 int nquad1 =
m_base[1]->GetNumPoints();
912 for (
int i = 0; i < nquad0; ++i)
919 for (
int i = 0; i < nquad1; ++i)
921 outarray[i] = (nquad0-1) + i * nquad0;
926 for (
int i = 0; i < nquad1; ++i)
928 outarray[i] = i*nquad0;
932 ASSERTL0(
false,
"edge value (< 3) is out of range");
945 for(i = 0; i < ptsKeys.size(); ++i)
958 int nqe =
m_base[0]->GetNumPoints();
963 for (i = 0; i < dim; ++i)
984 Vmath::Fill(nqe,df[2*i+1][0] + df[2*i][0],normal[i],1);
994 ASSERTL0(
false,
"Edge is out of range (edge < 3)");
1001 fac += normal[i][0]*normal[i][0];
1003 fac = 1.0/sqrt(fac);
1013 int nquad0 = ptsKeys[0].GetNumPoints();
1014 int nquad1 = ptsKeys[1].GetNumPoints();
1027 for(j = 0; j < nquad0; ++j)
1029 edgejac[j] = jac[j];
1032 normals[i*nquad0+j] = -df[2*i+1][j]*edgejac[j];
1035 from_key = ptsKeys[0];
1038 for(j = 0; j < nquad1; ++j)
1040 edgejac[j] = jac[nquad0*j+nquad0-1];
1043 normals[i*nquad1+j] = (df[2*i][nquad0*j + nquad0-1] + df[2*i+1][nquad0*j + nquad0-1])*edgejac[j];
1046 from_key = ptsKeys[1];
1049 for(j = 0; j < nquad1; ++j)
1051 edgejac[j] = jac[nquad0*j];
1054 normals[i*nquad1+j] = -df[2*i][nquad0*j]*edgejac[j];
1057 from_key = ptsKeys[1];
1060 ASSERTL0(
false,
"edge is out of range (edge < 3)");
1082 Vmath::Vvtvp(nqe,normal[i],1, normal[i],1,work,1,work,1);
1107 return m_geom->GetCoordim();
1113 const std::vector<unsigned int > &nummodes,
1114 const int mode_offset,
1116 std::vector<LibUtilities::BasisType> &fromType)
1118 boost::ignore_unused(fromType);
1120 int data_order0 = nummodes[mode_offset];
1121 int fillorder0 = min(
m_base[0]->GetNumModes(),data_order0);
1122 int data_order1 = nummodes[mode_offset+1];
1123 int order1 =
m_base[1]->GetNumModes();
1124 int fillorder1 = min(order1,data_order1);
1135 "Extraction routine not set up for this basis");
1138 for(i = 0; i < fillorder0; ++i)
1140 Vmath::Vcopy(fillorder1-i,&data[cnt],1,&coeffs[cnt1],1);
1141 cnt += data_order1-i;
1147 ASSERTL0(
false,
"basis is either not set up or not hierarchicial");
1159 ASSERTL1(dir >= 0 &&dir <= 1,
"input dir is out of range");
1185 returnval = StdTriExp::v_GenMatrix(mkey);
1200 return tmp->GetStdMatrix(mkey);
1290 int rows = deriv0.GetRows();
1291 int cols = deriv1.GetColumns();
1294 (*WeakDeriv) = df[2*dir][0]*deriv0 + df[2*dir+1][0]*deriv1;
1361 int rows = derivxi.GetRows();
1362 int cols = deriveta.GetColumns();
1367 (*WeakDirDeriv) = derivxi + deriveta;
1381 (*WeakDirDeriv) = (*WeakDirDeriv) + (*DiveMassmat);
1415 int rows = lap00.GetRows();
1416 int cols = lap00.GetColumns();
1420 (*lap) = gmat[0][0] * lap00 +
1421 gmat[1][0] * (lap01 +
Transpose(lap01)) +
1444 int rows = LapMat.GetRows();
1445 int cols = LapMat.GetColumns();
1450 (*helm) = LapMat + factor*MassMat;
1511 int rows = stdiprod0.GetRows();
1512 int cols = stdiprod1.GetColumns();
1515 (*mat) = df[2*dir][0]*stdiprod0 + df[2*dir+1][0]*stdiprod1;
1568 unsigned int nint = (
unsigned int)(
m_ncoeffs - nbdry);
1569 unsigned int exp_size[] = {nbdry,nint};
1570 unsigned int nblks = 2;
1581 goto UseLocRegionsMatrix;
1586 goto UseStdRegionsMatrix;
1591 goto UseLocRegionsMatrix;
1593 UseStdRegionsMatrix:
1608 UseLocRegionsMatrix:
1626 for(i = 0; i < nbdry; ++i)
1628 for(j = 0; j < nbdry; ++j)
1630 (*A)(i,j) = mat(bmap[i],bmap[j]);
1633 for(j = 0; j < nint; ++j)
1635 (*B)(i,j) = mat(bmap[i],imap[j]);
1639 for(i = 0; i < nint; ++i)
1641 for(j = 0; j < nbdry; ++j)
1643 (*C)(i,j) = mat(imap[i],bmap[j]);
1646 for(j = 0; j < nint; ++j)
1648 (*D)(i,j) = mat(imap[i],imap[j]);
1657 (*A) = (*A) - (*B)*(*C);
1696 StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
1713 StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,mkey);
1722 StdExpansion::WeakDerivMatrixOp_MatFree(i,inarray,outarray,mkey);
1730 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(inarray,outarray,mkey);
1738 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(inarray,outarray,mkey);
1756 if(inarray.get() == outarray.get())
1762 m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1767 m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1782 int nquad0 =
m_base[0]->GetNumPoints();
1783 int nquad1 =
m_base[1]->GetNumPoints();
1784 int nqtot = nquad0*nquad1;
1785 int nmodes0 =
m_base[0]->GetNumModes();
1786 int nmodes1 =
m_base[1]->GetNumModes();
1787 int wspsize = max(max(max(nqtot,
m_ncoeffs),nquad1*nmodes0),nquad0*nmodes1);
1789 ASSERTL1(wsp.num_elements() >= 3*wspsize,
1790 "Workspace is of insufficient size.");
1805 StdExpansion2D::PhysTensorDeriv(inarray,wsp1,wsp2);
1811 Vmath::Vvtvvtp(nqtot,&metric00[0],1,&wsp1[0],1,&metric01[0],1,&wsp2[0],1,&wsp0[0],1);
1812 Vmath::Vvtvvtp(nqtot,&metric01[0],1,&wsp1[0],1,&metric11[0],1,&wsp2[0],1,&wsp2[0],1);
1835 const unsigned int dim = 2;
1844 for (i = 0; i < dim; ++i)
1846 for (j = i; j < dim; ++j)
1854 const unsigned int nquad0 =
m_base[0]->GetNumPoints();
1855 const unsigned int nquad1 =
m_base[1]->GetNumPoints();
1859 for(i = 0; i < nquad1; i++)
1861 Blas::Dscal(nquad0,2.0/(1-z1[i]),&dEta_dXi[0][0]+i*nquad0,1);
1862 Blas::Dscal(nquad0,2.0/(1-z1[i]),&dEta_dXi[1][0]+i*nquad0,1);
1864 for(i = 0; i < nquad0; i++)
1866 Blas::Dscal(nquad1,0.5*(1+z0[i]),&dEta_dXi[1][0]+i,nquad0);
1873 Vmath::Smul (nqtot,df[0][0],&dEta_dXi[0][0],1,&tmp[0],1);
1874 Vmath::Svtvp(nqtot,df[1][0],&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1880 Vmath::Smul (nqtot,df[2][0],&dEta_dXi[0][0],1,&tmp[0],1);
1881 Vmath::Svtvp(nqtot,df[3][0],&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1888 Vmath::Smul (nqtot,df[4][0],&dEta_dXi[0][0],1,&tmp[0],1);
1889 Vmath::Svtvp(nqtot,df[5][0],&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1895 NekDouble g2 = df[1][0]*df[1][0] + df[3][0]*df[3][0];
1898 g2 += df[5][0]*df[5][0];
1905 Vmath::Vmul (nqtot,&df[0][0],1,&dEta_dXi[0][0],1,&tmp[0],1);
1906 Vmath::Vvtvp(nqtot,&df[1][0],1,&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1913 Vmath::Vmul (nqtot,&df[2][0],1,&dEta_dXi[0][0],1,&tmp[0],1);
1914 Vmath::Vvtvp(nqtot,&df[3][0],1,&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1922 Vmath::Vmul (nqtot,&df[4][0],1,&dEta_dXi[0][0],1,&tmp[0],1);
1923 Vmath::Vvtvp(nqtot,&df[5][0],1,&dEta_dXi[1][0],1,&tmp[0],1,&tmp[0],1);
1931 for (
unsigned int i = 0; i < dim; ++i)
1933 for (
unsigned int j = i; j < dim; ++j)
1959 int n_coeffs = inarray.num_elements();
1960 int nquad0 =
m_base[0]->GetNumPoints();
1961 int nquad1 =
m_base[1]->GetNumPoints();
1962 int nqtot = nquad0*nquad1;
1963 int nmodes0 =
m_base[0]->GetNumModes();
1964 int nmodes1 =
m_base[1]->GetNumModes();
1965 int numMin2 = nmodes0, i;
1999 m_TriExp ->BwdTrans(inarray,phys_tmp);
2000 m_OrthoTriExp->FwdTrans(phys_tmp, coeff);
2002 for (i = 0; i < n_coeffs; i++)
2007 numMin += numMin2 - 1;
2012 m_OrthoTriExp->BwdTrans(coeff,phys_tmp);
2013 m_TriExp ->FwdTrans(phys_tmp, outarray);
2039 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
Expansion3DSharedPtr GetLeftAdjacentElementExp() const
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
SpatialDomains::Geometry2DSharedPtr GetGeom2D() const
std::map< int, StdRegions::NormalVector > m_edgeNormals
int GetLeftAdjacentElementFace() const
SpatialDomains::GeometrySharedPtr GetGeom() const
SpatialDomains::GeometrySharedPtr m_geom
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)
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)
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
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_GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
virtual void v_GetEdgePhysVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Extract the physical values along edge edge from inarray into outarray following the local edge orien...
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::StdExpansionSharedPtr v_GetStdExp(void) const
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 StdRegions::Orientation v_GetEorient(int edge)
virtual void v_GetEdgeQFactors(const int edge, Array< OneD, NekDouble > &outarray)
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 void v_ComputeEdgeNormal(const int edge)
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 void v_GetEdgePhysMap(const int edge, Array< OneD, int > &outarray)
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_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)
StdRegions::Orientation GetEorient(int edge)
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)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
void GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1)
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
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs
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*y.
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.