35 #include <boost/core/ignore_unused.hpp>
52 namespace LocalRegions
55 : StdExpansion(),
Expansion(pGeom), StdExpansion2D()
65 "Geometric information is not set up");
100 "Need to specify eFactorGJP to construct "
101 "a HelmholtzGJP matrix");
105 factor /= MassMat.Scale();
107 int ntot = MassMat.GetRows() * MassMat.GetColumns();
110 MassMat.GetRawPtr(), 1, &NDTraceMat->GetPtr()[0], 1);
113 MassMat.Scale(), NDTraceMat);
173 int rows = deriv0.GetRows();
174 int cols = deriv1.GetColumns();
179 df[2 * dir][0] * deriv0 + df[2 * dir + 1][0] * deriv1;
245 int rows = derivxi.GetRows();
246 int cols = deriveta.GetColumns();
251 (*WeakDirDeriv) = derivxi + deriveta;
263 (*WeakDirDeriv) = (*WeakDirDeriv) + (*DiveMassmat);
299 int rows = lap00.GetRows();
300 int cols = lap00.GetColumns();
305 (*lap) = gmat[0][0] * lap00 +
306 gmat[1][0] * (lap01 +
Transpose(lap01)) +
331 int rows = LapMat.GetRows();
332 int cols = LapMat.GetColumns();
338 (*helm) = LapMat + factor * MassMat;
354 "Need to specify eFactorGJP to construct "
355 "a HelmholtzGJP matrix");
359 factor /= HelmMat.Scale();
361 int ntot = HelmMat.GetRows() * HelmMat.GetColumns();
364 HelmMat.GetRawPtr(), 1, &NDTraceMat->GetPtr()[0], 1);
367 HelmMat.Scale(), NDTraceMat);
424 int rows = stdiprod0.GetRows();
425 int cols = stdiprod1.GetColumns();
430 df[2 * dir][0] * stdiprod0 + df[2 * dir + 1][0] * stdiprod1;
455 "Matrix only setup for quad elements currently");
461 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
463 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
511 for (
int i = 0; i < nedges; ++i)
517 if (edgeExp->GetRightAdjacentElementExp())
519 if (edgeExp->GetRightAdjacentElementExp()
521 ->GetGlobalID() ==
GetGeom()->GetGlobalID())
533 int nquad_e = min(EdgeExp->GetNumPoints(0),
int(normals[0].size()));
535 int nEdgePts = EdgeExp->GetTotPoints();
537 Vmath::Vmul(nquad_e, normals[0], 1, Fx, 1, edgePhys, 1);
538 Vmath::Vvtvp(nquad_e, normals[1], 1, Fy, 1, edgePhys, 1, edgePhys, 1);
544 if (locExp->GetRightAdjacentElementExp()->GetGeom()->GetGlobalID() ==
565 for (i = 0; i < nedges; ++i)
571 if (edgeExp->GetRightAdjacentElementExp())
573 if (edgeExp->GetRightAdjacentElementExp()
575 ->GetGlobalID() ==
GetGeom()->GetGlobalID())
589 int order_e = map->size();
591 int n_coeffs = EdgeExp->GetNcoeffs();
594 if (n_coeffs != order_e)
596 EdgeExp->FwdTrans(Fn, edgeCoeffs);
608 EdgeExp->GetBasis(0)->GetNumModes(),
609 EdgeExp->GetBasis(0)->GetPointsKey());
611 EdgeExp->GetBasis(0)->GetNumModes(),
612 EdgeExp->GetBasis(0)->GetPointsKey());
616 for (i = order_e; i < n_coeffs; i++)
625 EdgeExp->MassMatrixOp(edgeCoeffs, edgeCoeffs, masskey);
629 EdgeExp->IProductWRTBase(Fn, edgeCoeffs);
643 for (i = 0; i < order_e; ++i)
645 outarray[(*map)[i].index] += (*map)[i].sign * edgeCoeffs[i];
650 int nCoeffs0, nCoeffs1;
664 nCoeffs1 =
m_base[1]->GetNumModes();
666 for (i = 0; i < order_e; ++i)
668 for (j = 0; j < nCoeffs1; j++)
670 outarray[(*map)[i].index + j * order_e] +=
671 mat_gauss->GetPtr()[j] * (*map)[i].sign *
679 nCoeffs0 =
m_base[0]->GetNumModes();
681 for (i = 0; i < order_e; ++i)
683 for (j = 0; j < nCoeffs0; j++)
685 outarray[(*map)[i].index - j] +=
686 mat_gauss->GetPtr()[order_e - 1 - j] *
687 (*map)[i].sign * edgeCoeffs[i];
694 nCoeffs1 =
m_base[1]->GetNumModes();
696 for (i = 0; i < order_e; ++i)
698 for (j = 0; j < nCoeffs1; j++)
700 outarray[(*map)[i].index - j * order_e] +=
701 mat_gauss->GetPtr()[order_e - 1 - j] *
702 (*map)[i].sign * edgeCoeffs[i];
709 nCoeffs0 =
m_base[0]->GetNumModes();
711 for (i = 0; i < order_e; ++i)
713 for (j = 0; j < nCoeffs0; j++)
715 outarray[(*map)[i].index + j] +=
716 mat_gauss->GetPtr()[j] * (*map)[i].sign *
723 ASSERTL0(
false,
"edge value (< 3) is out of range");
736 for (i = 0; i < nedges; ++i)
738 EdgeExp[i]->SetCoeffsToOrientation(
755 int order_e, nquad_e;
759 for (e = 0; e < nedges; ++e)
761 order_e = EdgeExp[e]->GetNcoeffs();
762 nquad_e = EdgeExp[e]->GetNumPoints(0);
769 for (i = 0; i < order_e; ++i)
771 edgeCoeffs[i] = inarray[i + cnt];
775 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
797 Vmath::Vmul(nquad_e, ncdotMF_e, 1, edgePhys, 1, edgePhys, 1);
801 Vmath::Vmul(nquad_e, normals[dir], 1, edgePhys, 1, edgePhys, 1);
817 for (e = 0; e < nedges; ++e)
819 nquad_e = EdgeExp[e]->GetNumPoints(0);
825 EdgeExp[e]->BwdTrans(edgeCoeffs[e], edgePhys);
827 Vmath::Vmul(nquad_e, normals[dir], 1, edgePhys, 1, edgePhys, 1);
843 int order_e = EdgeExp->GetNcoeffs();
844 int nquad_e = EdgeExp->GetNumPoints(0);
854 StdRegions::VarCoeffMap::const_iterator x;
857 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
861 Vmath::Vmul(nquad_e, work, 1, edgePhys, 1, edgePhys, 1);
864 EdgeExp->IProductWRTBase(edgePhys, coeff);
867 for (i = 0; i < order_e; ++i)
869 outarray[map[i]] +=
sign[i] * coeff[i];
881 ASSERTL0(&inarray[0] != &outarray[0],
882 "Input and output arrays use the same memory");
889 for (e = 0; e < nedges; ++e)
891 order_e = EdgeExp[e]->GetNcoeffs();
895 Vmath::Vcopy(order_e, tmp = inarray + cnt, 1, edgeCoeffs, 1);
896 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
913 int nquad_e = EdgeExp[edge]->GetNumPoints(0);
914 int order_e = EdgeExp[edge]->GetNcoeffs();
943 StdRegions::VarCoeffMap::const_iterator x;
945 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
949 Vmath::Vmul(nquad_e, work, 1, edgePhys, 1, edgePhys, 1);
955 EdgeExp[edge]->IProductWRTBase(edgePhys, outcoeff);
957 for (i = 0; i < order_e; ++i)
959 outarray[emap[i]] +=
sign[i] * tau * outcoeff[i];
969 for (n = 0; n < coordim; ++n)
984 Vmath::Vmul(nquad_e, ncdotMF_e, 1, edgePhys, 1, inval, 1);
988 Vmath::Vmul(nquad_e, normals[n], 1, edgePhys, 1, inval, 1);
1002 EdgeExp[edge]->IProductWRTBase(inval, outcoeff);
1005 for (i = 0; i < ncoeffs; ++i)
1008 for (j = 0; j < order_e; ++j)
1010 tmpcoeff[i] += (*invMass)(i, emap[j]) *
sign[j] * outcoeff[j];
1018 v_GetMF(n, coordim, varcoeffs);
1028 Coeffs = Coeffs + Dmat * Tmpcoeff;
1032 if (varcoeffs.find(VarCoeff[n]) != varcoeffs.end())
1038 Coeffs = Coeffs + Dmat * Tmpcoeff;
1043 Coeffs = Coeffs + Dmat * Tmpcoeff;
1069 for (
unsigned int i = 0; i < EdgeExp->GetNcoeffs(); ++i)
1071 edgetmp[i] = tmp[emap[i]];
1075 EdgeExp->BwdTrans(edgetmp, outarray);
1095 "HybridDGHelmholtz matrix not set up "
1096 "for non boundary-interior expansions");
1119 DNekMat LocMat(ncoeffs, ncoeffs);
1130 StdRegions::VarCoeffMap::const_iterator x;
1132 for (i = 0; i < coordim; ++i)
1140 v_GetMF(i, shapedim, varcoeffs);
1161 Mat = Mat + Dmat * invMass *
Transpose(Dmat);
1174 Mat = Mat + DmatL * invMass *
Transpose(DmatR);
1179 Mat = Mat + Dmat * invMass *
Transpose(Dmat);
1185 Mat = Mat + lambdaval * Mass;
1188 for (i = 0; i < nedges; ++i)
1191 order_e = EdgeExp->GetNcoeffs();
1193 int nq = EdgeExp->GetNumPoints(0);
1212 for (j = 0; j < order_e; ++j)
1214 for (k = 0; k < order_e; ++k)
1216 Mat(emap[j], emap[k]) =
1217 Mat(emap[j], emap[k]) +
1255 for (i = 0; i < nedges; ++i)
1263 for (j = 0; j < nbndry; ++j)
1280 for (k = 0; k < ncoeffs; ++k)
1282 Umat(k, j) = Ulam[k];
1328 for (i = 0; i < nedges; ++i)
1350 ASSERTL0(
false,
"Direction not known");
1359 v_GetMF(dir, shapedim, varcoeffs);
1395 for (j = 0; j < nbndry; ++j)
1401 for (k = 0; k < ncoeffs; ++k)
1403 Ulam[k] = lamToU(k, j);
1421 &(Qmat.GetPtr())[0] + j * ncoeffs, 1);
1429 int order_e, nquad_e;
1434 StdRegions::VarCoeffMap::const_iterator x;
1483 for (i = 0; i < nedges; ++i)
1489 for (i = 0; i < nbndry; ++i)
1497 for (e = 0; e < nedges; ++e)
1499 order_e = EdgeExp[e]->GetNcoeffs();
1500 nquad_e = EdgeExp[e]->GetNumPoints(0);
1517 for (j = 0; j < order_e; ++j)
1519 edgeCoeffs[j] =
sign[j] * (*LamToQ[0])(emap[j], i);
1522 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1535 0, e, EdgeExp[e], normals, varcoeffs);
1536 Vmath::Vmul(nquad_e, ncdotMF, 1, edgePhys, 1, work, 1);
1540 Vmath::Vmul(nquad_e, normals[0], 1, edgePhys, 1, work,
1545 for (j = 0; j < order_e; ++j)
1547 edgeCoeffs[j] =
sign[j] * (*LamToQ[1])(emap[j], i);
1550 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1565 1, e, EdgeExp[e], normals, varcoeffs);
1566 Vmath::Vvtvp(nquad_e, ncdotMF, 1, edgePhys, 1, work, 1,
1571 Vmath::Vvtvp(nquad_e, normals[1], 1, edgePhys, 1, work,
1578 for (j = 0; j < order_e; ++j)
1580 edgeCoeffs[j] =
sign[j] * (*LamToQ[2])(emap[j], i);
1583 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1594 Vmath::Vvtvp(nquad_e, normals[2], 1, edgePhys, 1, work,
1600 for (j = 0; j < order_e; ++j)
1603 sign[j] * LamToU(emap[j], i) - lam[cnt + j];
1606 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1609 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
1612 e, EdgeExp[e], x->second, varcoeff_work);
1613 Vmath::Vmul(nquad_e, varcoeff_work, 1, edgePhys, 1,
1617 Vmath::Svtvp(nquad_e, -tau, edgePhys, 1, work, 1, work, 1);
1619 EdgeExp[e]->IProductWRTBase(work, edgeCoeffs);
1621 EdgeExp[e]->SetCoeffsToOrientation(edgedir, edgeCoeffs,
1624 for (j = 0; j < order_e; ++j)
1626 BndMat(cnt + j, i) = edgeCoeffs[j];
1642 LapMat.GetRows(), LapMat.GetColumns());
1672 for (
int d = 0; d < ncoords; ++d)
1680 for (
int t = 0; t < ntraces; ++t)
1683 tracepts[t] = traceExp[t]->GetTotPoints();
1684 maxtpts = (maxtpts > tracepts[t]) ? maxtpts : tracepts[t];
1690 for (
int t = 0; t < ntraces; ++t)
1699 PhysDeriv(phys, Deriv[0], Deriv[1], Deriv[2]);
1701 for (
int t = 0; t < ntraces; ++t)
1707 traceExp[t]->GetBasis(0)->GetBasisKey();
1708 bool DoInterp = (fromkey != tokey);
1712 for (
int d = 0; d < ncoords; ++d)
1728 tmp = dphidn[t] + i * tracepts[t], 1,
1729 tmp1 = dphidn[t] + i * tracepts[t], 1);
1734 for (
int t = 0; t < ntraces; ++t)
1736 int nt = tracepts[t];
1742 (
p == 1) ? 0.02 * h * h : 0.8 * pow(
p + 1, -4.0) * h * h;
1749 dphidn[t] + j * nt, 1, val, 1);
1751 Mat(i, j) + scale * traceExp[t]->Integral(val);
1759 for (
int j = 0; j < i; ++j)
1761 Mat(i, j) = Mat(j, i);
1768 "This matrix type cannot be generated from this class");
1805 Out_d = InvMass * Coeffs;
1820 "Not set up for non boundary-interior expansions");
1821 ASSERTL1(inoutmat->GetRows() == inoutmat->GetColumns(),
1822 "Assuming that input matrix was square");
1826 int order_e = edgeExp->GetNcoeffs();
1837 DNekScalMat &edgemat = *edgeExp->GetLocMatrix(mkey);
1851 int rows = inoutmat->GetRows();
1866 for (i = 0; i < order_e; ++i)
1868 for (j = 0; j < nbndry; ++j)
1870 if (map[i] == bmap[j])
1876 ASSERTL1(j != nbndry,
"Did not find number in map");
1886 for (i = 0; i < edge; ++i)
1891 for (i = 0; i < order_e; ++i)
1898 switch (edgeExp->GetBasis(0)->GetBasisType())
1901 reverse(map.get(), map.get() + order_e);
1904 reverse(map.get(), map.get() + order_e);
1908 swap(map[0], map[1]);
1909 for (i = 3; i < order_e; i += 2)
1917 "Edge boundary type not valid for this method");
1923 ASSERTL0(
false,
"Could not identify matrix type from dimension");
1926 for (i = 0; i < order_e; ++i)
1929 for (j = 0; j < order_e; ++j)
1932 (*inoutmat)(id1, id2) += edgemat(i, j) *
sign[i] *
sign[j];
1950 "Not set up for non boundary-interior expansions");
1953 int order_e = edgeExp->GetNcoeffs();
1964 DNekScalMat &edgemat = *edgeExp->GetLocMatrix(mkey);
1970 for (i = 0; i < order_e; ++i)
1972 vEdgeCoeffs[i] = incoeffs[map[i]] *
sign[i];
1975 vEdgeCoeffs = edgemat * vEdgeCoeffs;
1977 for (i = 0; i < order_e; ++i)
1979 coeffs[map[i]] += vEdgeCoeffs[i] *
sign[i];
1989 int nVerts, vid1, vid2, vMap1, vMap2;
1996 DNekMat &VertexMat = (*m_vertexmatrix);
1998 for (vid1 = 0; vid1 < nVerts; ++vid1)
2002 for (vid2 = 0; vid2 < nVerts; ++vid2)
2005 VertexValue = (*r_bnd)(vMap1, vMap2);
2006 VertexMat.SetValue(vid1, vid2, VertexValue);
2010 return m_vertexmatrix;
2030 map<int, int> invmap;
2031 for (j = 0; j < nBndCoeffs; ++j)
2033 invmap[bmap[j]] = j;
2049 for (n = 0; n < nEdgeCoeffs; ++n)
2051 edgemaparray[n] = invmap[maparray[n]];
2054 return edgemaparray;
2066 boost::ignore_unused(nq1);
2068 if (idmap.size() != nq0)
2076 for (
int i = 0; i < nq0; ++i)
2084 for (
int i = 0; i < nq0; ++i)
2086 idmap[i] = nq0 - 1 - i;
2091 ASSERTL0(
false,
"Unknown orientation");
2120 int nquad_e = EdgeExp_e->GetNumPoints(0);
2122 int nquad0 =
m_base[0]->GetNumPoints();
2123 int nquad1 =
m_base[1]->GetNumPoints();
2124 int nqtot = nquad0 * nquad1;
2136 StdRegions::VarCoeffMap::const_iterator MFdir;
2141 for (
int k = 0; k < coordim; k++)
2143 MFdir = varcoeffs.find(MMFCoeffs[dir * 5 + k]);
2144 tmp = MFdir->second;
2148 Vmath::Vvtvp(nquad_e, &tmp_e[0], 1, &normals[k][0], 1, &ncdotMF[0], 1,
2163 Vmath::Vmul(nq, &vec[0][0], 1, &normals[0][0], 1, &Fn[0], 1);
2164 Vmath::Vvtvp(nq, &vec[1][0], 1, &normals[1][0], 1, &Fn[0], 1, &Fn[0], 1);
2165 Vmath::Vvtvp(nq, &vec[2][0], 1, &normals[2][0], 1, &Fn[0], 1, &Fn[0], 1);
2167 return StdExpansion::Integral(Fn);
2174 int nverts = geom->GetNumVerts();
2182 *geom->
GetVertex((traceid + (nverts - 1)) % nverts);
2194 h =
sqrt(h1 * h1 - d1 * d1 / lenDx);
2199 h1 = ev1.
dist(vadj1);
2200 Dx1.
Sub(vadj1, ev1);
2203 h = (h +
sqrt(h1 * h1 - d1 * d1 / lenDx)) * 0.5;
2205 int dirn = (geom->GetDir(traceid) == 0) ? 1 : 0;
#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.
virtual void v_AddRobinTraceContribution(const int traceid, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs)
std::vector< bool > m_requireNeg
Array< OneD, NekDouble > v_GetnEdgecdotMF(const int dir, const int edge, ExpansionSharedPtr &EdgeExp_e, const Array< OneD, const Array< OneD, NekDouble >> &normals, const StdRegions::VarCoeffMap &varcoeffs)
virtual Array< OneD, NekDouble > v_GetMFDiv(const int dir, const StdRegions::VarCoeffMap &varcoeffs)
void SetTraceToGeomOrientation(Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &inout)
virtual void v_GenTraceExp(const int traceid, ExpansionSharedPtr &exp)
void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1)
virtual void v_AddEdgeNormBoundaryInt(const int edge, const ExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
virtual Array< OneD, NekDouble > v_GetMFMag(const int dir, const StdRegions::VarCoeffMap &varcoeffs)
Array< OneD, unsigned int > GetTraceInverseBoundaryMap(int eid)
virtual void v_SetUpPhysNormals(const int edge)
virtual void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p)
virtual void v_AddRobinMassMatrix(const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
virtual Array< OneD, NekDouble > v_GetMF(const int dir, const int shapedim, const StdRegions::VarCoeffMap &varcoeffs)
SpatialDomains::Geometry2DSharedPtr GetGeom2D() const
void AddHDGHelmholtzEdgeTerms(const NekDouble tau, const int edge, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &edgePhys, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
void AddNormTraceInt(const int dir, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble >> &edgeCoeffs, Array< OneD, NekDouble > &outarray)
void GetPhysEdgeVarCoeffsFromElement(const int edge, ExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &varcoeff, Array< OneD, NekDouble > &outarray)
void AddEdgeBoundaryInt(const int edge, ExpansionSharedPtr &EdgeExp, Array< OneD, NekDouble > &edgePhys, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
virtual DNekMatSharedPtr v_BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
virtual NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble >> &vec)
virtual void v_DGDeriv(const int dir, const Array< OneD, const NekDouble > &incoeffs, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble >> &edgeCoeffs, Array< OneD, NekDouble > &out_d)
void AddHDGHelmholtzTraceTerms(const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
SpatialDomains::GeometrySharedPtr GetGeom() const
SpatialDomains::GeometrySharedPtr m_geom
Array< OneD, NekDouble > v_GetMF(const int dir, const int shapedim, const StdRegions::VarCoeffMap &varcoeffs)
ExpansionSharedPtr GetLeftAdjacentElementExp() const
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
void ComputeGmatcdotMF(const Array< TwoD, const NekDouble > &df, const Array< OneD, const NekDouble > &direction, Array< OneD, Array< OneD, NekDouble >> &dfdir)
virtual void v_ComputeTraceNormal(const int id)
int GetLeftAdjacentElementTrace() const
void GetTracePhysVals(const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient=StdRegions::eNoOrientation)
Array< OneD, NekDouble > v_GetMFMag(const int dir, const StdRegions::VarCoeffMap &varcoeffs)
std::map< int, ExpansionWeakPtr > m_traceExp
Array< OneD, NekDouble > v_GetMFDiv(const int dir, const StdRegions::VarCoeffMap &varcoeffs)
void AddEdgeNormBoundaryInt(const int edge, const std::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
virtual StdRegions::Orientation v_GetTraceOrient(int trace)
ExpansionSharedPtr GetTraceExp(const int traceid)
StdRegions::Orientation GetTraceOrient(int trace)
IndexMapValuesSharedPtr GetIndexMap(const IndexMapKey &ikey)
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
void TraceNormLen(const int traceid, NekDouble &h, NekDouble &p)
const NormalVector & GetTraceNormal(const int id)
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
PointGeomSharedPtr GetVertex(int i) const
Returns vertex i of this object.
void Sub(PointGeom &a, PointGeom &b)
NekDouble dot(PointGeom &a)
retun the dot product between this and input a
NekDouble dist(PointGeom &a)
return distance between this and input a
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
void FillMode(const int mode, Array< OneD, NekDouble > &outarray)
This function fills the array outarray with the mode-th mode of the expansion.
int NumBndryCoeffs(void) const
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
const LibUtilities::PointsKeyVector GetPointsKeys() const
int NumDGBndryCoeffs(void) const
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
const LibUtilities::BasisKey GetTraceBasisKey(const int i, int k=-1) const
This function returns the basis key belonging to the i-th trace.
int GetVertexMap(const int localVertexId, bool useCoeffPacking=false)
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...
int GetNtraces() const
Returns the number of trace elements connected to this element.
int GetNverts() const
This function returns the number of vertices of the expansion domain.
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 GetTraceInteriorToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eForwards)
int GetTraceNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th trace.
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function performs the Forward transformation from physical space to coefficient space.
bool IsBoundaryInteriorExpansion()
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLess > m_stdMatrixManager
int GetBasisNumModes(const int dir) const
This function returns the number of expansion modes in the dir direction.
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
bool HasVarCoeff(const StdRegions::VarCoeffType &coeff) const
NekDouble GetConstFactor(const ConstFactorType &factor) const
bool ConstFactorExists(const ConstFactorType &factor) const
const VarCoeffMap GetVarCoeffAsMap(const VarCoeffType &coeff) const
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 ...
void InterpCoeff1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
std::vector< PointsKey > PointsKeyVector
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
@ eGLL_Lagrange
Lagrange for SEM basis .
@ eModified_A
Principle Modified Functions .
std::shared_ptr< Expansion > ExpansionSharedPtr
std::shared_ptr< IndexMapValues > IndexMapValuesSharedPtr
std::shared_ptr< Expansion1D > Expansion1DSharedPtr
@ eNoGeomType
No type defined.
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::shared_ptr< Geometry > GeometrySharedPtr
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
@ eInvLaplacianWithUnityMean
std::map< ConstFactorType, NekDouble > ConstFactorMap
static ConstFactorMap NullConstFactorMap
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
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 Neg(int n, T *x, const int incx)
Negate x = -x.
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 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 Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > sqrt(scalarT< T > in)