51 : StdExpansion(),
Expansion(pGeom), StdExpansion2D()
61 "Geometric information is not set up");
96 "Need to specify eFactorGJP to construct "
101 factor /= MassMat.Scale();
103 int ntot = MassMat.GetRows() * MassMat.GetColumns();
106 MassMat.GetRawPtr(), 1, &NDTraceMat->GetPtr()[0], 1);
109 MassMat.Scale(), NDTraceMat);
175 int rows = deriv0.GetRows();
176 int cols = deriv1.GetColumns();
181 df[2 * dir][0] * deriv0 + df[2 * dir + 1][0] * deriv1;
247 int rows = derivxi.GetRows();
248 int cols = deriveta.GetColumns();
253 (*WeakDirDeriv) = derivxi + deriveta;
265 (*WeakDirDeriv) = (*WeakDirDeriv) + (*DiveMassmat);
301 int rows = lap00.GetRows();
302 int cols = lap00.GetColumns();
307 (*lap) = gmat[0][0] * lap00 +
308 gmat[1][0] * (lap01 +
Transpose(lap01)) +
352 int rows = LapMat.GetRows();
353 int cols = LapMat.GetColumns();
359 (*helm) = LapMat + factor * MassMat;
365 if (!massVarcoeffs.empty())
369 if (!lapVarcoeffs.empty())
385 "Need to specify eFactorGJP to construct "
386 "a HelmholtzGJP matrix");
390 factor /= HelmMat.Scale();
392 int ntot = HelmMat.GetRows() * HelmMat.GetColumns();
395 HelmMat.GetRawPtr(), 1, &NDTraceMat->GetPtr()[0], 1);
398 HelmMat.Scale(), NDTraceMat);
424 int rows = MassMat.GetRows();
425 int cols = MassMat.GetColumns();
431 (*adr) = -lambda * MassMat + AdvMat;
437 if (!massVarcoeffs.empty())
479 int rows = LapMat.GetRows();
480 int cols = LapMat.GetColumns();
486 (*adr) = LapMat - lambda * MassMat + AdvMat;
492 if (!massVarcoeffs.empty())
496 if (!lapVarcoeffs.empty())
542 "Need to specify eFactorGJP to construct "
543 "a LinearAdvectionDiffusionReactionGJP matrix");
545 int rows = LapMat.GetRows();
546 int cols = LapMat.GetColumns();
553 LapMat - lambda * MassMat + AdvMat + gjpfactor * NDTraceMat;
631 int rows = stdiprod0.GetRows();
632 int cols = stdiprod1.GetColumns();
637 df[2 * dir][0] * stdiprod0 + df[2 * dir + 1][0] * stdiprod1;
662 "Matrix only setup for quad elements currently");
668 coords[0] = (edge == 0 || edge == 3) ? -1.0 : 1.0;
670 m_Ix =
m_base[(edge + 1) % 2]->GetI(coords);
732 ASSERTL1(
false,
"input dir is out of range");
743 int nquad0 =
m_base[0]->GetNumPoints();
744 int nquad1 =
m_base[1]->GetNumPoints();
745 int nqtot = nquad0 * nquad1;
757 Vmath::Vvtvp(nqtot, df[1], 1, diff1, 1, out_d0, 1, out_d0, 1);
763 Vmath::Vvtvp(nqtot, df[3], 1, diff1, 1, out_d1, 1, out_d1, 1);
769 Vmath::Vvtvp(nqtot, df[5], 1, diff1, 1, out_d2, 1, out_d2, 1);
799 int nquad0 =
m_base[0]->GetNumPoints();
800 int nquad1 =
m_base[1]->GetNumPoints();
801 int nqtot = nquad0 * nquad1;
817 for (
int i = 0; i < 2; ++i)
822 Vmath::Vvtvp(nqtot, &df[2 * k + i][0], 1, &direction[k * nqtot],
823 1, &tangmat[i][0], 1, &tangmat[i][0], 1);
828 Vmath::Vmul(nqtot, &tangmat[0][0], 1, &diff0[0], 1, &outarray[0], 1);
829 Vmath::Vvtvp(nqtot, &tangmat[1][0], 1, &diff1[0], 1, &outarray[0], 1,
836 for (
int i = 0; i < 2; ++i)
841 Vmath::Svtvp(nqtot, df[2 * k + i][0], &direction[k * nqtot], 1,
842 &tangmat[i][0], 1, &tangmat[i][0], 1);
847 Vmath::Vmul(nqtot, &tangmat[0][0], 1, &diff0[0], 1, &outarray[0], 1);
849 Vmath::Vvtvp(nqtot, &tangmat[1][0], 1, &diff1[0], 1, &outarray[0], 1,
857 const bool CollDir0 =
m_base[0]->Collocation();
858 const bool CollDir1 =
m_base[1]->Collocation();
868 Vmath::Vmul(nqtot, jac, 1, inarray, 1, outarray, 1);
872 Vmath::Smul(nqtot, jac[0], inarray, 1, outarray, 1);
879 inarray, outarray, jac, Deformed, CollDir0,
899 for (
int i = 0; i < nedges; ++i)
905 if (edgeExp->GetRightAdjacentElementExp())
907 if (edgeExp->GetRightAdjacentElementExp()
909 ->GetGlobalID() ==
GetGeom()->GetGlobalID())
921 int nquad_e =
min(EdgeExp->GetNumPoints(0),
int(normals[0].size()));
923 int nEdgePts = EdgeExp->GetTotPoints();
925 Vmath::Vmul(nquad_e, normals[0], 1, Fx, 1, edgePhys, 1);
926 Vmath::Vvtvp(nquad_e, normals[1], 1, Fy, 1, edgePhys, 1, edgePhys, 1);
932 if (locExp->GetRightAdjacentElementExp()->GetGeom()->GetGlobalID() ==
953 for (i = 0; i < nedges; ++i)
959 if (edgeExp->GetRightAdjacentElementExp())
961 if (edgeExp->GetRightAdjacentElementExp()
963 ->GetGlobalID() ==
GetGeom()->GetGlobalID())
977 int order_e = map->size();
979 int n_coeffs = EdgeExp->GetNcoeffs();
982 if (n_coeffs != order_e)
984 EdgeExp->FwdTrans(Fn, edgeCoeffs);
996 EdgeExp->GetBasis(0)->GetNumModes(),
997 EdgeExp->GetBasis(0)->GetPointsKey());
999 EdgeExp->GetBasis(0)->GetNumModes(),
1000 EdgeExp->GetBasis(0)->GetPointsKey());
1004 for (i = order_e; i < n_coeffs; i++)
1013 EdgeExp->MassMatrixOp(edgeCoeffs, edgeCoeffs, masskey);
1017 EdgeExp->IProductWRTBase(Fn, edgeCoeffs);
1031 for (i = 0; i < order_e; ++i)
1033 outarray[(*map)[i].index] += (*map)[i].sign * edgeCoeffs[i];
1038 int nCoeffs0, nCoeffs1;
1052 nCoeffs1 =
m_base[1]->GetNumModes();
1054 for (i = 0; i < order_e; ++i)
1056 for (j = 0; j < nCoeffs1; j++)
1058 outarray[(*map)[i].index + j * order_e] +=
1059 mat_gauss->GetPtr()[j] * (*map)[i].sign *
1067 nCoeffs0 =
m_base[0]->GetNumModes();
1069 for (i = 0; i < order_e; ++i)
1071 for (j = 0; j < nCoeffs0; j++)
1073 outarray[(*map)[i].index - j] +=
1074 mat_gauss->GetPtr()[order_e - 1 - j] *
1075 (*map)[i].sign * edgeCoeffs[i];
1082 nCoeffs1 =
m_base[1]->GetNumModes();
1084 for (i = 0; i < order_e; ++i)
1086 for (j = 0; j < nCoeffs1; j++)
1088 outarray[(*map)[i].index - j * order_e] +=
1089 mat_gauss->GetPtr()[order_e - 1 - j] *
1090 (*map)[i].sign * edgeCoeffs[i];
1097 nCoeffs0 =
m_base[0]->GetNumModes();
1099 for (i = 0; i < order_e; ++i)
1101 for (j = 0; j < nCoeffs0; j++)
1103 outarray[(*map)[i].index + j] +=
1104 mat_gauss->GetPtr()[j] * (*map)[i].sign *
1111 ASSERTL0(
false,
"edge value (< 3) is out of range");
1124 for (i = 0; i < nedges; ++i)
1126 EdgeExp[i]->SetCoeffsToOrientation(
1143 int order_e, nquad_e;
1147 for (e = 0; e < nedges; ++e)
1149 order_e = EdgeExp[e]->GetNcoeffs();
1150 nquad_e = EdgeExp[e]->GetNumPoints(0);
1157 for (i = 0; i < order_e; ++i)
1159 edgeCoeffs[i] = inarray[i + cnt];
1163 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1185 Vmath::Vmul(nquad_e, ncdotMF_e, 1, edgePhys, 1, edgePhys, 1);
1189 Vmath::Vmul(nquad_e, normals[dir], 1, edgePhys, 1, edgePhys, 1);
1205 for (e = 0; e < nedges; ++e)
1207 nquad_e = EdgeExp[e]->GetNumPoints(0);
1213 EdgeExp[e]->BwdTrans(edgeCoeffs[e], edgePhys);
1215 Vmath::Vmul(nquad_e, normals[dir], 1, edgePhys, 1, edgePhys, 1);
1231 int order_e = EdgeExp->GetNcoeffs();
1232 int nquad_e = EdgeExp->GetNumPoints(0);
1242 StdRegions::VarCoeffMap::const_iterator x;
1245 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
1250 Vmath::Vmul(nquad_e, work, 1, edgePhys, 1, edgePhys, 1);
1253 EdgeExp->IProductWRTBase(edgePhys, coeff);
1256 for (i = 0; i < order_e; ++i)
1258 outarray[map[i]] +=
sign[i] * coeff[i];
1270 ASSERTL0(&inarray[0] != &outarray[0],
1271 "Input and output arrays use the same memory");
1278 for (e = 0; e < nedges; ++e)
1280 order_e = EdgeExp[e]->GetNcoeffs();
1284 Vmath::Vcopy(order_e, tmp = inarray + cnt, 1, edgeCoeffs, 1);
1285 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1302 int nquad_e = EdgeExp[edge]->GetNumPoints(0);
1303 int order_e = EdgeExp[edge]->GetNcoeffs();
1332 StdRegions::VarCoeffMap::const_iterator x;
1334 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
1338 x->second.GetValue(), work);
1339 Vmath::Vmul(nquad_e, work, 1, edgePhys, 1, edgePhys, 1);
1345 EdgeExp[edge]->IProductWRTBase(edgePhys, outcoeff);
1347 for (i = 0; i < order_e; ++i)
1349 outarray[emap[i]] +=
sign[i] * tau * outcoeff[i];
1359 for (n = 0; n < coordim; ++n)
1374 Vmath::Vmul(nquad_e, ncdotMF_e, 1, edgePhys, 1, inval, 1);
1378 Vmath::Vmul(nquad_e, normals[n], 1, edgePhys, 1, inval, 1);
1392 EdgeExp[edge]->IProductWRTBase(inval, outcoeff);
1395 for (i = 0; i < ncoeffs; ++i)
1398 for (j = 0; j < order_e; ++j)
1400 tmpcoeff[i] += (*invMass)(i, emap[j]) *
sign[j] * outcoeff[j];
1408 GetMF(n, coordim, varcoeffs);
1418 Coeffs = Coeffs + Dmat * Tmpcoeff;
1422 if (varcoeffs.find(VarCoeff[n]) != varcoeffs.end())
1428 Coeffs = Coeffs + Dmat * Tmpcoeff;
1433 Coeffs = Coeffs + Dmat * Tmpcoeff;
1459 for (
unsigned int i = 0; i < EdgeExp->GetNcoeffs(); ++i)
1461 edgetmp[i] = tmp[emap[i]];
1465 EdgeExp->BwdTrans(edgetmp, outarray);
1485 "HybridDGHelmholtz matrix not set up "
1486 "for non boundary-interior expansions");
1509 DNekMat LocMat(ncoeffs, ncoeffs);
1520 StdRegions::VarCoeffMap::const_iterator x;
1522 for (i = 0; i < coordim; ++i)
1530 GetMF(i, shapedim, varcoeffs);
1551 Mat = Mat + Dmat * invMass *
Transpose(Dmat);
1564 Mat = Mat + DmatL * invMass *
Transpose(DmatR);
1569 Mat = Mat + Dmat * invMass *
Transpose(Dmat);
1575 Mat = Mat + lambdaval * Mass;
1578 for (i = 0; i < nedges; ++i)
1581 order_e = EdgeExp->GetNcoeffs();
1583 int nq = EdgeExp->GetNumPoints(0);
1602 for (j = 0; j < order_e; ++j)
1604 for (k = 0; k < order_e; ++k)
1606 Mat(emap[j], emap[k]) =
1607 Mat(emap[j], emap[k]) +
1608 tau *
sign[j] *
sign[k] * eMass(j, k);
1645 for (i = 0; i < nedges; ++i)
1653 for (j = 0; j < nbndry; ++j)
1670 for (k = 0; k < ncoeffs; ++k)
1672 Umat(k, j) = Ulam[k];
1718 for (i = 0; i < nedges; ++i)
1740 ASSERTL0(
false,
"Direction not known");
1749 GetMF(dir, shapedim, varcoeffs);
1785 for (j = 0; j < nbndry; ++j)
1791 for (k = 0; k < ncoeffs; ++k)
1793 Ulam[k] = lamToU(k, j);
1811 &(Qmat.GetPtr())[0] + j * ncoeffs, 1);
1819 int order_e, nquad_e;
1824 StdRegions::VarCoeffMap::const_iterator x;
1873 for (i = 0; i < nedges; ++i)
1879 for (i = 0; i < nbndry; ++i)
1887 for (e = 0; e < nedges; ++e)
1889 order_e = EdgeExp[e]->GetNcoeffs();
1890 nquad_e = EdgeExp[e]->GetNumPoints(0);
1907 for (j = 0; j < order_e; ++j)
1909 edgeCoeffs[j] =
sign[j] * (*LamToQ[0])(emap[j], i);
1912 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1925 0, e, EdgeExp[e], normals, varcoeffs);
1926 Vmath::Vmul(nquad_e, ncdotMF, 1, edgePhys, 1, work, 1);
1930 Vmath::Vmul(nquad_e, normals[0], 1, edgePhys, 1, work,
1935 for (j = 0; j < order_e; ++j)
1937 edgeCoeffs[j] =
sign[j] * (*LamToQ[1])(emap[j], i);
1940 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1955 1, e, EdgeExp[e], normals, varcoeffs);
1956 Vmath::Vvtvp(nquad_e, ncdotMF, 1, edgePhys, 1, work, 1,
1961 Vmath::Vvtvp(nquad_e, normals[1], 1, edgePhys, 1, work,
1968 for (j = 0; j < order_e; ++j)
1970 edgeCoeffs[j] =
sign[j] * (*LamToQ[2])(emap[j], i);
1973 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1984 Vmath::Vvtvp(nquad_e, normals[2], 1, edgePhys, 1, work,
1990 for (j = 0; j < order_e; ++j)
1993 sign[j] * LamToU(emap[j], i) - lam[cnt + j];
1996 EdgeExp[e]->BwdTrans(edgeCoeffs, edgePhys);
1999 if ((x = varcoeffs.find(VarCoeff[0])) != varcoeffs.end())
2002 e, EdgeExp[e], x->second.GetValue(), varcoeff_work);
2003 Vmath::Vmul(nquad_e, varcoeff_work, 1, edgePhys, 1,
2007 Vmath::Svtvp(nquad_e, -tau, edgePhys, 1, work, 1, work, 1);
2009 EdgeExp[e]->IProductWRTBase(work, edgeCoeffs);
2011 EdgeExp[e]->SetCoeffsToOrientation(edgedir, edgeCoeffs,
2014 for (j = 0; j < order_e; ++j)
2016 BndMat(cnt + j, i) = edgeCoeffs[j];
2032 LapMat.GetRows(), LapMat.GetColumns());
2062 for (
int d = 0; d < ncoords; ++d)
2070 for (
int t = 0; t < ntraces; ++t)
2073 tracepts[t] = traceExp[t]->GetTotPoints();
2074 maxtpts = (maxtpts > tracepts[t]) ? maxtpts : tracepts[t];
2080 for (
int t = 0; t < ntraces; ++t)
2091 for (
int t = 0; t < ntraces; ++t)
2097 traceExp[t]->GetBasis(0)->GetBasisKey();
2098 bool DoInterp = (fromkey != tokey);
2102 for (
int d = 0; d < ncoords; ++d)
2117 tmp = dphidn[t] + i * tracepts[t], 1,
2118 tmp1 = dphidn[t] + i * tracepts[t], 1);
2123 for (
int t = 0; t < ntraces; ++t)
2125 int nt = tracepts[t];
2131 "Cannot find TraceWeights in key");
2140 dphidn[t] + j * nt, 1, val, 1);
2142 Mat(i, j) + scale * traceExp[t]->Integral(val);
2150 for (
int j = 0; j < i; ++j)
2152 Mat(i, j) = Mat(j, i);
2159 "This matrix type cannot be generated from this class");
2196 Out_d = InvMass * Coeffs;
2211 "Not set up for non boundary-interior expansions");
2212 ASSERTL1(inoutmat->GetRows() == inoutmat->GetColumns(),
2213 "Assuming that input matrix was square");
2217 int order_e = edgeExp->GetNcoeffs();
2228 DNekScalMat &edgemat = *edgeExp->GetLocMatrix(mkey);
2242 int rows = inoutmat->GetRows();
2257 for (i = 0; i < order_e; ++i)
2259 for (j = 0; j < nbndry; ++j)
2261 if (map[i] == bmap[j])
2267 ASSERTL1(j != nbndry,
"Did not find number in map");
2277 for (i = 0; i < edge; ++i)
2282 for (i = 0; i < order_e; ++i)
2289 switch (edgeExp->GetBasis(0)->GetBasisType())
2292 reverse(map.data(), map.data() + order_e);
2295 reverse(map.data(), map.data() + order_e);
2299 swap(map[0], map[1]);
2300 for (i = 3; i < order_e; i += 2)
2308 "Edge boundary type not valid for this method");
2314 ASSERTL0(
false,
"Could not identify matrix type from dimension");
2317 for (i = 0; i < order_e; ++i)
2320 for (j = 0; j < order_e; ++j)
2323 (*inoutmat)(id1, id2) += edgemat(i, j) *
sign[i] *
sign[j];
2341 "Not set up for non boundary-interior expansions");
2344 int order_e = edgeExp->GetNcoeffs();
2355 DNekScalMat &edgemat = *edgeExp->GetLocMatrix(mkey);
2361 for (i = 0; i < order_e; ++i)
2363 vEdgeCoeffs[i] = incoeffs[map[i]] *
sign[i];
2366 vEdgeCoeffs = edgemat * vEdgeCoeffs;
2368 for (i = 0; i < order_e; ++i)
2370 coeffs[map[i]] += vEdgeCoeffs[i] *
sign[i];
2380 int nVerts, vid1, vid2, vMap1, vMap2;
2387 DNekMat &VertexMat = (*m_vertexmatrix);
2389 for (vid1 = 0; vid1 < nVerts; ++vid1)
2393 for (vid2 = 0; vid2 < nVerts; ++vid2)
2396 VertexValue = (*r_bnd)(vMap1, vMap2);
2397 VertexMat.SetValue(vid1, vid2, VertexValue);
2401 return m_vertexmatrix;
2421 map<int, int> invmap;
2422 for (j = 0; j < nBndCoeffs; ++j)
2424 invmap[bmap[j]] = j;
2440 for (n = 0; n < nEdgeCoeffs; ++n)
2442 edgemaparray[n] = invmap[maparray[n]];
2445 return edgemaparray;
2456 const int nq0, [[maybe_unused]]
const int nq1,
2457 [[maybe_unused]]
bool Forwards)
2463 for (
int i = 0; i < nq0; ++i)
2475 ASSERTL0(
false,
"Unknown orientation");
2486 int nquad_e = EdgeExp_e->GetNumPoints(0);
2488 int nquad0 =
m_base[0]->GetNumPoints();
2489 int nquad1 =
m_base[1]->GetNumPoints();
2490 int nqtot = nquad0 * nquad1;
2502 StdRegions::VarCoeffMap::const_iterator MFdir;
2507 for (
int k = 0; k < coordim; k++)
2509 MFdir = varcoeffs.find(MMFCoeffs[dir * 5 + k]);
2510 tmp = MFdir->second.GetValue();
2514 Vmath::Vvtvp(nquad_e, &tmp_e[0], 1, &normals[k][0], 1, &ncdotMF[0], 1,
2529 Vmath::Vmul(nq, &vec[0][0], 1, &normals[0][0], 1, &Fn[0], 1);
2530 Vmath::Vvtvp(nq, &vec[1][0], 1, &normals[1][0], 1, &Fn[0], 1, &Fn[0], 1);
2531 Vmath::Vvtvp(nq, &vec[2][0], 1, &normals[2][0], 1, &Fn[0], 1, &Fn[0], 1);
2533 return StdExpansion::Integral(Fn);
2548 *geom->
GetVertex((traceid + (nverts - 1)) % nverts);
2560 h =
sqrt(h1 * h1 - d1 * d1 / lenDx);
2565 h1 = ev1.
dist(vadj1);
2566 Dx1.
Sub(vadj1, ev1);
2569 h = (h +
sqrt(h1 * h1 - d1 * d1 / lenDx)) * 0.5;
2571 int dirn = (geom->
GetDir(traceid) == 0) ? 1 : 0;
2591 if (d0factors.size() != ntrace)
2599 unsigned nq_max = 0;
2600 for (
int i = 0; i < ntrace; ++i)
2606 nq_edge[i] = traceExp[i]->GetTotPoints();
2607 if (d0factors[i].size() != nq_edge[i])
2612 nq_max =
max(nq_max, nq_edge[i]);
2618 int ncoords = normals.find(0)->second.size();
2623 for (
int i = 0; i < 2; ++i)
2632 for (
unsigned i = 0; i < 2 * ncoords; ++i)
2635 Vmath::Vmul(nqtot, &(df[i][0]), 1, &(Jac[0]), 1, &(dfdj[i][0]), 1);
2639 for (
unsigned e = 0; e < ntrace; ++e)
2647 norm = normals.find(e)->second[0];
2648 for (
int i = 0; i < nq_edge[e]; ++i)
2650 d0factors[e][i] = fac[0][i] * norm[i] * jac[i];
2651 d1factors[e][i] = fac[1][i] * norm[i] * jac[i];
2654 for (
int n = 1; n < ncoords; ++n)
2661 norm = normals.find(e)->second[n];
2662 for (
int i = 0; i < nq_edge[e]; ++i)
2664 d0factors[e][i] += fac[0][i] * norm[i] * jac[i];
2665 d1factors[e][i] += fac[1][i] * norm[i] * jac[i];
2672 for (
unsigned e = 0; e < ntrace; ++e)
2674 norm = normals.find(e)->second[0];
2675 for (
int i = 0; i < nq_edge[e]; ++i)
2677 d0factors[e][i] = df[0][0] * norm[i];
2678 d1factors[e][i] = df[1][0] * norm[i];
2681 for (
int n = 1; n < ncoords; ++n)
2683 norm = normals.find(e)->second[n];
2684 for (
int i = 0; i < nq_edge[e]; ++i)
2686 d0factors[e][i] += df[2 * n][0] * norm[i];
2687 d1factors[e][i] += df[2 * n + 1][0] * norm[i];
#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
void v_ReOrientTracePhysVals(const StdRegions::Orientation orient, const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out, const int nq0, const int nq1, bool Forwards) 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 v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &out) override
Physical derivative along a direction vector.
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_NormalTraceDerivFactors(Array< OneD, Array< OneD, NekDouble > > &factors, Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors) override
: This method gets all of the factors which are required as part of the Gradient Jump Penalty (GJP) s...
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_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product of a given function f with the different modes of the expansion.
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_PhysDeriv(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculate the derivative of the physical points in a given direction.
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)
virtual void v_GetLocTracePhysVals(const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const NekDouble *inarray, Array< OneD, NekDouble > &outarray)
int GetLeftAdjacentElementTrace() const
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)
virtual StdRegions::Orientation v_GetTraceOrient(int trace)
ExpansionSharedPtr GetTraceExp(const int traceid)
void GetLocTracePhysVals(const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
StdRegions::Orientation GetTraceOrient(int trace)
const std::map< int, NormalVector > & GetTraceNormals(void)
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)
SpatialDomains::GeomFactorsUniquePtr m_geomFactors
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 GetCoordim() const
Return the coordinate dimension of this object (i.e. the dimension of the space in which 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
virtual void v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false)=0
bool v_IsCollocatedBasis() const final
void v_MultiplyByStdQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
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)
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.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
bool IsBoundaryInteriorExpansion() const
bool HasVarCoeffForMatrixType(const StdRegions::MatrixType &mtype) const
LibUtilities::ShapeType GetShapeType() const
const Array< OneD, const NekDouble > & GetVarFactors(const StdRegions::ConstFactorType &type) const
const VarCoeffMap & GetVarCoeffs() const
MatrixType GetMatrixType() const
bool HasVarCoeff(const StdRegions::VarCoeffType &coeff) const
bool HasVarFactors(const StdRegions::ConstFactorType &type) 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
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.
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
Array< OneD, Array< OneD, NekDouble > > NormalVector
@ 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 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/x.
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 Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > max(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > min(scalarT< T > lhs, scalarT< T > rhs)
scalarT< T > sqrt(scalarT< T > in)