51 : StdExpansion(),
Expansion(pGeom), StdExpansion2D()
61 "Geometric information is not set up");
96 "Need to specify eFactorGJP to construct "
97 "a HelmholtzGJP matrix");
101 factor /= MassMat.Scale();
103 int ntot = MassMat.GetRows() * MassMat.GetColumns();
106 MassMat.GetRawPtr(), 1, &NDTraceMat->GetPtr()[0], 1);
109 MassMat.Scale(), NDTraceMat);
181 int rows = deriv0.GetRows();
182 int cols = deriv1.GetColumns();
187 df[2 * dir][0] * deriv0 + df[2 * dir + 1][0] * deriv1;
253 int rows = derivxi.GetRows();
254 int cols = deriveta.GetColumns();
259 (*WeakDirDeriv) = derivxi + deriveta;
271 (*WeakDirDeriv) = (*WeakDirDeriv) + (*DiveMassmat);
316 int rows = lap00.GetRows();
317 int cols = lap00.GetColumns();
322 (*lap) = gmat[0][0] * lap00 +
323 gmat[1][0] * (lap01 +
Transpose(lap01)) +
348 int rows = LapMat.GetRows();
349 int cols = LapMat.GetColumns();
355 (*helm) = LapMat + factor * MassMat;
371 "Need to specify eFactorGJP to construct "
372 "a HelmholtzGJP matrix");
376 factor /= HelmMat.Scale();
378 int ntot = HelmMat.GetRows() * HelmMat.GetColumns();
381 HelmMat.GetRawPtr(), 1, &NDTraceMat->GetPtr()[0], 1);
384 HelmMat.Scale(), NDTraceMat);
410 int rows = MassMat.GetRows();
411 int cols = MassMat.GetColumns();
417 (*adr) = -lambda * MassMat + AdvMat;
423 if (!massVarcoeffs.empty())
474 int rows = LapMat.GetRows();
475 int cols = LapMat.GetColumns();
481 (*adr) = LapMat - lambda * MassMat + AdvMat;
487 if (!massVarcoeffs.empty())
491 if (!lapVarcoeffs.empty())
546 "Need to specify eFactorGJP to construct "
547 "a LinearAdvectionDiffusionReactionGJP matrix");
549 int rows = LapMat.GetRows();
550 int cols = LapMat.GetColumns();
557 LapMat - lambda * MassMat + AdvMat + gjpfactor * NDTraceMat;
635 int rows = stdiprod0.GetRows();
636 int cols = stdiprod1.GetColumns();
641 df[2 * dir][0] * stdiprod0 + df[2 * dir + 1][0] * stdiprod1;
666 "Matrix only setup for quad elements currently");
672 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
674 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
722 for (
int i = 0; i < nedges; ++i)
728 if (edgeExp->GetRightAdjacentElementExp())
730 if (edgeExp->GetRightAdjacentElementExp()
732 ->GetGlobalID() ==
GetGeom()->GetGlobalID())
744 int nquad_e =
min(EdgeExp->GetNumPoints(0),
int(normals[0].size()));
746 int nEdgePts = EdgeExp->GetTotPoints();
748 Vmath::Vmul(nquad_e, normals[0], 1, Fx, 1, edgePhys, 1);
749 Vmath::Vvtvp(nquad_e, normals[1], 1, Fy, 1, edgePhys, 1, edgePhys, 1);
755 if (locExp->GetRightAdjacentElementExp()->GetGeom()->GetGlobalID() ==
776 for (i = 0; i < nedges; ++i)
782 if (edgeExp->GetRightAdjacentElementExp())
784 if (edgeExp->GetRightAdjacentElementExp()
786 ->GetGlobalID() ==
GetGeom()->GetGlobalID())
800 int order_e = map->size();
802 int n_coeffs = EdgeExp->GetNcoeffs();
805 if (n_coeffs != order_e)
807 EdgeExp->FwdTrans(Fn, edgeCoeffs);
819 EdgeExp->GetBasis(0)->GetNumModes(),
820 EdgeExp->GetBasis(0)->GetPointsKey());
822 EdgeExp->GetBasis(0)->GetNumModes(),
823 EdgeExp->GetBasis(0)->GetPointsKey());
827 for (i = order_e; i < n_coeffs; i++)
836 EdgeExp->MassMatrixOp(edgeCoeffs, edgeCoeffs, masskey);
840 EdgeExp->IProductWRTBase(Fn, edgeCoeffs);
854 for (i = 0; i < order_e; ++i)
856 outarray[(*map)[i].index] += (*map)[i].sign * edgeCoeffs[i];
861 int nCoeffs0, nCoeffs1;
875 nCoeffs1 =
m_base[1]->GetNumModes();
877 for (i = 0; i < order_e; ++i)
879 for (j = 0; j < nCoeffs1; j++)
881 outarray[(*map)[i].index + j * order_e] +=
882 mat_gauss->GetPtr()[j] * (*map)[i].sign *
890 nCoeffs0 =
m_base[0]->GetNumModes();
892 for (i = 0; i < order_e; ++i)
894 for (j = 0; j < nCoeffs0; j++)
896 outarray[(*map)[i].index - j] +=
897 mat_gauss->GetPtr()[order_e - 1 - j] *
898 (*map)[i].sign * edgeCoeffs[i];
905 nCoeffs1 =
m_base[1]->GetNumModes();
907 for (i = 0; i < order_e; ++i)
909 for (j = 0; j < nCoeffs1; j++)
911 outarray[(*map)[i].index - j * order_e] +=
912 mat_gauss->GetPtr()[order_e - 1 - j] *
913 (*map)[i].sign * edgeCoeffs[i];
920 nCoeffs0 =
m_base[0]->GetNumModes();
922 for (i = 0; i < order_e; ++i)
924 for (j = 0; j < nCoeffs0; j++)
926 outarray[(*map)[i].index + j] +=
927 mat_gauss->GetPtr()[j] * (*map)[i].sign *
934 ASSERTL0(
false,
"edge value (< 3) is out of range");
947 for (i = 0; i < nedges; ++i)
949 EdgeExp[i]->SetCoeffsToOrientation(
966 int order_e, nquad_e;
970 for (e = 0; e < nedges; ++e)
972 order_e = EdgeExp[e]->GetNcoeffs();
973 nquad_e = EdgeExp[e]->GetNumPoints(0);
980 for (i = 0; i < order_e; ++i)
982 edgeCoeffs[i] = inarray[i + cnt];
986 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1008 Vmath::Vmul(nquad_e, ncdotMF_e, 1, edgePhys, 1, edgePhys, 1);
1012 Vmath::Vmul(nquad_e, normals[dir], 1, edgePhys, 1, edgePhys, 1);
1028 for (e = 0; e < nedges; ++e)
1030 nquad_e = EdgeExp[e]->GetNumPoints(0);
1036 EdgeExp[e]->BwdTrans(edgeCoeffs[e], edgePhys);
1038 Vmath::Vmul(nquad_e, normals[dir], 1, edgePhys, 1, edgePhys, 1);
1054 int order_e = EdgeExp->GetNcoeffs();
1055 int nquad_e = EdgeExp->GetNumPoints(0);
1065 StdRegions::VarCoeffMap::const_iterator x;
1068 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
1073 Vmath::Vmul(nquad_e, work, 1, edgePhys, 1, edgePhys, 1);
1076 EdgeExp->IProductWRTBase(edgePhys, coeff);
1079 for (i = 0; i < order_e; ++i)
1081 outarray[map[i]] +=
sign[i] * coeff[i];
1093 ASSERTL0(&inarray[0] != &outarray[0],
1094 "Input and output arrays use the same memory");
1101 for (e = 0; e < nedges; ++e)
1103 order_e = EdgeExp[e]->GetNcoeffs();
1107 Vmath::Vcopy(order_e, tmp = inarray + cnt, 1, edgeCoeffs, 1);
1108 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1125 int nquad_e = EdgeExp[edge]->GetNumPoints(0);
1126 int order_e = EdgeExp[edge]->GetNcoeffs();
1155 StdRegions::VarCoeffMap::const_iterator x;
1157 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
1161 x->second.GetValue(), work);
1162 Vmath::Vmul(nquad_e, work, 1, edgePhys, 1, edgePhys, 1);
1168 EdgeExp[edge]->IProductWRTBase(edgePhys, outcoeff);
1170 for (i = 0; i < order_e; ++i)
1172 outarray[emap[i]] +=
sign[i] * tau * outcoeff[i];
1182 for (n = 0; n < coordim; ++n)
1197 Vmath::Vmul(nquad_e, ncdotMF_e, 1, edgePhys, 1, inval, 1);
1201 Vmath::Vmul(nquad_e, normals[n], 1, edgePhys, 1, inval, 1);
1215 EdgeExp[edge]->IProductWRTBase(inval, outcoeff);
1218 for (i = 0; i < ncoeffs; ++i)
1221 for (j = 0; j < order_e; ++j)
1223 tmpcoeff[i] += (*invMass)(i, emap[j]) *
sign[j] * outcoeff[j];
1231 GetMF(n, coordim, varcoeffs);
1241 Coeffs = Coeffs + Dmat * Tmpcoeff;
1245 if (varcoeffs.find(VarCoeff[n]) != varcoeffs.end())
1251 Coeffs = Coeffs + Dmat * Tmpcoeff;
1256 Coeffs = Coeffs + Dmat * Tmpcoeff;
1282 for (
unsigned int i = 0; i < EdgeExp->GetNcoeffs(); ++i)
1284 edgetmp[i] = tmp[emap[i]];
1288 EdgeExp->BwdTrans(edgetmp, outarray);
1308 "HybridDGHelmholtz matrix not set up "
1309 "for non boundary-interior expansions");
1332 DNekMat LocMat(ncoeffs, ncoeffs);
1343 StdRegions::VarCoeffMap::const_iterator x;
1345 for (i = 0; i < coordim; ++i)
1353 GetMF(i, shapedim, varcoeffs);
1374 Mat = Mat + Dmat * invMass *
Transpose(Dmat);
1387 Mat = Mat + DmatL * invMass *
Transpose(DmatR);
1392 Mat = Mat + Dmat * invMass *
Transpose(Dmat);
1398 Mat = Mat + lambdaval * Mass;
1401 for (i = 0; i < nedges; ++i)
1404 order_e = EdgeExp->GetNcoeffs();
1406 int nq = EdgeExp->GetNumPoints(0);
1425 for (j = 0; j < order_e; ++j)
1427 for (k = 0; k < order_e; ++k)
1429 Mat(emap[j], emap[k]) =
1430 Mat(emap[j], emap[k]) +
1431 tau *
sign[j] *
sign[k] * eMass(j, k);
1468 for (i = 0; i < nedges; ++i)
1476 for (j = 0; j < nbndry; ++j)
1493 for (k = 0; k < ncoeffs; ++k)
1495 Umat(k, j) = Ulam[k];
1541 for (i = 0; i < nedges; ++i)
1563 ASSERTL0(
false,
"Direction not known");
1572 GetMF(dir, shapedim, varcoeffs);
1608 for (j = 0; j < nbndry; ++j)
1614 for (k = 0; k < ncoeffs; ++k)
1616 Ulam[k] = lamToU(k, j);
1634 &(Qmat.GetPtr())[0] + j * ncoeffs, 1);
1642 int order_e, nquad_e;
1647 StdRegions::VarCoeffMap::const_iterator x;
1696 for (i = 0; i < nedges; ++i)
1702 for (i = 0; i < nbndry; ++i)
1710 for (e = 0; e < nedges; ++e)
1712 order_e = EdgeExp[e]->GetNcoeffs();
1713 nquad_e = EdgeExp[e]->GetNumPoints(0);
1730 for (j = 0; j < order_e; ++j)
1732 edgeCoeffs[j] =
sign[j] * (*LamToQ[0])(emap[j], i);
1735 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1748 0, e, EdgeExp[e], normals, varcoeffs);
1749 Vmath::Vmul(nquad_e, ncdotMF, 1, edgePhys, 1, work, 1);
1753 Vmath::Vmul(nquad_e, normals[0], 1, edgePhys, 1, work,
1758 for (j = 0; j < order_e; ++j)
1760 edgeCoeffs[j] =
sign[j] * (*LamToQ[1])(emap[j], i);
1763 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1778 1, e, EdgeExp[e], normals, varcoeffs);
1779 Vmath::Vvtvp(nquad_e, ncdotMF, 1, edgePhys, 1, work, 1,
1784 Vmath::Vvtvp(nquad_e, normals[1], 1, edgePhys, 1, work,
1791 for (j = 0; j < order_e; ++j)
1793 edgeCoeffs[j] =
sign[j] * (*LamToQ[2])(emap[j], i);
1796 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1807 Vmath::Vvtvp(nquad_e, normals[2], 1, edgePhys, 1, work,
1813 for (j = 0; j < order_e; ++j)
1816 sign[j] * LamToU(emap[j], i) - lam[cnt + j];
1819 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1822 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
1825 e, EdgeExp[e], x->second.GetValue(), varcoeff_work);
1826 Vmath::Vmul(nquad_e, varcoeff_work, 1, edgePhys, 1,
1830 Vmath::Svtvp(nquad_e, -tau, edgePhys, 1, work, 1, work, 1);
1832 EdgeExp[e]->IProductWRTBase(work, edgeCoeffs);
1834 EdgeExp[e]->SetCoeffsToOrientation(edgedir, edgeCoeffs,
1837 for (j = 0; j < order_e; ++j)
1839 BndMat(cnt + j, i) = edgeCoeffs[j];
1855 LapMat.GetRows(), LapMat.GetColumns());
1885 for (
int d = 0; d < ncoords; ++d)
1893 for (
int t = 0; t < ntraces; ++t)
1896 tracepts[t] = traceExp[t]->GetTotPoints();
1897 maxtpts = (maxtpts > tracepts[t]) ? maxtpts : tracepts[t];
1903 for (
int t = 0; t < ntraces; ++t)
1912 PhysDeriv(phys, Deriv[0], Deriv[1], Deriv[2]);
1914 for (
int t = 0; t < ntraces; ++t)
1920 traceExp[t]->GetBasis(0)->GetBasisKey();
1921 bool DoInterp = (fromkey != tokey);
1925 for (
int d = 0; d < ncoords; ++d)
1941 tmp = dphidn[t] + i * tracepts[t], 1,
1942 tmp1 = dphidn[t] + i * tracepts[t], 1);
1947 for (
int t = 0; t < ntraces; ++t)
1949 int nt = tracepts[t];
1955 (p == 1) ? 0.02 * h * h : 0.8 * pow(p + 1, -4.0) * h * h;
1962 dphidn[t] + j * nt, 1, val, 1);
1964 Mat(i, j) + scale * traceExp[t]->Integral(val);
1972 for (
int j = 0; j < i; ++j)
1974 Mat(i, j) = Mat(j, i);
1981 "This matrix type cannot be generated from this class");
2018 Out_d = InvMass * Coeffs;
2033 "Not set up for non boundary-interior expansions");
2034 ASSERTL1(inoutmat->GetRows() == inoutmat->GetColumns(),
2035 "Assuming that input matrix was square");
2039 int order_e = edgeExp->GetNcoeffs();
2050 DNekScalMat &edgemat = *edgeExp->GetLocMatrix(mkey);
2064 int rows = inoutmat->GetRows();
2079 for (i = 0; i < order_e; ++i)
2081 for (j = 0; j < nbndry; ++j)
2083 if (map[i] == bmap[j])
2089 ASSERTL1(j != nbndry,
"Did not find number in map");
2099 for (i = 0; i < edge; ++i)
2104 for (i = 0; i < order_e; ++i)
2111 switch (edgeExp->GetBasis(0)->GetBasisType())
2114 reverse(map.data(), map.data() + order_e);
2117 reverse(map.data(), map.data() + order_e);
2121 swap(map[0], map[1]);
2122 for (i = 3; i < order_e; i += 2)
2130 "Edge boundary type not valid for this method");
2136 ASSERTL0(
false,
"Could not identify matrix type from dimension");
2139 for (i = 0; i < order_e; ++i)
2142 for (j = 0; j < order_e; ++j)
2145 (*inoutmat)(id1, id2) += edgemat(i, j) *
sign[i] *
sign[j];
2163 "Not set up for non boundary-interior expansions");
2166 int order_e = edgeExp->GetNcoeffs();
2177 DNekScalMat &edgemat = *edgeExp->GetLocMatrix(mkey);
2183 for (i = 0; i < order_e; ++i)
2185 vEdgeCoeffs[i] = incoeffs[map[i]] *
sign[i];
2188 vEdgeCoeffs = edgemat * vEdgeCoeffs;
2190 for (i = 0; i < order_e; ++i)
2192 coeffs[map[i]] += vEdgeCoeffs[i] *
sign[i];
2202 int nVerts, vid1, vid2, vMap1, vMap2;
2209 DNekMat &VertexMat = (*m_vertexmatrix);
2211 for (vid1 = 0; vid1 < nVerts; ++vid1)
2215 for (vid2 = 0; vid2 < nVerts; ++vid2)
2218 VertexValue = (*r_bnd)(vMap1, vMap2);
2219 VertexMat.SetValue(vid1, vid2, VertexValue);
2223 return m_vertexmatrix;
2243 map<int, int> invmap;
2244 for (j = 0; j < nBndCoeffs; ++j)
2246 invmap[bmap[j]] = j;
2262 for (n = 0; n < nEdgeCoeffs; ++n)
2264 edgemaparray[n] = invmap[maparray[n]];
2267 return edgemaparray;
2277 [[maybe_unused]]
const int nq1)
2279 if (idmap.size() != nq0)
2287 for (
int i = 0; i < nq0; ++i)
2295 for (
int i = 0; i < nq0; ++i)
2297 idmap[i] = nq0 - 1 - i;
2302 ASSERTL0(
false,
"Unknown orientation");
2313 int nquad_e = EdgeExp_e->GetNumPoints(0);
2315 int nquad0 =
m_base[0]->GetNumPoints();
2316 int nquad1 =
m_base[1]->GetNumPoints();
2317 int nqtot = nquad0 * nquad1;
2329 StdRegions::VarCoeffMap::const_iterator MFdir;
2334 for (
int k = 0; k < coordim; k++)
2336 MFdir = varcoeffs.find(MMFCoeffs[dir * 5 + k]);
2337 tmp = MFdir->second.GetValue();
2341 Vmath::Vvtvp(nquad_e, &tmp_e[0], 1, &normals[k][0], 1, &ncdotMF[0], 1,
2356 Vmath::Vmul(nq, &vec[0][0], 1, &normals[0][0], 1, &Fn[0], 1);
2357 Vmath::Vvtvp(nq, &vec[1][0], 1, &normals[1][0], 1, &Fn[0], 1, &Fn[0], 1);
2358 Vmath::Vvtvp(nq, &vec[2][0], 1, &normals[2][0], 1, &Fn[0], 1, &Fn[0], 1);
2360 return StdExpansion::Integral(Fn);
2375 *geom->
GetVertex((traceid + (nverts - 1)) % nverts);
2387 h =
sqrt(h1 * h1 - d1 * d1 / lenDx);
2392 h1 = ev1.
dist(vadj1);
2393 Dx1.
Sub(vadj1, ev1);
2396 h = (h +
sqrt(h1 * h1 - d1 * d1 / lenDx)) * 0.5;
2398 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.
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) override
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
SpatialDomains::Geometry2D * GetGeom2D() const
std::vector< bool > m_requireNeg
void v_AddRobinTraceContribution(const int traceid, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs) override
void v_SetUpPhysNormals(const int edge) override
void v_AddRobinMassMatrix(const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
Array< OneD, NekDouble > GetnEdgecdotMF(const int dir, const int edge, ExpansionSharedPtr &EdgeExp_e, const Array< OneD, const Array< OneD, NekDouble > > &normals, const StdRegions::VarCoeffMap &varcoeffs)
void SetTraceToGeomOrientation(Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &inout)
DNekMatSharedPtr v_BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd) override
NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &vec) override
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Array< OneD, unsigned int > GetTraceInverseBoundaryMap(int eid)
Expansion2D(SpatialDomains::Geometry2D *pGeom)
void v_ReOrientTracePhysMap(const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1) override
void AddNormTraceInt(const int dir, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &edgeCoeffs, Array< OneD, NekDouble > &outarray)
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 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) override
void v_TraceNormLen(const int traceid, NekDouble &h, NekDouble &p) override
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)
void AddHDGHelmholtzTraceTerms(const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
void v_GenTraceExp(const int traceid, ExpansionSharedPtr &exp) override
void DropLocMatrix(const LocalRegions::MatrixKey &mkey)
SpatialDomains::Geometry * GetGeom() const
ExpansionSharedPtr GetLeftAdjacentElementExp() const
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
SpatialDomains::Geometry * m_geom
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)
Array< OneD, NekDouble > GetMFMag(const int dir, const StdRegions::VarCoeffMap &varcoeffs)
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)
std::map< int, ExpansionWeakPtr > m_traceExp
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)
Array< OneD, NekDouble > GetMFDiv(const int dir, const StdRegions::VarCoeffMap &varcoeffs)
void TraceNormLen(const int traceid, NekDouble &h, NekDouble &p)
const NormalVector & GetTraceNormal(const int id)
Array< OneD, NekDouble > GetMF(const int dir, const int shapedim, const StdRegions::VarCoeffMap &varcoeffs)
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Base class for shape geometry information.
int GetGlobalID(void) const
Get the ID of this object.
PointGeom * GetVertex(int i) const
Returns vertex i of this object.
int GetDir(const int i, const int j=0) const
Returns the element coordinate direction corresponding to a given face coordinate direction.
int GetNumVerts() const
Get the number of vertices of this object.
Geometry1D * GetEdge(int i) const
Returns edge i of this object.
StdRegions::Orientation GetEorient(const int i) const
Returns the orientation of edge i with respect to the ordering of edges in the standard element.
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)
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.
const LibUtilities::BasisKey GetTraceBasisKey(const int i, int k=-1, bool UseGLL=false) const
This function returns the basis key belonging to the i-th trace.
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
bool IsBoundaryInteriorExpansion() const
LibUtilities::ShapeType GetShapeType() const
const VarCoeffMap & GetVarCoeffs() const
MatrixType GetMatrixType() const
bool HasVarCoeff(const StdRegions::VarCoeffType &coeff) const
const ConstFactorMap & GetConstFactors() const
const Array< OneD, const NekDouble > & GetVarCoeff(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.
@ eLinearAdvectionReaction
@ eLinearAdvectionDiffusionReaction
@ eLinearAdvectionDiffusionReactionGJP
@ eInvLaplacianWithUnityMean
std::map< ConstFactorType, NekDouble > ConstFactorMap
static ConstFactorMap NullConstFactorMap
static VarCoeffMap NullVarCoeffMap
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
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 > min(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > sqrt(scalarT< T > in)