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.data() + cnt1, 1);
 
 1181                                I0->GetPtr().data(), tnp, locedges.data() + cnt,
 
 1182                                fnp, 0.0, tmp.data() + cnt1, tnp);
 
 1189                    for (
int k = 0; k < nedges; ++k)
 
 1192                                     &tmp[cnt1 + k * tnp], 1);
 
 1195                            fnp, locedges.data() + 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.data() + cnt1, 1);
 
 1269                    Blas::Dgemm(
'N', 
'N', tnp0, tnp1 * nfaces, fnp0, 1.0,
 
 1270                                I0->GetPtr().data(), tnp0,
 
 1271                                locfaces.data() + cnt, fnp0, 0.0,
 
 1272                                tmp.data() + cnt1, tnp0);
 
 1278                    for (
int k = 0; k < fnp0; ++k)
 
 1281                                     fnp0, tmp.data() + cnt1 + k, tnp0);
 
 1286                                tmp.data() + cnt1, tnp0, I0.data(), 1, 0.0,
 
 1287                                tmp.data() + cnt1 + tnp0 - 1, tnp0);
 
 1296                                    locfaces.data() + cnt + j * fnp0 * fnp1,
 
 1297                                    tnp0, I1->GetPtr().data(), tnp1, 0.0,
 
 1298                                    tmp.data() + cnt1 + j * tnp0 * tnp1, tnp0);
 
 1309                                     locfaces.data() + cnt + j * fnp0 * fnp1, 1,
 
 1310                                     tmp.data() + cnt1 + j * tnp0 * tnp1, 1);
 
 1313                        for (
int k = 0; k < tnp0; ++k)
 
 1315                            tmp[cnt1 + k + (j + 1) * tnp0 * tnp1 - tnp0] =
 
 1317                                           locfaces.data() + cnt +
 
 1318                                               j * fnp0 * fnp1 + k,
 
 1334                                    locfaces.data() + cnt + j * fnp0 * fnp1,
 
 1335                                    fnp0, I1->GetPtr().data(), tnp1, 0.0,
 
 1336                                    wsp.data() + j * fnp0 * tnp1, fnp0);
 
 1339                                fnp0, 1.0, I0->GetPtr().data(), tnp0,
 
 1340                                wsp.data(), fnp0, 0.0, tmp.data() + cnt1, tnp0);
 
 1351                                    locfaces.data() + cnt + j * fnp0 * fnp1,
 
 1352                                    fnp0, I1->GetPtr().data(), tnp1, 0.0,
 
 1353                                    tmp.data() + cnt1 + j * tnp0 * tnp1, tnp0);
 
 1357                                tmp.data() + cnt1, tnp0, I0.data(), 1, 0.0,
 
 1358                                tmp.data() + cnt1 + tnp0 - 1, tnp0);
 
 1362                    ASSERTL0(
false, 
"Interplation case needs implementing");
 
 1365            cnt += nfromfacepts;
 
 1403    ASSERTL1(dir < 2, 
"option dir out of range, " 
 1404                      " dir=0 is fwd, dir=1 is bwd");
 
 1435                                 locedges.data() + cnt, 1);
 
 1442                                I0->GetPtr().data(), tnp, tmp.data() + cnt1,
 
 1443                                tnp, 0.0, locedges.data() + cnt, fnp);
 
 1450                    for (
int k = 0; k < nedges; ++k)
 
 1453                                     &locedges[cnt + k * fnp], 1);
 
 1455                        Vmath::Svtvp(fnp, tmp[cnt1 + k * tnp + tnp - 1], &I0[0],
 
 1456                                     1, locedges.data() + cnt + k * fnp, 1,
 
 1457                                     locedges.data() + cnt + k * fnp, 1);
 
 1463                             "Invalid interpolation type for 2D elements");
 
 1467            cnt += nedges * fnp;
 
 1468            cnt1 += nedges * tnp;
 
 1484    ASSERTL1(dir < 2, 
"option dir out of range, " 
 1485                      " dir=0 is fwd, dir=1 is bwd");
 
 1527                                 loctraces.data() + cnt, 1);
 
 1534                                I0->GetPtr().data(), tnp0, tmp.data() + cnt1,
 
 1535                                tnp0, 0.0, loctraces.data() + cnt, fnp0);
 
 1541                    for (
int k = 0; k < fnp0; ++k)
 
 1543                        Vmath::Vcopy(nfaces * fnp1, tmp.data() + cnt1 + k, tnp0,
 
 1544                                     loctraces.data() + cnt + k, fnp0);
 
 1548                    for (
int k = 0; k < tnp1 * nfaces; k++)
 
 1552                                     loctraces.data() + cnt + k * fnp0, 1,
 
 1553                                     loctraces.data() + cnt + k * fnp0, 1);
 
 1564                                    tmp.data() + cnt1 + j * tnp0 * tnp1, tnp0,
 
 1565                                    I1->GetPtr().data(), tnp1, 0.0,
 
 1566                                    loctraces.data() + cnt + j * fnp0 * fnp1,
 
 1577                            fnp0 * fnp1, tmp.data() + cnt1 + j * tnp0 * tnp1, 1,
 
 1578                            loctraces.data() + cnt + j * fnp0 * fnp1, 1);
 
 1580                        for (
int k = 0; k < fnp1; k++)
 
 1584                                &tmp[cnt1 + (j + 1) * tnp0 * tnp1 - tnp0], 1,
 
 1585                                &loctraces[cnt + j * fnp0 * fnp1 + k * fnp0], 1,
 
 1586                                &loctraces[cnt + j * fnp0 * fnp1 + k * fnp0],
 
 1601                                tnp0, 1.0, I0->GetPtr().data(), tnp0,
 
 1602                                tmp.data() + cnt1, tnp0, 0.0, wsp.data(), fnp0);
 
 1607                                    wsp.data() + j * fnp0 * tnp1, fnp0,
 
 1608                                    I1->GetPtr().data(), tnp1, 0.0,
 
 1609                                    loctraces.data() + cnt + j * fnp0 * fnp1,
 
 1625                                     &I0[0], 1, tmp.data() + cnt1 + k * tnp0, 1,
 
 1626                                     wsp.data() + k * fnp0, 1);
 
 1632                                    wsp.data() + j * fnp0 * tnp1, fnp0,
 
 1633                                    I1->GetPtr().data(), tnp1, 0.0,
 
 1634                                    loctraces.data() + cnt + j * fnp0 * fnp1,
 
 1640            cnt += nfromfacepts;
 
 1682    ASSERTL1(dir < 2, 
"option dir out of range, " 
 1683                      " dir=0 is fwd, dir=1 is bwd");
 
 1716                                 locedges.data() + cnt1, 1);
 
 1723                                I0->GetPtr().data(), tnp, tmp.data() + cnt, fnp,
 
 1724                                0.0, locedges.data() + cnt1, tnp);
 
 1730                    for (
int k = 0; k < nedges; ++k)
 
 1734                                     &locedges[cnt1 + k * tnp], 1);
 
 1740                             "Invalid interpolation type for 2D elements");
 
 1744            cnt += nedges * fnp;
 
 1745            cnt1 += nedges * tnp;
 
 1762    ASSERTL1(dir < 2, 
"option dir out of range, " 
 1763                      " dir=0 is fwd, dir=1 is bwd");
 
 1795            int nfromfacepts = nfaces * fnp0 * fnp1;
 
 1803                                 locfaces.data() + cnt1, 1);
 
 1809                    Blas::Dgemm(
'N', 
'N', tnp0, tnp1 * nfaces, fnp0, 1.0,
 
 1810                                I0->GetPtr().data(), tnp0, tmp.data() + cnt,
 
 1811                                fnp0, 0.0, locfaces.data() + cnt1, tnp0);
 
 1817                    for (
int j = 0; j < nfaces; ++j)
 
 1820                                    tmp.data() + cnt + j * fnp0 * fnp1, tnp0,
 
 1821                                    I1->GetPtr().data(), tnp1, 0.0,
 
 1822                                    locfaces.data() + cnt1 + j * tnp0 * tnp1,
 
 1829                    for (
int j = 0; j < nfaces; ++j)
 
 1833                            tnp0 * tnp1, tmp.data() + cnt + j * fnp0 * fnp1, 1,
 
 1834                            locfaces.data() + cnt1 + j * tnp0 * tnp1, 1);
 
 1844                    for (
int j = 0; j < nfaces; ++j)
 
 1847                                    tmp.data() + cnt + j * fnp0 * fnp1, fnp0,
 
 1848                                    I1->GetPtr().data(), tnp1, 0.0,
 
 1849                                    wsp.data() + j * fnp0 * tnp1, fnp0);
 
 1852                    Blas::Dgemm(
'N', 
'N', tnp0, tnp1 * nfaces, fnp0, 1.0,
 
 1853                                I0->GetPtr().data(), tnp0, wsp.data(), fnp0,
 
 1854                                0.0, locfaces.data() + cnt1, tnp0);
 
 1860                    for (
int j = 0; j < nfaces; ++j)
 
 1863                                    tmp.data() + cnt + j * fnp0 * fnp1, fnp0,
 
 1864                                    I1->GetPtr().data(), tnp1, 0.0,
 
 1865                                    locfaces.data() + cnt1 + j * tnp0 * tnp1,
 
 1871                    ASSERTL0(
false, 
"Interpolation case not implemneted (yet)");
 
 1874            cnt += nfromfacepts;
 
 1891    for (
int i = 0; i < nvals; ++i)
 
 1912    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)