47 using namespace LibUtilities;
49 namespace MultiRegions
54 string PreconditionerLowEnergy::className =
56 PreconditionerLowEnergy::create,
57 "LowEnergy Preconditioning");
66 PreconditionerLowEnergy::PreconditionerLowEnergy(
67 const std::shared_ptr<GlobalLinSys> &plinsys,
79 "Solver type not valid");
81 std::shared_ptr<MultiRegions::ExpList> expList =
82 ((
m_linsys.lock())->GetLocMat()).lock();
84 m_comm = expList->GetComm();
88 locExpansion = expList->GetExp(0);
90 int nDim = locExpansion->GetShapeDimension();
92 ASSERTL0(nDim == 3,
"Preconditioner type only valid in 3D");
120 std::shared_ptr<MultiRegions::ExpList> expList =
121 ((
m_linsys.lock())->GetLocMat()).lock();
126 int nVerts, nEdges, nFaces;
127 int eid, fid, n, cnt, nmodes, nedgemodes, nfacemodes;
131 int vMap1, vMap2, sign1, sign2;
132 int m, v, eMap1, eMap2, fMap1, fMap2;
133 int offset, globalrow, globalcol, nCoeffs;
139 expList->GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
157 int nDirBnd = asmMap->GetNumGlobalDirBndCoeffs();
158 int nNonDirVerts = asmMap->GetNumNonDirVertexModes();
162 nNonDirVerts, nNonDirVerts, zero, vertstorage);
168 int n_exp = expList->GetNumElmts();
169 int nNonDirEdgeIDs = asmMap->GetNumNonDirEdges();
170 int nNonDirFaceIDs = asmMap->GetNumNonDirFaces();
174 map<int, int> uniqueEdgeMap;
175 map<int, int> uniqueFaceMap;
182 expList->GetBndCondExpansions();
185 &bndConditions = expList->GetBndConditions();
192 for (i = 0; i < extradiredges.size(); ++i)
194 meshEdgeId = extradiredges[i];
195 edgeDirMap.insert(meshEdgeId);
199 for (i = 0; i < bndCondExp.size(); i++)
202 for (j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
205 std::dynamic_pointer_cast<LocalRegions::Expansion2D>(
206 bndCondExp[i]->GetExp(j));
207 if (bndConditions[i]->GetBoundaryConditionType() ==
210 for (k = 0; k < bndCondFaceExp->GetNtraces(); k++)
212 meshEdgeId = bndCondFaceExp->GetGeom()->GetEid(k);
213 if (edgeDirMap.count(meshEdgeId) == 0)
215 edgeDirMap.insert(meshEdgeId);
218 meshFaceId = bndCondFaceExp->GetGeom()->GetGlobalID();
219 faceDirMap.insert(meshFaceId);
227 int nlocalNonDirEdges = 0;
228 int nlocalNonDirFaces = 0;
229 int ntotalentries = 0;
231 map<int, int> EdgeSize;
232 map<int, int> FaceSize;
233 map<int, pair<int, int>> FaceModes;
236 for (n = 0; n < n_exp; ++n)
241 for (j = 0; j < nEdges; ++j)
243 int nEdgeInteriorCoeffs = locExpansion->GetEdgeNcoeffs(j) - 2;
247 if (EdgeSize.count(meshEdgeId) == 0)
249 EdgeSize[meshEdgeId] = nEdgeInteriorCoeffs;
253 EdgeSize[meshEdgeId] =
254 min(EdgeSize[meshEdgeId], nEdgeInteriorCoeffs);
258 nFaces = locExpansion->GetNtraces();
259 for (j = 0; j < nFaces; ++j)
261 int nFaceInteriorCoeffs = locExpansion->GetTraceIntNcoeffs(j);
262 meshFaceId = locExpansion->GetGeom3D()->GetFid(j);
264 if (FaceSize.count(meshFaceId) == 0)
266 FaceSize[meshFaceId] = nFaceInteriorCoeffs;
269 locExpansion->GetTraceNumModes(j, m0, m1,
270 locExpansion->GetTraceOrient(j));
271 FaceModes[meshFaceId] = pair<int, int>(m0, m1);
275 if (nFaceInteriorCoeffs < FaceSize[meshFaceId])
277 FaceSize[meshFaceId] = nFaceInteriorCoeffs;
279 locExpansion->GetTraceNumModes(
280 j, m0, m1, locExpansion->GetTraceOrient(j));
281 FaceModes[meshFaceId] = pair<int, int>(m0, m1);
287 bool verbose = expList->GetSession()->DefinesCmdLineArgument(
"verbose");
291 if (
m_comm->GetSize() > 1)
293 int EdgeSizeLen = EdgeSize.size();
294 int FaceSizeLen = FaceSize.size();
298 map<int, int>::iterator it;
302 for (it = EdgeSize.begin(); it != EdgeSize.end(); ++it, ++cnt)
304 FacetMap[cnt] = it->first;
305 maxid = max(it->first, maxid);
306 FacetLen[cnt] = it->second;
312 for (it = FaceSize.begin(); it != FaceSize.end(); ++it, ++cnt)
314 FacetMap[cnt] = it->first + maxid;
315 FacetLen[cnt] = it->second;
323 for (it = EdgeSize.begin(); it != EdgeSize.end(); ++it, ++cnt)
325 it->second = (int)FacetLen[cnt];
328 for (it = FaceSize.begin(); it != FaceSize.end(); ++it, ++cnt)
330 it->second = (int)FacetLen[cnt];
337 int matrixlocation = 0;
340 for (
auto &pIt : periodicEdges)
342 meshEdgeId = pIt.first;
344 if (edgeDirMap.count(meshEdgeId) == 0)
346 dof = EdgeSize[meshEdgeId];
347 if (uniqueEdgeMap.count(meshEdgeId) == 0 && dof > 0)
349 bool SetUpNewEdge =
true;
351 for (i = 0; i < pIt.second.size(); ++i)
353 if (!pIt.second[i].isLocal)
358 int meshEdgeId2 = pIt.second[i].id;
359 if (edgeDirMap.count(meshEdgeId2) == 0)
361 if (uniqueEdgeMap.count(meshEdgeId2) != 0)
364 uniqueEdgeMap[meshEdgeId] =
365 uniqueEdgeMap[meshEdgeId2];
366 SetUpNewEdge =
false;
371 edgeDirMap.insert(meshEdgeId);
372 SetUpNewEdge =
false;
378 uniqueEdgeMap[meshEdgeId] = matrixlocation;
379 globaloffset[matrixlocation] += ntotalentries;
380 modeoffset[matrixlocation] = dof * dof;
381 ntotalentries += dof * dof;
382 nblks[matrixlocation++] = dof;
388 for (cnt = n = 0; n < n_exp; ++n)
392 for (j = 0; j < locExpansion->GetNedges(); ++j)
394 meshEdgeId = locExpansion->
GetGeom()->GetEid(j);
395 dof = EdgeSize[meshEdgeId];
396 maxEdgeDof = (dof > maxEdgeDof ? dof : maxEdgeDof);
398 if (edgeDirMap.count(meshEdgeId) == 0)
400 if (uniqueEdgeMap.count(meshEdgeId) == 0 && dof > 0)
403 uniqueEdgeMap[meshEdgeId] = matrixlocation;
405 globaloffset[matrixlocation] += ntotalentries;
406 modeoffset[matrixlocation] = dof * dof;
407 ntotalentries += dof * dof;
408 nblks[matrixlocation++] = dof;
410 nlocalNonDirEdges += dof * dof;
418 for (
auto &pIt : periodicFaces)
420 meshFaceId = pIt.first;
422 if (faceDirMap.count(meshFaceId) == 0)
424 dof = FaceSize[meshFaceId];
426 if (uniqueFaceMap.count(meshFaceId) == 0 && dof > 0)
428 bool SetUpNewFace =
true;
430 if (pIt.second[0].isLocal)
432 int meshFaceId2 = pIt.second[0].id;
434 if (faceDirMap.count(meshFaceId2) == 0)
436 if (uniqueFaceMap.count(meshFaceId2) != 0)
439 uniqueFaceMap[meshFaceId] =
440 uniqueFaceMap[meshFaceId2];
441 SetUpNewFace =
false;
446 faceDirMap.insert(meshFaceId);
447 SetUpNewFace =
false;
453 uniqueFaceMap[meshFaceId] = matrixlocation;
455 modeoffset[matrixlocation] = dof * dof;
456 globaloffset[matrixlocation] += ntotalentries;
457 ntotalentries += dof * dof;
458 nblks[matrixlocation++] = dof;
464 for (cnt = n = 0; n < n_exp; ++n)
468 for (j = 0; j < locExpansion->GetNtraces(); ++j)
470 meshFaceId = locExpansion->
GetGeom()->GetFid(j);
472 dof = FaceSize[meshFaceId];
473 maxFaceDof = (dof > maxFaceDof ? dof : maxFaceDof);
475 if (faceDirMap.count(meshFaceId) == 0)
477 if (uniqueFaceMap.count(meshFaceId) == 0 && dof > 0)
479 uniqueFaceMap[meshFaceId] = matrixlocation;
480 modeoffset[matrixlocation] = dof * dof;
481 globaloffset[matrixlocation] += ntotalentries;
482 ntotalentries += dof * dof;
483 nblks[matrixlocation++] = dof;
485 nlocalNonDirFaces += dof * dof;
496 nlocalNonDirEdges + nlocalNonDirFaces, -1);
502 int matrixoffset = 0;
504 int uniEdgeOffset = 0;
508 for (n = 0; n < n_exp; ++n)
510 for (j = 0; j < locExpansion->GetNedges(); ++j)
516 uniEdgeOffset = max(meshEdgeId, uniEdgeOffset);
522 uniEdgeOffset = uniEdgeOffset * maxEdgeDof * maxEdgeDof;
524 for (n = 0; n < n_exp; ++n)
529 for (j = 0; j < locExpansion->GetNedges(); ++j)
532 meshEdgeId = locExpansion->
GetGeom()->GetEid(j);
534 nedgemodes = EdgeSize[meshEdgeId];
536 if (edgeDirMap.count(meshEdgeId) == 0 && nedgemodes > 0)
539 int edgeOffset = globaloffset[uniqueEdgeMap[meshEdgeId]];
542 int uniOffset = meshEdgeId;
543 auto pIt = periodicEdges.find(meshEdgeId);
544 if (pIt != periodicEdges.end())
546 for (
int l = 0; l < pIt->second.size(); ++l)
548 uniOffset = min(uniOffset, pIt->second[l].id);
551 uniOffset = uniOffset * maxEdgeDof * maxEdgeDof;
553 for (k = 0; k < nedgemodes * nedgemodes; ++k)
555 vGlobal = edgeOffset + k;
556 localToGlobalMatrixMap[matrixoffset + k] = vGlobal;
557 BlockToUniversalMap[vGlobal] = uniOffset + k + 1;
559 matrixoffset += nedgemodes * nedgemodes;
566 for (j = 0; j < locExpansion->GetNtraces(); ++j)
569 meshFaceId = locExpansion->GetGeom()->GetFid(j);
571 nfacemodes = FaceSize[meshFaceId];
574 if (faceDirMap.count(meshFaceId) == 0 && nfacemodes > 0)
577 int faceOffset = globaloffset[uniqueFaceMap[meshFaceId]];
579 int uniOffset = meshFaceId;
581 auto pIt = periodicFaces.find(meshFaceId);
582 if (pIt != periodicFaces.end())
584 uniOffset = min(uniOffset, pIt->second[0].id);
586 uniOffset = uniOffset * maxFaceDof * maxFaceDof;
588 for (k = 0; k < nfacemodes * nfacemodes; ++k)
590 vGlobal = faceOffset + k;
592 localToGlobalMatrixMap[matrixoffset + k] = vGlobal;
594 BlockToUniversalMap[vGlobal] =
595 uniOffset + uniEdgeOffset + k + 1;
597 matrixoffset += nfacemodes * nfacemodes;
604 map<int, int>::iterator it;
606 n_blks[0] = nNonDirVerts;
607 for (i = 1, it = nblks.begin(); it != nblks.end(); ++it)
609 n_blks[i++] = it->second;
618 for (cnt = n = 0; n < n_exp; ++n)
630 nVerts = locExpansion->GetGeom()->GetNumVerts();
631 nEdges = locExpansion->GetGeom()->GetNumEdges();
632 nFaces = locExpansion->GetGeom()->GetNumFaces();
635 loc_mat = (
m_linsys.lock())->GetStaticCondBlock(n);
638 bnd_mat = loc_mat->GetBlock(0, 0);
641 offset = bnd_mat->GetRows();
645 DNekMat Sloc(nCoeffs, nCoeffs);
650 for (
int i = 0; i < nCoeffs; ++i)
652 for (
int j = 0; j < nCoeffs; ++j)
656 Sloc.SetValue(i, j, val);
665 for (v = 0; v < nVerts; ++v)
667 vMap1 = locExpansion->GetVertexMap(v);
670 globalrow = asmMap->GetLocalToGlobalBndMap(cnt + vMap1) - nDirBnd;
674 for (m = 0; m < nVerts; ++m)
676 vMap2 = locExpansion->GetVertexMap(m);
681 asmMap->GetLocalToGlobalBndMap(cnt + vMap2) - nDirBnd;
684 if (globalcol == globalrow)
687 sign1 = asmMap->GetLocalToGlobalBndSign(cnt + vMap1);
688 sign2 = asmMap->GetLocalToGlobalBndSign(cnt + vMap2);
690 vertArray[globalrow] +=
691 sign1 * sign2 * RSRT(vMap1, vMap2);
693 meshVertId = locExpansion->GetGeom()->GetVid(v);
695 auto pIt = periodicVerts.find(meshVertId);
696 if (pIt != periodicVerts.end())
698 for (k = 0; k < pIt->second.size(); ++k)
700 meshVertId = min(meshVertId, pIt->second[k].id);
704 VertBlockToUniversalMap[globalrow] = meshVertId + 1;
711 for (eid = 0; eid < nEdges; ++eid)
718 nedgemodes = EdgeSize[meshEdgeId];
724 nedgemodes, nedgemodes, zero, storage);
727 locExpansion->GetEdgeInverseBoundaryMap(eid);
729 if (edgeDirMap.count(meshEdgeId) == 0)
731 for (v = 0; v < nedgemodesloc; ++v)
733 eMap1 = edgemodearray[v];
734 sign1 = asmMap->GetLocalToGlobalBndSign(cnt + eMap1);
741 for (m = 0; m < nedgemodesloc; ++m)
743 eMap2 = edgemodearray[m];
747 asmMap->GetLocalToGlobalBndSign(cnt + eMap2);
750 sign1 * sign2 * RSRT(eMap1, eMap2);
755 BlockArray[matrixoffset + v * nedgemodes + m] =
760 matrixoffset += nedgemodes * nedgemodes;
766 for (fid = 0; fid < nFaces; ++fid)
772 nfacemodes = FaceSize[meshFaceId];
777 nfacemodes, nfacemodes, zero, storage);
779 if (faceDirMap.count(meshFaceId) == 0)
783 locExpansion->GetTraceOrient(fid);
785 auto pIt = periodicFaces.find(meshFaceId);
786 if (pIt != periodicFaces.end())
788 if (meshFaceId == min(meshFaceId, pIt->second[0].id))
791 faceOrient, pIt->second[0].orient);
795 facemodearray = locExpansion->GetTraceInverseBoundaryMap(
796 fid, faceOrient, FaceModes[meshFaceId].first,
797 FaceModes[meshFaceId].second);
799 for (v = 0; v < nfacemodes; ++v)
801 fMap1 = facemodearray[v];
803 sign1 = asmMap->GetLocalToGlobalBndSign(cnt + fMap1);
806 "Something is wrong since we "
807 "shoudl only be extracting modes for "
808 "lowest order expansion");
810 for (m = 0; m < nfacemodes; ++m)
812 fMap2 = facemodearray[m];
816 asmMap->GetLocalToGlobalBndSign(cnt + fMap2);
819 "Something is wrong since "
820 "we shoudl only be extracting modes for "
821 "lowest order expansion");
826 sign1 * sign2 * RSRT(fMap1, fMap2);
830 BlockArray[matrixoffset + v * nfacemodes + m] =
834 matrixoffset += nfacemodes * nfacemodes;
843 if (nNonDirVerts != 0)
854 Vmath::Assmb(BlockArray.size(), BlockArray, localToGlobalMatrixMap,
863 for (
int i = 0; i < nNonDirVerts; ++i)
865 VertBlk->SetValue(i, i, 1.0 / vertArray[i]);
876 for (
int loc = 0;
loc < n_blks.size() - 1; ++
loc)
878 nmodes = n_blks[1 +
loc];
882 for (v = 0; v < nmodes; ++v)
884 for (m = 0; m < nmodes; ++m)
886 NekDouble Value = GlobalBlock[offset + v * nmodes + m];
887 gmat->SetValue(v, m, Value);
891 offset += modeoffset[
loc];
895 int totblks =
m_BlkMat->GetNumberOfBlockRows();
896 for (i = 1; i < totblks; ++i)
898 unsigned int nmodes =
m_BlkMat->GetNumberOfRowsInBlockRow(i);
922 int nNonDir = nGlobal - nDir;
938 std::shared_ptr<MultiRegions::ExpList> expList =
939 ((
m_linsys.lock())->GetLocMat()).lock();
942 map<int, int> EdgeSize;
946 std::map<ShapeType, DNekScalMatSharedPtr> maxRmat;
947 map<ShapeType, LocalRegions::Expansion3DSharedPtr> maxElmt;
948 map<ShapeType, Array<OneD, unsigned int>> vertMapMaxR;
949 map<ShapeType, Array<OneD, Array<OneD, unsigned int>>> edgeMapMaxR;
958 int n_exp = expList->GetNumElmts();
964 nbdry_size, nbdry_size, blkmatStorage);
966 nbdry_size, nbdry_size, blkmatStorage);
976 for (n = 0; n < n_exp; ++n)
982 int nbndcoeffs = locExp->NumBndryCoeffs();
986 rmat =
ExtractLocMat(locExp, maxRmat[eltype], maxElmt[eltype],
987 vertMapMaxR[eltype], edgeMapMaxR[eltype]);
989 m_RBlk->SetBlock(n, n, rmat);
997 m_sameBlock.push_back(pair<int, int>(1, nbndcoeffs));
1006 for (
int i = 0; i < 3; ++i)
1008 if (locExpSav->GetBasis(i) != locExp->GetBasis(i))
1017 m_RBlk->SetBlock(n, n, rmat);
1021 (pair<int, int>(
m_sameBlock[offset].first + 1, nbndcoeffs));
1025 rmat =
ExtractLocMat(locExp, maxRmat[eltype], maxElmt[eltype],
1026 vertMapMaxR[eltype], edgeMapMaxR[eltype]);
1029 m_RBlk->SetBlock(n, n, rmat);
1036 m_sameBlock.push_back(pair<int, int>(1, nbndcoeffs));
1054 int nLocBndDofs =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1071 Blas::Dgemm(
'N',
'N', nbndcoeffs, nexp, nbndcoeffs, 1.0,
1072 &(R.GetBlock(cnt1, cnt1)->GetPtr()[0]), nbndcoeffs,
1073 pLocalIn.get() + cnt, nbndcoeffs, 0.0, pInOut.get() + cnt,
1075 cnt += nbndcoeffs * nexp;
1092 int nLocBndDofs =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1094 ASSERTL1(pInOut.size() >= nLocBndDofs,
1095 "Output array is not greater than the nLocBndDofs");
1109 Blas::Dgemm(
'T',
'N', nbndcoeffs, nexp, nbndcoeffs, 1.0,
1110 &(R.GetBlock(cnt1, cnt1)->GetPtr()[0]), nbndcoeffs,
1111 pLocalIn.get() + cnt, nbndcoeffs, 0.0, pInOut.get() + cnt,
1113 cnt += nbndcoeffs * nexp;
1130 int nLocBndDofs =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1132 ASSERTL1(pInput.size() >= nLocBndDofs,
1133 "Input array is smaller than nLocBndDofs");
1134 ASSERTL1(pOutput.size() >= nLocBndDofs,
1135 "Output array is smaller than nLocBndDofs");
1149 Blas::Dgemm(
'N',
'N', nbndcoeffs, nexp, nbndcoeffs, 1.0,
1150 &(invR.GetBlock(cnt1, cnt1)->GetPtr()[0]), nbndcoeffs,
1151 pLocalIn.get() + cnt, nbndcoeffs, 0.0, pOutput.get() + cnt,
1153 cnt += nbndcoeffs * nexp;
1168 int nLocBndDofs =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1170 ASSERTL1(pInput.size() >= nLocBndDofs,
1171 "Input array is less than nLocBndDofs");
1172 ASSERTL1(pOutput.size() >= nLocBndDofs,
1173 "Output array is less than nLocBndDofs");
1187 Blas::Dgemm(
'T',
'N', nbndcoeffs, nexp, nbndcoeffs, 1.0,
1188 &(invR.GetBlock(cnt1, cnt1)->GetPtr()[0]), nbndcoeffs,
1189 pLocalIn.get() + cnt, nbndcoeffs, 0.0, pOutput.get() + cnt,
1191 cnt += nbndcoeffs * nexp;
1204 int n,
int bndoffset,
const std::shared_ptr<DNekScalMat> &loc_mat)
1206 std::shared_ptr<MultiRegions::ExpList> expList =
1207 ((
m_linsys.lock())->GetLocMat()).lock();
1210 locExpansion = expList->GetExp(n);
1211 unsigned int nbnd = locExpansion->NumBndryCoeffs();
1228 for (
int i = 0; i < nbnd; ++i)
1230 for (
int j = 0; j < nbnd; ++j)
1234 Sloc.SetValue(i, j, val);
1254 unsigned int nLocBnd =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1259 asmMap->GetLocalToGlobalBndSign();
1265 for (i = 0; i < nLocBnd; ++i)
1288 const int three = 3;
1289 const int nVerts = 6;
1290 const double point[][3] = {
1295 {0, -1,
sqrt(
double(3))},
1296 {0, 1,
sqrt(
double(3))},
1301 for (
int i = 0; i < nVerts; ++i)
1304 three, i, point[i][0], point[i][1], point[i][2]);
1306 const int nEdges = 9;
1307 const int vertexConnectivity[][2] = {{0, 1}, {1, 2}, {3, 2}, {0, 3}, {0, 4},
1308 {1, 4}, {2, 5}, {3, 5}, {4, 5}};
1312 for (
int i = 0; i < nEdges; ++i)
1315 for (
int j = 0; j < 2; ++j)
1317 vertsArray[j] = verts[vertexConnectivity[i][j]];
1320 i, three, vertsArray);
1327 const int nFaces = 5;
1329 const int quadEdgeConnectivity[][4] = {
1330 {0, 1, 2, 3}, {1, 6, 8, 5}, {3, 7, 8, 4}};
1332 const int quadId[] = {0, -1, 1, -1, 2};
1335 const int triEdgeConnectivity[][3] = {{0, 5, 4}, {2, 6, 7}};
1337 const int triId[] = {-1, 0, -1, 1, -1};
1341 for (
int f = 0; f < nFaces; ++f)
1343 if (f == 1 || f == 3)
1347 for (
int j = 0; j < 3; ++j)
1349 edgeArray[j] = edges[triEdgeConnectivity[i][j]];
1359 for (
int j = 0; j < 4; ++j)
1361 edgeArray[j] = edges[quadEdgeConnectivity[i][j]];
1385 const int nVerts = 5;
1386 const double point[][3] = {{-1, -1, 0},
1390 {0, 0,
sqrt(
double(2))}};
1393 const int three = 3;
1395 for (
int i = 0; i < nVerts; ++i)
1398 three, i, point[i][0], point[i][1], point[i][2]);
1400 const int nEdges = 8;
1401 const int vertexConnectivity[][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 0},
1402 {0, 4}, {1, 4}, {2, 4}, {3, 4}};
1406 for (
int i = 0; i < nEdges; ++i)
1409 for (
int j = 0; j < 2; ++j)
1411 vertsArray[j] = verts[vertexConnectivity[i][j]];
1414 i, three, vertsArray);
1421 const int nFaces = 5;
1423 const int quadEdgeConnectivity[][4] = {{0, 1, 2, 3}};
1426 const int triEdgeConnectivity[][3] = {
1427 {0, 5, 4}, {1, 6, 5}, {2, 7, 6}, {3, 4, 7}};
1431 for (
int f = 0; f < nFaces; ++f)
1436 for (
int j = 0; j < 4; ++j)
1438 edgeArray[j] = edges[quadEdgeConnectivity[f][j]];
1449 for (
int j = 0; j < 3; ++j)
1451 edgeArray[j] = edges[triEdgeConnectivity[i][j]];
1476 const int three = 3;
1477 const int nVerts = 4;
1478 const double point[][3] = {{-1, -1 /
sqrt(
double(3)), -1 /
sqrt(
double(6))},
1479 {1, -1 /
sqrt(
double(3)), -1 /
sqrt(
double(6))},
1480 {0, 2 /
sqrt(
double(3)), -1 /
sqrt(
double(6))},
1481 {0, 0, 3 /
sqrt(
double(6))}};
1483 std::shared_ptr<SpatialDomains::PointGeom> verts[4];
1484 for (i = 0; i < nVerts; ++i)
1487 three, i, point[i][0], point[i][1], point[i][2]);
1495 const int nEdges = 6;
1496 const int vertexConnectivity[][2] = {{0, 1}, {1, 2}, {0, 2},
1497 {0, 3}, {1, 3}, {2, 3}};
1501 for (i = 0; i < nEdges; ++i)
1503 std::shared_ptr<SpatialDomains::PointGeom> vertsArray[2];
1504 for (j = 0; j < 2; ++j)
1506 vertsArray[j] = verts[vertexConnectivity[i][j]];
1510 i, three, vertsArray);
1517 const int nFaces = 4;
1518 const int edgeConnectivity[][3] = {
1519 {0, 1, 2}, {0, 4, 3}, {1, 5, 4}, {2, 5, 3}};
1523 for (i = 0; i < nFaces; ++i)
1526 for (j = 0; j < 3; ++j)
1528 edgeArray[j] = edges[edgeConnectivity[i][j]];
1551 const int three = 3;
1553 const int nVerts = 8;
1554 const double point[][3] = {{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0},
1555 {0, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1}};
1559 for (
int i = 0; i < nVerts; ++i)
1562 three, i, point[i][0], point[i][1], point[i][2]);
1570 const int nEdges = 12;
1571 const int vertexConnectivity[][2] = {{0, 1}, {1, 2}, {2, 3}, {0, 3},
1572 {0, 4}, {1, 5}, {2, 6}, {3, 7},
1573 {4, 5}, {5, 6}, {6, 7}, {4, 7}};
1577 for (
int i = 0; i < nEdges; ++i)
1580 for (
int j = 0; j < 2; ++j)
1582 vertsArray[j] = verts[vertexConnectivity[i][j]];
1585 i, three, vertsArray);
1592 const int nFaces = 6;
1593 const int edgeConnectivity[][4] = {{0, 1, 2, 3}, {0, 5, 8, 4},
1594 {1, 6, 9, 5}, {2, 7, 10, 6},
1595 {3, 7, 11, 4}, {8, 9, 10, 11}};
1599 for (
int i = 0; i < nFaces; ++i)
1602 for (
int j = 0; j < 4; ++j)
1604 edgeArray[j] = edges[edgeConnectivity[i][j]];
1623 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
1624 map<ShapeType, LocalRegions::Expansion3DSharedPtr> &maxElmt,
1629 std::shared_ptr<MultiRegions::ExpList> expList =
1630 ((
m_linsys.lock())->GetLocMat()).lock();
1636 map<ShapeType, Array<OneD, Array<OneD, unsigned int>>> faceMapMaxR;
1639 int nummodesmax = 0;
1642 for (
int n = 0; n < expList->GetNumElmts(); ++n)
1644 locExp = expList->GetExp(n);
1646 nummodesmax = max(nummodesmax, locExp->GetBasisNumModes(0));
1647 nummodesmax = max(nummodesmax, locExp->GetBasisNumModes(1));
1648 nummodesmax = max(nummodesmax, locExp->GetBasisNumModes(2));
1650 Shapes[locExp->DetShapeType()] = 1;
1697 HexBa, HexBb, HexBc, hexgeom);
1702 HexExp->GetInverseBoundaryMaps(vmap, emap, fmap);
1710 maxRmat[
eHexahedron] = HexExp->GetLocMatrix(HexR);
1720 PointsKey(nummodesmax, eGaussRadauMAlpha1Beta0));
1722 PointsKey(nummodesmax, eGaussRadauMAlpha2Beta0));
1728 TetBa, TetBb, TetBc, tetgeom);
1732 TetExp->GetInverseBoundaryMaps(vmap, emap, fmap);
1745 edgeMapMaxR, faceMapMaxR);
1759 PointsKey(nummodesmax, eGaussRadauMAlpha2Beta0));
1765 PyrBa, PyrBb, PyrBc, pyrgeom);
1770 PyrExp->GetInverseBoundaryMaps(vmap, emap, fmap);
1777 SetUpPyrMaxRMat(nummodesmax, PyrExp, maxRmat, vertMapMaxR, edgeMapMaxR,
1792 PointsKey(nummodesmax, eGaussRadauMAlpha1Beta0));
1798 PrismBa, PrismBb, PrismBc, prismgeom);
1799 maxElmt[
ePrism] = PrismExp;
1802 PrismExp->GetInverseBoundaryMaps(vmap, emap, fmap);
1803 vertMapMaxR[
ePrism] = vmap;
1804 edgeMapMaxR[
ePrism] = emap;
1806 faceMapMaxR[
ePrism] = fmap;
1811 edgeMapMaxR, faceMapMaxR,
false);
1819 maxRmat[
ePrism] = PrismExp->GetLocMatrix(PrismR);
1824 edgeMapMaxR, faceMapMaxR,
true);
1832 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
1837 int nRows = PyrExp->NumBndryCoeffs();
1844 for (
int i = 0; i < nRows; ++i)
1846 newmat->SetValue(i, i, 1.0);
1854 const int nadjedge[] = {3, 3, 3, 3, 4};
1855 const int VEHexVert[][4] = {{0, 0, 0, -1},
1860 const int VEHexEdge[][4] = {{0, 3, 4, -1},
1865 const int VEPyrEdge[][4] = {{0, 3, 4, -1},
1872 for (
int v = 0; v < 5; ++v)
1874 for (
int e = 0; e < nadjedge[v]; ++e)
1876 for (
int i = 0; i < nummodesmax - 2; ++i)
1883 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1884 edgeMapMaxR[
ePyramid][VEPyrEdge[v][e]][i],
1891 nfacemodes = (nummodesmax - 2) * (nummodesmax - 2);
1893 for (
int v = 0; v < 4; ++v)
1895 for (
int i = 0; i < nfacemodes; ++i)
1899 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1904 const int nadjface[] = {2, 2, 2, 2, 4};
1905 const int VFTetVert[][4] = {{0, 0, -1, -1},
1910 const int VFTetFace[][4] = {{1, 3, -1, -1},
1915 const int VFPyrFace[][4] = {{1, 4, -1, -1},
1922 nfacemodes = (nummodesmax - 3) * (nummodesmax - 2) / 2;
1923 for (
int v = 0; v < 5; ++v)
1925 for (
int f = 0; f < nadjface[v]; ++f)
1927 for (
int i = 0; i < nfacemodes; ++i)
1932 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1933 faceMapMaxR[
ePyramid][VFPyrFace[v][f]][i],
1941 nfacemodes = (nummodesmax - 2) * (nummodesmax - 2);
1942 for (
int e = 0; e < 4; ++e)
1944 for (
int i = 0; i < nummodesmax - 2; ++i)
1946 for (
int j = 0; j < nfacemodes; ++j)
1951 val = (*maxRmat[
eHexahedron])(edgemapid, facemapid);
1952 newmat->SetValue(edgeMapMaxR[
ePyramid][e][i],
1958 const int nadjface1[] = {1, 1, 1, 1, 2, 2, 2, 2};
1959 const int EFTetEdge[][2] = {{0, -1}, {1, -1}, {0, -1}, {2, -1},
1960 {3, 3}, {4, 4}, {5, 5}, {3, 5}};
1961 const int EFTetFace[][2] = {{1, -1}, {2, -1}, {1, -1}, {3, -1},
1962 {1, 3}, {1, 2}, {2, 3}, {1, 3}};
1963 const int EFPyrFace[][2] = {{1, -1}, {2, -1}, {3, -1}, {4, -1},
1964 {1, 4}, {1, 2}, {2, 3}, {3, 4}};
1967 nfacemodes = (nummodesmax - 3) * (nummodesmax - 2) / 2;
1968 for (
int e = 0; e < 8; ++e)
1970 for (
int f = 0; f < nadjface1[e]; ++f)
1972 for (
int i = 0; i < nummodesmax - 2; ++i)
1974 for (
int j = 0; j < nfacemodes; ++j)
1982 newmat->SetValue(edgeMapMaxR[
ePyramid][e][i],
1983 faceMapMaxR[
ePyramid][EFPyrFace[e][f]][j],
1997 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
2002 boost::ignore_unused(faceMapMaxR);
2004 int nRows = TetExp->NumBndryCoeffs();
2011 for (
int i = 0; i < nRows; ++i)
2013 for (
int j = 0; j < nRows; ++j)
2016 newmat->SetValue(i, j, val);
2025 const int VEHexVert[][4] = {{0, 0, 0}, {1, 1, 1}, {2, 2, 2}, {4, 5, 6}};
2026 const int VEHexEdge[][4] = {{0, 3, 4}, {0, 1, 5}, {1, 2, 6}, {4, 5, 6}};
2027 const int VETetEdge[][4] = {{0, 2, 3}, {0, 1, 4}, {1, 2, 5}, {3, 4, 5}};
2030 for (
int v = 0; v < 4; ++v)
2032 for (
int e = 0; e < 3; ++e)
2034 for (
int i = 0; i < nummodesmax - 2; ++i)
2056 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
2062 int nRows = PrismExp->NumBndryCoeffs();
2073 for (
int i = 0; i < nRows; ++i)
2075 for (
int j = 0; j < nRows; ++j)
2077 val = (*maxRmat[
ePrism])(i, j);
2078 newmat->SetValue(i, j, val);
2083 const int VETetVert[][2] = {{0, 0}, {1, 1}, {1, 1},
2084 {0, 0}, {3, 3}, {3, 3}};
2085 const int VETetEdge[][2] = {{0, 3}, {0, 4}, {0, 4},
2086 {0, 3}, {3, 4}, {4, 3}};
2087 const int VEPrismEdge[][2] = {{0, 4}, {0, 5}, {2, 6},
2088 {2, 7}, {4, 5}, {6, 7}};
2091 for (
int v = 0; v < 6; ++v)
2093 for (
int e = 0; e < 2; ++e)
2095 for (
int i = 0; i < nummodesmax - 2; ++i)
2102 newmat->SetValue(vertMapMaxR[
ePrism][v],
2103 edgeMapMaxR[
ePrism][VEPrismEdge[v][e]][i],
2113 for (
int i = 0; i < nRows; ++i)
2115 newmat->SetValue(i, i, 1.0);
2125 const int VEHexVert[][3] = {{0, 0, 0}, {1, 1, 1}, {2, 2, 2},
2126 {3, 3, 3}, {4, 5, 5}, {6, 7, 7}};
2127 const int VEHexEdge[][3] = {{0, 3, 4}, {0, 1, 5}, {1, 2, 6},
2128 {2, 3, 7}, {4, 5, 9}, {6, 7, 11}};
2129 const int VEPrismEdge[][3] = {{0, 3, 4}, {0, 1, 5}, {1, 2, 6},
2130 {2, 3, 7}, {4, 5, 8}, {6, 7, 8}};
2133 for (
int v = 0; v < 6; ++v)
2135 for (
int e = 0; e < 3; ++e)
2137 for (
int i = 0; i < nummodesmax - 2; ++i)
2144 newmat->SetValue(vertMapMaxR[
ePrism][v],
2145 edgeMapMaxR[
ePrism][VEPrismEdge[v][e]][i],
2152 const int VFHexVert[][2] = {{0, 0}, {1, 1}, {4, 5},
2153 {2, 2}, {3, 3}, {6, 7}};
2154 const int VFHexFace[][2] = {{0, 4}, {0, 2}, {4, 2},
2155 {0, 2}, {0, 4}, {2, 4}};
2157 const int VQFPrismVert[][2] = {{0, 0}, {1, 1}, {4, 4},
2158 {2, 2}, {3, 3}, {5, 5}};
2159 const int VQFPrismFace[][2] = {{0, 4}, {0, 2}, {4, 2},
2160 {0, 2}, {0, 4}, {2, 4}};
2162 nfacemodes = (nummodesmax - 2) * (nummodesmax - 2);
2164 for (
int v = 0; v < 6; ++v)
2166 for (
int f = 0; f < 2; ++f)
2168 for (
int i = 0; i < nfacemodes; ++i)
2173 newmat->SetValue(vertMapMaxR[
ePrism][VQFPrismVert[v][f]],
2174 faceMapMaxR[
ePrism][VQFPrismFace[v][f]][i],
2181 const int nadjface[] = {1, 2, 1, 2, 1, 1, 1, 1, 2};
2182 const int EFHexEdge[][2] = {{0, -1}, {1, 1}, {2, -1}, {3, 3}, {4, -1},
2183 {5, -1}, {6, -1}, {7, -1}, {9, 11}};
2184 const int EFHexFace[][2] = {{0, -1}, {0, 2}, {0, -1}, {0, 4}, {4, -1},
2185 {2, -1}, {2, -1}, {4, -1}, {2, 4}};
2186 const int EQFPrismEdge[][2] = {{0, -1}, {1, 1}, {2, -1},
2187 {3, 3}, {4, -1}, {5, -1},
2188 {6, -1}, {7, -1}, {8, 8}};
2189 const int EQFPrismFace[][2] = {{0, -1}, {0, 2}, {0, -1},
2190 {0, 4}, {4, -1}, {2, -1},
2191 {2, -1}, {4, -1}, {2, 4}};
2194 nfacemodes = (nummodesmax - 2) * (nummodesmax - 2);
2195 for (
int e = 0; e < 9; ++e)
2197 for (
int f = 0; f < nadjface[e]; ++f)
2199 for (
int i = 0; i < nummodesmax - 2; ++i)
2201 for (
int j = 0; j < nfacemodes; ++j)
2208 val = (*maxRmat[
eHexahedron])(edgemapid, facemapid);
2211 edgeMapMaxR[
ePrism][EQFPrismEdge[e][f]][i];
2213 faceMapMaxR[
ePrism][EQFPrismFace[e][f]][j];
2214 newmat->SetValue(edgemapid1, facemapid1, val);
2221 const int VFTetVert[] = {0, 1, 3, 1, 0, 3};
2222 const int VFTetFace[] = {1, 1, 1, 1, 1, 1};
2223 const int VTFPrismVert[] = {0, 1, 4, 2, 3, 5};
2224 const int VTFPrismFace[] = {1, 1, 1, 3, 3, 3};
2227 nfacemodes = (nummodesmax - 3) * (nummodesmax - 2) / 2;
2228 for (
int v = 0; v < 6; ++v)
2230 for (
int i = 0; i < nfacemodes; ++i)
2236 newmat->SetValue(vertMapMaxR[
ePrism][VTFPrismVert[v]],
2237 faceMapMaxR[
ePrism][VTFPrismFace[v]][i], val);
2242 const int EFTetEdge[] = {0, 3, 4, 0, 4, 3};
2243 const int EFTetFace[] = {1, 1, 1, 1, 1, 1};
2244 const int ETFPrismEdge[] = {0, 4, 5, 2, 6, 7};
2245 const int ETFPrismFace[] = {1, 1, 1, 3, 3, 3};
2249 nfacemodes = (nummodesmax - 3) * (nummodesmax - 2) / 2;
2250 for (
int e = 0; e < 6; ++e)
2252 for (
int i = 0; i < nummodesmax - 2; ++i)
2254 for (
int j = 0; j < nfacemodes; ++j)
2256 int edgemapid = edgeMapMaxR[
eTetrahedron][EFTetEdge[e]][i];
2257 int facemapid = faceMapMaxR[
eTetrahedron][EFTetFace[e]][j];
2260 newmat->SetValue(edgeMapMaxR[
ePrism][ETFPrismEdge[e]][i],
2261 faceMapMaxR[
ePrism][ETFPrismFace[e]][j], val);
2268 maxRmat[
ePrism] = PrismR;
2279 int nRows = locExp->NumBndryCoeffs();
2287 locExp->GetInverseBoundaryMaps(vlocmap, elocmap, flocmap);
2290 for (
int i = 0; i < nRows; ++i)
2293 newmat->SetValue(i, i, val);
2296 int nverts = locExp->GetNverts();
2297 int nedges = locExp->GetNedges();
2298 int nfaces = locExp->GetNtraces();
2301 for (
int e = 0; e < nedges; ++e)
2303 int nEdgeInteriorCoeffs = locExp->GetEdgeNcoeffs(e) - 2;
2305 for (
int v = 0; v < nverts; ++v)
2307 for (
int i = 0; i < nEdgeInteriorCoeffs; ++i)
2309 val = (*maxRmat)(vmap[v], emap[e][i]);
2310 newmat->SetValue(vlocmap[v], elocmap[e][i], val);
2315 for (
int f = 0; f < nfaces; ++f)
2322 int nFaceInteriorCoeffs = locExp->GetTraceIntNcoeffs(f);
2324 locExp->GetTraceNumModes(f, m0, m1, FwdOrient);
2327 maxExp->GetTraceInverseBoundaryMap(f, FwdOrient, m0, m1);
2330 for (
int v = 0; v < nverts; ++v)
2332 for (
int i = 0; i < nFaceInteriorCoeffs; ++i)
2334 val = (*maxRmat)(vmap[v], fmapRmat[i]);
2335 newmat->SetValue(vlocmap[v], flocmap[f][i], val);
2340 for (
int e = 0; e < nedges; ++e)
2342 int nEdgeInteriorCoeffs = locExp->GetEdgeNcoeffs(e) - 2;
2344 for (
int j = 0; j < nEdgeInteriorCoeffs; ++j)
2347 for (
int i = 0; i < nFaceInteriorCoeffs; ++i)
2349 val = (*maxRmat)(emap[e][j], fmapRmat[i]);
2350 newmat->SetValue(elocmap[e][j], flocmap[f][i], val);
#define ASSERTL0(condition, msg)
#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
Describes the specification for a Basis.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Defines a specification for a set of points.
SpatialDomains::GeometrySharedPtr GetGeom() const
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Describe a linear system.
const StdRegions::ConstFactorMap & GetConstFactors() const
Returns all the constants.
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
LibUtilities::CommSharedPtr m_comm
const std::weak_ptr< GlobalLinSys > m_linsys
std::weak_ptr< AssemblyMap > m_locToGloMap
Array< OneD, NekDouble > m_variablePmask
virtual void v_DoTransformCoeffsFromLowEnergy(Array< OneD, NekDouble > &pInOut) override
transform the solution coeffiicents from low energy back to the original coefficient space.
SpatialDomains::HexGeomSharedPtr CreateRefHexGeom(void)
Sets up the reference hexahedral element needed to construct a low energy basis.
void ReSetPrismMaxRMat(int nummodesmax, LocalRegions::PrismExpSharedPtr &PirsmExp, ShapeToDNekMap &maxRmat, ShapeToIntArrayMap &vertMapMaxR, ShapeToIntArrayArrayMap &edgeMapMaxR, ShapeToIntArrayArrayMap &faceMapMaxR, bool UseTetOnly)
DNekMatSharedPtr ExtractLocMat(LocalRegions::Expansion3DSharedPtr &locExp, DNekScalMatSharedPtr &maxRmat, LocalRegions::Expansion3DSharedPtr &expMax, Array< OneD, unsigned int > &vertMapMaxR, Array< OneD, Array< OneD, unsigned int >> &edgeMapMaxR)
std::vector< std::pair< int, int > > m_sameBlock
DNekBlkMatSharedPtr m_InvRBlk
virtual void v_DoTransformCoeffsToLowEnergy(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) override
Multiply by the block tranposed inverse transformation matrix (R^T)^{-1} which is equivlaent to trans...
virtual DNekScalMatSharedPtr v_TransformedSchurCompl(int n, int offset, const std::shared_ptr< DNekScalMat > &loc_mat) override
Set up the transformed block matrix system.
void SetupBlockTransformationMatrix(void)
DNekBlkMatSharedPtr m_RBlk
virtual void v_DoPreconditioner(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) override
virtual void v_BuildPreconditioner() override
Construct the low energy preconditioner from .
void ReSetTetMaxRMat(int nummodesmax, LocalRegions::TetExpSharedPtr &TetExp, ShapeToDNekMap &maxRmat, ShapeToIntArrayMap &vertMapMaxR, ShapeToIntArrayArrayMap &edgeMapMaxR, ShapeToIntArrayArrayMap &faceMapMaxR)
SpatialDomains::TetGeomSharedPtr CreateRefTetGeom(void)
Sets up the reference tretrahedral element needed to construct a low energy basis.
virtual void v_InitObject() override
virtual void v_DoTransformBasisFromLowEnergy(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) override
Multiply by the block inverse transformation matrix This transforms the bassi from Low Energy to orig...
virtual void v_DoTransformBasisToLowEnergy(Array< OneD, NekDouble > &pInOut) override
Transform the basis vector to low energy space.
SpatialDomains::PrismGeomSharedPtr CreateRefPrismGeom(void)
Sets up the reference prismatic element needed to construct a low energy basis.
void SetUpReferenceElements(ShapeToDNekMap &maxRmat, ShapeToExpMap &maxElmt, ShapeToIntArrayMap &vertMapMaxR, ShapeToIntArrayArrayMap &edgeMapMaxR)
Loop expansion and determine different variants of the transformation matrix.
void SetUpPyrMaxRMat(int nummodesmax, LocalRegions::PyrExpSharedPtr &PyrExp, ShapeToDNekMap &maxRmat, ShapeToIntArrayMap &vertMapMaxR, ShapeToIntArrayArrayMap &edgeMapMaxR, ShapeToIntArrayArrayMap &faceMapMaxR)
void CreateVariablePMask(void)
DNekBlkMatSharedPtr m_BlkMat
SpatialDomains::PyrGeomSharedPtr CreateRefPyrGeom(void)
Sets up the reference prismatic element needed to construct a low energy basis mapping arrays.
int GetEdgeNcoeffs(const int i) const
This function returns the number of expansion coefficients belonging to the i-th edge.
int GetNedges() const
return the number of edges in 3D expansion
int NumBndryCoeffs(void) const
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
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...
static void Gather(Nektar::Array< OneD, NekDouble > pU, gs_op pOp, gs_data *pGsh, Nektar::Array< OneD, NekDouble > pBuffer=NullNekDouble1DArray)
Performs a gather-scatter operation of the provided values.
static gs_data * Init(const Nektar::Array< OneD, long > pId, const LibUtilities::CommSharedPtr &pComm, bool verbose=true)
Initialise Gather-Scatter map.
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eModified_B
Principle Modified Functions .
@ eModified_C
Principle Modified Functions .
@ eModifiedPyr_C
Principle Modified Functions.
@ eModified_A
Principle Modified Functions .
std::shared_ptr< PrismExp > PrismExpSharedPtr
std::shared_ptr< Expansion > ExpansionSharedPtr
std::shared_ptr< HexExp > HexExpSharedPtr
std::shared_ptr< Expansion2D > Expansion2DSharedPtr
std::shared_ptr< PyrExp > PyrExpSharedPtr
std::shared_ptr< Expansion3D > Expansion3DSharedPtr
std::shared_ptr< TetExp > TetExpSharedPtr
PreconFactory & GetPreconFactory()
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
StdRegions::Orientation DeterminePeriodicFaceOrient(StdRegions::Orientation faceOrient, StdRegions::Orientation perFaceOrient)
Determine relative orientation between two faces.
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
std::shared_ptr< PrismGeom > PrismGeomSharedPtr
std::shared_ptr< HexGeom > HexGeomSharedPtr
std::shared_ptr< SegGeom > SegGeomSharedPtr
std::shared_ptr< PyrGeom > PyrGeomSharedPtr
std::shared_ptr< TetGeom > TetGeomSharedPtr
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::shared_ptr< TriGeom > TriGeomSharedPtr
@ eDir1FwdDir1_Dir2FwdDir2
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
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 Assmb(int n, const T *x, const int *y, T *z)
Assemble z[y[i]] += x[i]; z should be zero'd first.
scalarT< T > sqrt(scalarT< T > in)