64 const vector<bool> &LeftAdjacents)
69 m_expdim = locExpVector[0]->GetShapeDimension();
72 Setup(locExp, trace, elmtToTrace, LeftAdjacents);
91 const vector<bool> &LeftAdjacents)
114 const std::shared_ptr<LocalRegions::ExpansionVector> exp = locExp.
GetExp();
116 int cnt, n, e, phys_offset;
118 int nexp = exp->size();
129 for (cnt = n = 0; n < nexp; ++n)
133 for (
int i = 0; i < elmt->GetNtraces(); ++i, ++cnt)
135 int nLocPts = elmt->GetTraceNumPoints(i);
138 if (LeftAdjacents[cnt])
140 nFwdPts += elmtToTrace[n][i]->GetTotPoints();
141 nFwdCoeffs += elmtToTrace[n][i]->GetNcoeffs();
146 nBwdPts += elmtToTrace[n][i]->GetTotPoints();
147 nBwdCoeffs += elmtToTrace[n][i]->GetNcoeffs();
172 map<TraceInterpPoints, vector<pair<int, int>>,
cmpop> TraceInterpMap;
174 vector<vector<int>> TraceOrder;
175 TraceOrder.resize(nexp);
176 vector<vector<int>> ElmtPhysTraceOffset;
177 ElmtPhysTraceOffset.resize(nexp);
185 for (cnt = n = 0; n < nexp; ++n)
188 ntrace = elmt->GetNtraces();
189 TraceOrder[n].resize(ntrace);
190 ElmtPhysTraceOffset[n].resize(ntrace);
193 for (e = 0; e < ntrace; ++e, ++cnt)
206 fromPointsKey0 = elmt->GetBasis(0)->GetPointsKey();
219 int dir0 = elmt->GetGeom()->GetDir(e, 0);
221 fromPointsKey0 = elmt->GetBasis(dir0)->GetPointsKey();
225 toPointsKey0 = elmttrace->GetBasis(0)->GetPointsKey();
229 P[0] = elmttrace->GetBasisNumModes(0);
234 int dir0 = elmt->GetGeom()->GetDir(e, 0);
235 int dir1 = elmt->GetGeom()->GetDir(e, 1);
237 fromPointsKey0 = elmt->GetBasis(dir0)->GetPointsKey();
238 fromPointsKey1 = elmt->GetBasis(dir1)->GetPointsKey();
242 toPointsKey0 = elmttrace->GetBasis(0)->GetPointsKey();
243 toPointsKey1 = elmttrace->GetBasis(1)->GetPointsKey();
244 P[0] = elmttrace->GetBasisNumModes(0);
245 P[1] = elmttrace->GetBasisNumModes(1);
249 toPointsKey0 = elmttrace->GetBasis(1)->GetPointsKey();
250 toPointsKey1 = elmttrace->GetBasis(0)->GetPointsKey();
251 P[0] = elmttrace->GetBasisNumModes(1);
252 P[1] = elmttrace->GetBasisNumModes(0);
259 toPointsKey0, toPointsKey1);
261 pair<int, int> epf(n, e);
262 TraceInterpMap[fpoint].push_back(epf);
263 TraceOrder[n][e] = cnt;
265 ElmtPhysTraceOffset[n][e] = neoffset;
266 neoffset += elmt->GetTraceNumPoints(e);
275 elmt->GetTraceToElementMap(e, map,
sign, orient,
P[0],
P[1]);
277 int order_t = elmttrace->GetNcoeffs();
278 int t_offset = trace->GetCoeff_Offset(elmttrace->GetElmtId());
282 if (elmt->GetTraceExp(e)->GetRightAdjacentElementExp())
284 if (elmttrace->GetRightAdjacentElementExp()
286 ->GetGlobalID() == elmt->GetGeom()->GetGlobalID())
292 if (LeftAdjacents[cnt])
294 for (
int i = 0; i < order_t; ++i)
303 for (
int i = 0; i < order_t; ++i)
313 int nInterpType = TraceInterpMap.size();
316 for (
int i = 0; i < 2; ++i)
328 for (
int i = 0; i < 2; ++i)
337 int ntracepts, ntracepts1;
349 for (
auto it = TraceInterpMap.begin(); it != TraceInterpMap.end();
360 for (
int f = 0; f < it->second.size(); ++f, ++cnt2)
362 n = it->second[f].first;
363 e = it->second[f].second;
372 elmt->GetTracePhysMap(e, traceids);
374 ntracepts = elmt->GetTraceNumPoints(e);
375 ntracepts1 = elmttrace->GetTotPoints();
383 elmt->ReOrientTracePhysMap(orient, locTraceToTraceMap,
389 elmt->ReOrientTracePhysMap(orient, locTraceToTraceMap,
394 int offset = trace->GetPhys_Offset(elmtToTrace[n][e]->GetElmtId());
396 if (LeftAdjacents[TraceOrder[n][e]])
398 for (
int i = 0; i < ntracepts; ++i)
401 phys_offset + traceids[i];
404 for (
int i = 0; i < ntracepts; ++i)
407 ElmtPhysTraceOffset[n][e] + i;
410 for (
int i = 0; i < ntracepts1; ++i)
413 offset + locTraceToTraceMap[i];
417 cntFwd1 += ntracepts1;
422 for (
int i = 0; i < ntracepts; ++i)
425 phys_offset + traceids[i];
428 for (
int i = 0; i < ntracepts; ++i)
431 ElmtPhysTraceOffset[n][e] + i;
434 for (
int i = 0; i < ntracepts1; ++i)
437 offset + locTraceToTraceMap[i];
441 cntBwd1 += ntracepts1;
447 if ((fwdSet ==
false && set == 0) || (bwdSet ==
false && set == 1))
461 if (fromPointsKey0 == toPointsKey0)
470 ->GetI(toPointsKey0);
473 ->GetI(fromPointsKey0);
477 LibUtilities::eGaussRadauMAlpha1Beta0) &&
507 if (fromPointsKey0 == toPointsKey0)
509 if (fromPointsKey1 == toPointsKey1)
519 ->GetI(toPointsKey1);
522 ->GetI(fromPointsKey1);
527 LibUtilities::eGaussRadauMAlpha1Beta0) &&
555 if (fromPointsKey1 == toPointsKey1)
561 ->GetI(toPointsKey0);
564 ->GetI(fromPointsKey0);
569 LibUtilities::eGaussRadauMAlpha1Beta0) &&
600 ->GetI(toPointsKey0);
603 ->GetI(fromPointsKey0);
607 ->GetI(toPointsKey1);
610 ->GetI(fromPointsKey1);
615 LibUtilities::eGaussRadauMAlpha1Beta0) &&
673 "CalcLocTracePhysToTraceIDMap not coded");
680 std::shared_ptr<LocalRegions::ExpansionVector> traceExp =
682 int ntotTrace = (*traceExp).size();
691 for (
int nt = 0; nt < ntotTrace; nt++)
693 ntPnts = tracelist->GetTotPoints(nt);
694 noffset = tracelist->GetPhys_Offset(nt);
695 for (
int i = 0; i < ntPnts; i++)
706 for (
int dir = 0; dir < 2; dir++)
729 for (
int ne = 0; ne < nedges; ne++)
731 Vmath::Fill(fnp, tmp[cnt1], &loctracePntsLR[dir][cnt], 1);
740 for (
int nlr = 0; nlr < 2; nlr++)
742 for (
int i = 0; i < loctracePntsLR[nlr].size(); i++)
745 std::round(loctracePntsLR[nlr][i]);
746 error +=
abs(loctracePntsLR[nlr][i] -
752 "m_LocTracephysToTraceIDMap may not be integer !!");
758 std::shared_ptr<LocalRegions::ExpansionVector> traceExp =
760 int ntotTrace = (*traceExp).size();
769 for (
int nt = 0; nt < ntotTrace; nt++)
771 ntPnts = tracelist->GetTotPoints(nt);
772 noffset = tracelist->GetPhys_Offset(nt);
773 for (
int i = 0; i < ntPnts; i++)
784 for (
int dir = 0; dir < 2; dir++)
813 int nfttl = fnp0 * fnp1;
817 Vmath::Fill(nfttl, tmp[cnt1], &loctracePntsLR[dir][cnt], 1);
826 for (
int nlr = 0; nlr < 2; nlr++)
828 for (
int i = 0; i < loctracePntsLR[nlr].size(); i++)
831 std::round(loctracePntsLR[nlr][i]);
832 error +=
abs(loctracePntsLR[nlr][i] -
838 "m_LocTracephysToTraceIDMap may not be integer !!");
850 const std::shared_ptr<LocalRegions::ExpansionVector> exptrac =
852 size_t ntrace = exptrac->size();
860 for (
int lr = 0; lr < 2; ++lr)
866 for (
int i = 0; i < ntrace; ++i)
868 size_t ncoeff = trace->GetNcoeffs(i);
877 trace->GetCoeffsToElmt();
879 for (
int lr = 0; lr < 2; ++lr)
882 for (
int i = 0; i < ntotcoeffs; ++i)
888 int ntraceelmt = trace_coeffToElmt[ncoeffTrace].first;
889 int ntracelocN = trace_coeffToElmt[ncoeffTrace].second;
891 int nfieldelmt = field_coeffToElmt[ncoeffField].first;
892 int nfieldlocN = field_coeffToElmt[ncoeffField].second;
894 LRAdjflag[lr][ntraceelmt] =
true;
895 LRAdjExpid[lr][ntraceelmt] = nfieldelmt;
897 elmtLRMap[lr][ntraceelmt][ntracelocN] = nfieldlocN;
898 elmtLRSign[lr][ntraceelmt][ntracelocN] =
sign;
910 const std::shared_ptr<LocalRegions::ExpansionVector> exptrac =
912 int ntrace = exptrac->size();
914 const std::shared_ptr<LocalRegions::ExpansionVector> exp = locExp.
GetExp();
915 int nexp = exp->size();
922 std::set<std::pair<int, int>> neighborSet;
924 for (
int nt = 0; nt < ntrace; nt++)
926 if (LRAdjflag[0][nt] && LRAdjflag[1][nt])
928 ntmp0 = LRAdjExpid[0][nt];
929 ntmp1 = LRAdjExpid[1][nt];
932 " ntmp0==ntmp1, trace inside a element?? ");
934 std::set<std::pair<int, int>>::iterator it = neighborSet.begin();
935 neighborSet.insert(it, std::make_pair(ntmp0, ntmp1));
936 neighborSet.insert(it, std::make_pair(ntmp1, ntmp0));
941 for (std::set<std::pair<int, int>>::iterator it = neighborSet.begin();
942 it != neighborSet.end(); ++it)
944 int ncurrent = it->first;
945 ElemIndex[ncurrent]++;
952 for (
int ne = 0; ne < nexp; ne++)
954 int neighb = ElemNeighbsNumb[ne];
959 for (
int ne = 0; ne < nexp; ne++)
963 for (std::set<std::pair<int, int>>::iterator it = neighborSet.begin();
964 it != neighborSet.end(); ++it)
966 int ncurrent = it->first;
967 int neighbor = it->second;
968 ElemNeighbsId[ncurrent][ElemIndex[ncurrent]] = neighbor;
969 ElemIndex[ncurrent]++;
973 for (
int ne = 0; ne < nexp; ne++)
976 for (
int nb = 0; nb < ElemNeighbsNumb[ne]; nb++)
978 int neighbId = ElemNeighbsId[ne][nb];
980 for (
int nc = 0; nc < ElemIndex[ne]; nc++)
982 if (ElemNeighbsId[ne][nb] == tmpId[ne][nc])
989 tmpId[ne][ElemIndex[ne]] = neighbId;
994 ElemNeighbsNumb = ElemIndex;
995 for (
int ne = 0; ne < nexp; ne++)
997 int neighb = ElemNeighbsNumb[ne];
1001 Vmath::Vcopy(neighb, tmpId[ne], 1, ElemNeighbsId[ne], 1);
1006 for (
int ne = 0; ne < nexp; ne++)
1008 for (
int nb = 0; nb < ElemNeighbsNumb[ne]; nb++)
1010 ASSERTL0((ElemNeighbsId[ne][nb] >= 0) &&
1011 (ElemNeighbsId[ne][nb] <= nexp),
1012 "Element id <0 or >number of total elements")
1049 size_t nfield =
field.size();
1081 ASSERTL1(dir < 2,
"option dir out of range, "
1082 " dir=0 is fwd, dir=1 is bwd");
1099 ASSERTL1(dir < 2,
"option dir out of range, "
1100 " dir=0 is fwd, dir=1 is bwd");
1144 ASSERTL1(dir < 2,
"option dir out of range, "
1145 " dir=0 is fwd, dir=1 is bwd");
1174 tmp.get() + cnt1, 1);
1181 I0->GetPtr().get(), tnp, locedges.get() + cnt,
1182 fnp, 0.0, tmp.get() + cnt1, tnp);
1189 for (
int k = 0; k < nedges; ++k)
1192 &tmp[cnt1 + k * tnp], 1);
1195 fnp, locedges.get() + cnt + k * fnp, 1, &I0[0], 1);
1201 "Invalid interpolation type for 2D elements");
1205 cnt += nedges * fnp;
1206 cnt1 += nedges * tnp;
1226 ASSERTL1(dir < 2,
"option dir out of range, "
1227 " dir=0 is fwd, dir=1 is bwd");
1255 int nfromfacepts = nfaces * fnp0 * fnp1;
1263 tmp.get() + cnt1, 1);
1269 Blas::Dgemm(
'N',
'N', tnp0, tnp1 * nfaces, fnp0, 1.0,
1270 I0->GetPtr().get(), tnp0, locfaces.get() + cnt,
1271 fnp0, 0.0, tmp.get() + cnt1, tnp0);
1277 for (
int k = 0; k < fnp0; ++k)
1280 fnp0, tmp.get() + cnt1 + k, tnp0);
1284 Blas::Dgemv(
'T', fnp0, tnp1 * nfaces, 1.0, tmp.get() + cnt1,
1285 tnp0, I0.get(), 1, 0.0,
1286 tmp.get() + cnt1 + tnp0 - 1, tnp0);
1295 locfaces.get() + cnt + j * fnp0 * fnp1,
1296 tnp0, I1->GetPtr().get(), tnp1, 0.0,
1297 tmp.get() + cnt1 + j * tnp0 * tnp1, tnp0);
1308 locfaces.get() + cnt + j * fnp0 * fnp1, 1,
1309 tmp.get() + cnt1 + j * tnp0 * tnp1, 1);
1312 for (
int k = 0; k < tnp0; ++k)
1314 tmp[cnt1 + k + (j + 1) * tnp0 * tnp1 - tnp0] =
1316 locfaces.get() + cnt +
1317 j * fnp0 * fnp1 + k,
1333 locfaces.get() + cnt + j * fnp0 * fnp1,
1334 fnp0, I1->GetPtr().get(), tnp1, 0.0,
1335 wsp.get() + j * fnp0 * tnp1, fnp0);
1338 fnp0, 1.0, I0->GetPtr().get(), tnp0, wsp.get(),
1339 fnp0, 0.0, tmp.get() + cnt1, tnp0);
1350 locfaces.get() + cnt + j * fnp0 * fnp1,
1351 fnp0, I1->GetPtr().get(), tnp1, 0.0,
1352 tmp.get() + cnt1 + j * tnp0 * tnp1, tnp0);
1356 tmp.get() + cnt1, tnp0, I0.get(), 1, 0.0,
1357 tmp.get() + cnt1 + tnp0 - 1, tnp0);
1361 ASSERTL0(
false,
"Interplation case needs implementing");
1364 cnt += nfromfacepts;
1402 ASSERTL1(dir < 2,
"option dir out of range, "
1403 " dir=0 is fwd, dir=1 is bwd");
1434 locedges.get() + cnt, 1);
1441 I0->GetPtr().get(), tnp, tmp.get() + cnt1, tnp,
1442 0.0, locedges.get() + cnt, fnp);
1449 for (
int k = 0; k < nedges; ++k)
1452 &locedges[cnt + k * fnp], 1);
1454 Vmath::Svtvp(fnp, tmp[cnt1 + k * tnp + tnp - 1], &I0[0],
1455 1, locedges.get() + cnt + k * fnp, 1,
1456 locedges.get() + cnt + k * fnp, 1);
1462 "Invalid interpolation type for 2D elements");
1466 cnt += nedges * fnp;
1467 cnt1 += nedges * tnp;
1483 ASSERTL1(dir < 2,
"option dir out of range, "
1484 " dir=0 is fwd, dir=1 is bwd");
1526 loctraces.get() + cnt, 1);
1533 I0->GetPtr().get(), tnp0, tmp.get() + cnt1,
1534 tnp0, 0.0, loctraces.get() + cnt, fnp0);
1540 for (
int k = 0; k < fnp0; ++k)
1542 Vmath::Vcopy(nfaces * fnp1, tmp.get() + cnt1 + k, tnp0,
1543 loctraces.get() + cnt + k, fnp0);
1547 for (
int k = 0; k < tnp1 * nfaces; k++)
1551 loctraces.get() + cnt + k * fnp0, 1,
1552 loctraces.get() + cnt + k * fnp0, 1);
1563 tmp.get() + cnt1 + j * tnp0 * tnp1, tnp0,
1564 I1->GetPtr().get(), tnp1, 0.0,
1565 loctraces.get() + cnt + j * fnp0 * fnp1,
1576 fnp0 * fnp1, tmp.get() + cnt1 + j * tnp0 * tnp1, 1,
1577 loctraces.get() + cnt + j * fnp0 * fnp1, 1);
1579 for (
int k = 0; k < fnp1; k++)
1583 &tmp[cnt1 + (j + 1) * tnp0 * tnp1 - tnp0], 1,
1584 &loctraces[cnt + j * fnp0 * fnp1 + k * fnp0], 1,
1585 &loctraces[cnt + j * fnp0 * fnp1 + k * fnp0],
1600 tnp0, 1.0, I0->GetPtr().get(), tnp0,
1601 tmp.get() + cnt1, tnp0, 0.0, wsp.get(), fnp0);
1606 wsp.get() + j * fnp0 * tnp1, fnp0,
1607 I1->GetPtr().get(), tnp1, 0.0,
1608 loctraces.get() + cnt + j * fnp0 * fnp1,
1624 &I0[0], 1, tmp.get() + cnt1 + k * tnp0, 1,
1625 wsp.get() + k * fnp0, 1);
1631 wsp.get() + j * fnp0 * tnp1, fnp0,
1632 I1->GetPtr().get(), tnp1, 0.0,
1633 loctraces.get() + cnt + j * fnp0 * fnp1,
1639 cnt += nfromfacepts;
1681 ASSERTL1(dir < 2,
"option dir out of range, "
1682 " dir=0 is fwd, dir=1 is bwd");
1714 locedges.get() + cnt1, 1);
1721 I0->GetPtr().get(), tnp, tmp.get() + cnt, fnp,
1722 0.0, locedges.get() + cnt1, tnp);
1728 for (
int k = 0; k < nedges; ++k)
1732 &locedges[cnt1 + k * tnp], 1);
1738 "Invalid interpolation type for 2D elements");
1742 cnt += nedges * fnp;
1743 cnt1 += nedges * tnp;
1760 ASSERTL1(dir < 2,
"option dir out of range, "
1761 " dir=0 is fwd, dir=1 is bwd");
1792 int nfromfacepts = nfaces * fnp0 * fnp1;
1800 locfaces.get() + cnt1, 1);
1806 Blas::Dgemm(
'N',
'N', tnp0, tnp1 * nfaces, fnp0, 1.0,
1807 I0->GetPtr().get(), tnp0, tmp.get() + cnt, fnp0,
1808 0.0, locfaces.get() + cnt1, tnp0);
1814 for (
int j = 0; j < nfaces; ++j)
1817 tmp.get() + cnt + j * fnp0 * fnp1, tnp0,
1818 I1->GetPtr().get(), tnp1, 0.0,
1819 locfaces.get() + cnt1 + j * tnp0 * tnp1,
1826 for (
int j = 0; j < nfaces; ++j)
1830 tnp0 * tnp1, tmp.get() + cnt + j * fnp0 * fnp1, 1,
1831 locfaces.get() + cnt1 + j * tnp0 * tnp1, 1);
1841 for (
int j = 0; j < nfaces; ++j)
1844 tmp.get() + cnt + j * fnp0 * fnp1, fnp0,
1845 I1->GetPtr().get(), tnp1, 0.0,
1846 wsp.get() + j * fnp0 * tnp1, fnp0);
1849 Blas::Dgemm(
'N',
'N', tnp0, tnp1 * nfaces, fnp0, 1.0,
1850 I0->GetPtr().get(), tnp0, wsp.get(), fnp0, 0.0,
1851 locfaces.get() + cnt1, tnp0);
1857 for (
int j = 0; j < nfaces; ++j)
1860 tmp.get() + cnt + j * fnp0 * fnp1, fnp0,
1861 I1->GetPtr().get(), tnp1, 0.0,
1862 locfaces.get() + cnt1 + j * tnp0 * tnp1,
1868 ASSERTL0(
false,
"Interpolation case not implemneted (yet)");
1871 cnt += nfromfacepts;
1888 for (
int i = 0; i < nvals; ++i)
1909 for (
int i = 0; i < nvals; ++i)
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define sign(a, b)
return the sign(b)*a
Defines a specification for a set of points.
PointsType GetPointsType() const
size_t GetNumPoints() const
Base class for all multi-elemental spectral/hp expansions.
const Array< OneD, const std::pair< int, int > > & GetCoeffsToElmt() const
Get m_coeffs to elemental value map.
int GetCoeff_Offset(int n) const
Get the start offset position for a local contiguous list of coeffs correspoinding to element n.
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
int GetPhys_Offset(int n) const
Get the start offset position for a local contiguous list of quadrature points in a full array corres...
Array< OneD, Array< OneD, Array< OneD, int > > > m_traceCoeffToLeftRightExpCoeffMap
The map of every coeff from current trace to the left & right adjacent expasion coeffs.
Array< OneD, Array< OneD, int > > m_traceCoeffsToElmtSign
Sign array for mapping from forwards/backwards trace coefficients to local trace storage.
Array< OneD, Array< OneD, int > > m_interpNtraces
Number of edges/faces on a 2D/3D element that require interpolation.
Array< OneD, Array< OneD, int > > m_locTraceToElmtTraceMap
A mapping from the local elemental trace points, arranged as all forwards traces followed by backward...
void InterpLocEdgesToTraceTranspose(const int dir, const Array< OneD, const NekDouble > &edges, Array< OneD, NekDouble > &locedges)
Transpose of interp local edges to Trace methods.
void InterpLocTracesToTraceTranspose(const int dir, const Array< OneD, const NekDouble > &traces, Array< OneD, NekDouble > &loctraces)
Array< OneD, Array< OneD, int > > m_traceCoeffsToElmtTrace
Mapping from forwards/backwards trace coefficients to the position of the trace element in global sto...
Array< OneD, Array< OneD, int > > m_leftRightAdjacentExpId
The expansion ID that are the left & right adjacent to current trace.
LocTraceToTraceMap(const ExpList &locExp, const ExpListSharedPtr &trace, const Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > &elmtToTrace, const std::vector< bool > &LeftAdjacents)
Set up trace to trace mapping components.
Array< OneD, Array< OneD, DNekMatSharedPtr > > m_interpFromTraceI1
Interpolation matrices for either 2D edges or first coordinate of 3D face using going "from' to 'to' ...
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_interpEndPtI0
Mapping to hold first coordinate direction endpoint interpolation, which can be more optimal if using...
void LocTracesFromField(const Array< OneD, const NekDouble > &field, Array< OneD, NekDouble > faces)
Gather the local elemental traces in physical space from field using m_locTraceToFieldMap....
void CalcLocTracePhysToTraceIDMap_3D(const ExpListSharedPtr &tracelist)
int m_nLocTracePts
The number of local trace points.
void InterpLocEdgesToTrace(const int dir, const Array< OneD, const NekDouble > &locfaces, Array< OneD, NekDouble > &edges)
Interpolate local trace edges to global trace edge point distributions where required.
int m_nTracePts
The number of global trace points.
void UnshuffleLocTraces(const int dir, const Array< OneD, const NekDouble > &loctraces, Array< OneD, NekDouble > unshuffle)
Unshuffle local elemental traces in physical space from similar faces points are blocked together to ...
void InterpLocTracesToTrace(const int dir, const Array< OneD, const NekDouble > &loctraces, Array< OneD, NekDouble > &traces)
Array< OneD, Array< OneD, bool > > m_leftRightAdjacentExpFlag
Flag indicates whether the expansion that are the left & right adjacent to current trace exists.
void CalcLocTracePhysToTraceIDMap(const ExpListSharedPtr &tracelist, const int ndim)
void AddLocTracesToField(const Array< OneD, const NekDouble > &faces, Array< OneD, NekDouble > &field)
Reverse process of LocTracesFromField() Add the local traces in physical space to field using m_locTr...
int m_nTraceCoeffs[2]
Number of forwards/backwards trace coefficients.
int m_nFwdLocTracePts
The number of forward trace points. A local trace element is ‘forward’ if it is the side selected for...
Array< OneD, Array< OneD, Array< OneD, int > > > m_traceCoeffToLeftRightExpCoeffSign
The sign of every coeff from current trace to the left & right adjacent expasion coeffs.
void InterpTraceToLocFaces(const int dir, const Array< OneD, const NekDouble > &faces, Array< OneD, NekDouble > &locfaces)
Interpolate global trace edge to local trace edges point distributions where required.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_interpEndPtI1
Mapping to hold second coordinate direction endpoint interpolation, which can be more optimal if usin...
void TraceLocToElmtLocCoeffMap(const ExpList &locExp, const ExpListSharedPtr &trace)
Set up maps between coefficients on trace and in cells.
Array< OneD, Array< OneD, int > > m_traceCoeffsToElmtMap
Mapping from forwards/backwards trace coefficients to elemental coefficient storage.
int m_expdim
Expansion Dimension we have setup for trace mapping.
Array< OneD, Array< OneD, InterpLocTraceToTrace > > m_interpTrace
A mapping holding the type of interpolation needed for each local trace. Dimension 0 holds forward tr...
void InterpTraceToLocEdges(const int dir, const Array< OneD, const NekDouble > &locfaces, Array< OneD, NekDouble > &edges)
Interpolate global trace edge to local trace edges point distributions where required.
void FwdLocTracesFromField(const Array< OneD, const NekDouble > &field, Array< OneD, NekDouble > faces)
Gather the forwards-oriented local traces in physical space from field using m_locTraceToFieldMap.
void Setup(const ExpList &locExp, const ExpListSharedPtr &trace, const Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > &elmtToTrace, const std::vector< bool > &LeftAdjacents)
Set up member variables for a two-dimensional problem.
Array< OneD, Array< OneD, int > > m_locInterpTraceToTraceMap
A mapping from local trace points to the global trace. Dimension 0 holds forward traces,...
Array< OneD, Array< OneD, int > > m_ElemNeighbsId
Array< OneD, Array< OneD, TraceInterpPoints > > m_interpPoints
Interpolation points key distributions to each of the local to global mappings.
Array< OneD, int > m_locTraceToFieldMap
A mapping from the local elemental trace points, arranged as all forwards traces followed by backward...
Array< OneD, Array< OneD, DNekMatSharedPtr > > m_interpFromTraceI0
Interpolation matrices for either 2D edges or first coordinate of 3D face using going "from' to 'to' ...
void AddTraceCoeffsToFieldCoeffs(const Array< OneD, const NekDouble > &trace, Array< OneD, NekDouble > &field)
Add contributions from trace coefficients to the elemental field storage.
void InterpLocFacesToTraceTranspose(const int dir, const Array< OneD, const NekDouble > &traces, Array< OneD, NekDouble > &loctraces)
Transpose of interp local faces to Trace methods.
Array< OneD, Array< OneD, DNekMatSharedPtr > > m_interpTraceI1
Interpolation matrices for the second coordinate of 3D face, not used in 2D.
Array< OneD, Array< OneD, DNekMatSharedPtr > > m_interpTraceI0
Interpolation matrices for either 2D edges or first coordinate of 3D face.
void FindElmtNeighbors(const ExpList &locExp, const ExpListSharedPtr &trace)
void InterpTraceToLocTrace(const int dir, const Array< OneD, NekDouble > &traces, Array< OneD, NekDouble > &loctraces)
Array< OneD, int > m_ElemNeighbsNumb
void ReshuffleLocTracesForInterp(const int dir, const Array< OneD, const NekDouble > &loctraces, Array< OneD, NekDouble > reshuffle)
Reshuffle local elemental traces in physical space so that similar faces points are blocked together ...
void CalcLocTracePhysToTraceIDMap_2D(const ExpListSharedPtr &tracelist)
virtual ~LocTraceToTraceMap()
Array< OneD, Array< OneD, int > > m_LocTracephysToTraceIDMap
void InterpLocFacesToTrace(const int dir, const Array< OneD, const NekDouble > &locfaces, Array< OneD, NekDouble > faces)
Interpolate local faces to trace face point distributions where required.
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 = alpha A x plus beta y where A[m x n].
static double Ddot(const int &n, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: output = .
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k], op(B)[k x n], C[m x n] DGEMM perfo...
PointsManagerT & PointsManager(void)
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ P
Monomial polynomials .
std::shared_ptr< Expansion > ExpansionSharedPtr
std::vector< ExpansionSharedPtr > ExpansionVector
@ eInterpEndPtDir0InterpDir1
std::tuple< LibUtilities::PointsKey, LibUtilities::PointsKey, LibUtilities::PointsKey, LibUtilities::PointsKey > TraceInterpPoints
Map holding points distributions required for interpolation of local traces onto global trace in two ...
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
static const NekDouble kNekZeroTol
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
@ eDir1FwdDir2_Dir2FwdDir1
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Gathr(I n, const T *x, const I *y, T *z)
Gather vector z[i] = x[y[i]].
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 Scatr(int n, const T *x, const int *y, T *z)
Scatter vector z[y[i]] = x[i].
void Assmb(int n, const T *x, const int *y, T *z)
Assemble z[y[i]] += x[i]; z should be zero'd first.
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 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 > abs(scalarT< T > in)