47 using namespace LibUtilities;
49 namespace MultiRegions
54 string PreconditionerLowEnergy::className
57 PreconditionerLowEnergy::create,
58 "LowEnergy Preconditioning");
67 PreconditionerLowEnergy::PreconditionerLowEnergy(
68 const std::shared_ptr<GlobalLinSys> &plinsys,
82 std::shared_ptr<MultiRegions::ExpList>
83 expList=((
m_linsys.lock())->GetLocMat()).lock();
85 m_comm = expList->GetComm();
89 locExpansion = expList->GetExp(0);
91 int nDim = locExpansion->GetShapeDimension();
94 "Preconditioner type only valid in 3D");
123 std::shared_ptr<MultiRegions::ExpList>
124 expList=((
m_linsys.lock())->GetLocMat()).lock();
129 int nVerts, nEdges,nFaces;
130 int eid, fid, n, cnt, nmodes, nedgemodes, nfacemodes;
134 int vMap1, vMap2, sign1, sign2;
135 int m, v, eMap1, eMap2, fMap1, fMap2;
136 int offset, globalrow, globalcol, nCoeffs;
142 expList->GetPeriodicEntities(periodicVerts,periodicEdges,periodicFaces);
160 int nDirBnd = asmMap->GetNumGlobalDirBndCoeffs();
161 int nNonDirVerts = asmMap->GetNumNonDirVertexModes();
171 int n_exp = expList->GetNumElmts();
172 int nNonDirEdgeIDs=asmMap->GetNumNonDirEdges();
173 int nNonDirFaceIDs=asmMap->GetNumNonDirFaces();
177 map<int,int> uniqueEdgeMap;
178 map<int,int> uniqueFaceMap;
187 bndConditions = expList->GetBndConditions();
194 = asmMap->GetExtraDirEdges();
195 for(i=0; i<extradiredges.size(); ++i)
197 meshEdgeId=extradiredges[i];
198 edgeDirMap.insert(meshEdgeId);
202 for(i = 0; i < bndCondExp.size(); i++)
205 for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
207 bndCondFaceExp = std::dynamic_pointer_cast<
209 if (bndConditions[i]->GetBoundaryConditionType() ==
212 for(k = 0; k < bndCondFaceExp->GetNtraces(); k++)
214 meshEdgeId = bndCondFaceExp->
GetGeom()->GetEid(k);
215 if(edgeDirMap.count(meshEdgeId) == 0)
217 edgeDirMap.insert(meshEdgeId);
220 meshFaceId = bndCondFaceExp->GetGeom()->GetGlobalID();
221 faceDirMap.insert(meshFaceId);
229 int nlocalNonDirEdges=0;
230 int nlocalNonDirFaces=0;
233 map<int,int> EdgeSize;
234 map<int,int> FaceSize;
235 map<int,pair<int,int> >FaceModes;
238 for(n = 0; n < n_exp; ++n)
243 for(j = 0; j < nEdges; ++j)
245 int nEdgeInteriorCoeffs = locExpansion->GetEdgeNcoeffs(j) - 2;
247 ->GetGeom3D()->GetEid(j);
248 if(EdgeSize.count(meshEdgeId) == 0)
250 EdgeSize[meshEdgeId] = nEdgeInteriorCoeffs;
254 EdgeSize[meshEdgeId] = min(EdgeSize[meshEdgeId],
255 nEdgeInteriorCoeffs);
259 nFaces = locExpansion->GetNtraces();
260 for(j = 0; j < nFaces; ++j)
262 int nFaceInteriorCoeffs = locExpansion->GetTraceIntNcoeffs(j);
263 meshFaceId = locExpansion->GetGeom3D()->GetFid(j);
265 if(FaceSize.count(meshFaceId) == 0)
267 FaceSize[meshFaceId] = nFaceInteriorCoeffs;
270 locExpansion->GetTraceNumModes(j,m0,m1,locExpansion->
272 FaceModes[meshFaceId] = pair<int,int>(m0,m1);
276 if(nFaceInteriorCoeffs < FaceSize[meshFaceId])
278 FaceSize[meshFaceId] = nFaceInteriorCoeffs;
280 locExpansion->GetTraceNumModes(j,m0,m1,locExpansion->
282 FaceModes[meshFaceId] = pair<int,int>(m0,m1);
289 expList->GetSession()->DefinesCmdLineArgument(
"verbose");
295 int EdgeSizeLen = EdgeSize.size();
296 int FaceSizeLen = FaceSize.size();
300 map<int,int>::iterator it;
304 for(it = EdgeSize.begin(); it!=EdgeSize.end(); ++it,++cnt)
306 FacetMap[cnt] = it->first;
307 maxid = max(it->first,maxid);
308 FacetLen[cnt] = it->second;
314 for(it = FaceSize.begin(); it!=FaceSize.end(); ++it,++cnt)
316 FacetMap[cnt] = it->first + maxid;
317 FacetLen[cnt] = it->second;
325 for(it = EdgeSize.begin(); it!=EdgeSize.end(); ++it,++cnt)
327 it->second = (int) FacetLen[cnt];
330 for(it = FaceSize.begin(); it!=FaceSize.end(); ++it,++cnt)
332 it->second = (int)FacetLen[cnt];
339 int matrixlocation = 0;
342 for (
auto &pIt : periodicEdges)
344 meshEdgeId = pIt.first;
346 if(edgeDirMap.count(meshEdgeId)==0)
348 dof = EdgeSize[meshEdgeId];
349 if(uniqueEdgeMap.count(meshEdgeId)==0 && dof > 0)
351 bool SetUpNewEdge =
true;
354 for (i = 0; i < pIt.second.size(); ++i)
356 if (!pIt.second[i].isLocal)
361 int meshEdgeId2 = pIt.second[i].id;
362 if(edgeDirMap.count(meshEdgeId2)==0)
364 if(uniqueEdgeMap.count(meshEdgeId2)!=0)
367 uniqueEdgeMap[meshEdgeId] =
368 uniqueEdgeMap[meshEdgeId2];
369 SetUpNewEdge =
false;
374 edgeDirMap.insert(meshEdgeId);
375 SetUpNewEdge =
false;
381 uniqueEdgeMap[meshEdgeId]=matrixlocation;
382 globaloffset[matrixlocation]+=ntotalentries;
383 modeoffset[matrixlocation]=dof*dof;
384 ntotalentries+=dof*dof;
385 nblks [matrixlocation++] = dof;
391 for(cnt=n=0; n < n_exp; ++n)
395 for (j = 0; j < locExpansion->GetNedges(); ++j)
397 meshEdgeId = locExpansion->
GetGeom()->GetEid(j);
398 dof = EdgeSize[meshEdgeId];
399 maxEdgeDof = (dof > maxEdgeDof ? dof : maxEdgeDof);
401 if(edgeDirMap.count(meshEdgeId)==0)
403 if(uniqueEdgeMap.count(meshEdgeId)==0 && dof > 0)
406 uniqueEdgeMap[meshEdgeId]=matrixlocation;
408 globaloffset[matrixlocation]+=ntotalentries;
409 modeoffset[matrixlocation]=dof*dof;
410 ntotalentries+=dof*dof;
411 nblks[matrixlocation++] = dof;
413 nlocalNonDirEdges+=dof*dof;
421 for (
auto &pIt : periodicFaces)
423 meshFaceId = pIt.first;
425 if(faceDirMap.count(meshFaceId)==0)
427 dof = FaceSize[meshFaceId];
429 if(uniqueFaceMap.count(meshFaceId) == 0 && dof > 0)
431 bool SetUpNewFace =
true;
433 if(pIt.second[0].isLocal)
435 int meshFaceId2 = pIt.second[0].id;
437 if(faceDirMap.count(meshFaceId2)==0)
439 if(uniqueFaceMap.count(meshFaceId2)!=0)
442 uniqueFaceMap[meshFaceId] =
443 uniqueFaceMap[meshFaceId2];
444 SetUpNewFace =
false;
449 faceDirMap.insert(meshFaceId);
450 SetUpNewFace =
false;
456 uniqueFaceMap[meshFaceId]=matrixlocation;
458 modeoffset[matrixlocation]=dof*dof;
459 globaloffset[matrixlocation]+=ntotalentries;
460 ntotalentries+=dof*dof;
461 nblks[matrixlocation++] = dof;
467 for(cnt=n=0; n < n_exp; ++n)
471 for (j = 0; j < locExpansion->GetNtraces(); ++j)
473 meshFaceId = locExpansion->
GetGeom()->GetFid(j);
475 dof = FaceSize[meshFaceId];
476 maxFaceDof = (dof > maxFaceDof ? dof : maxFaceDof);
478 if(faceDirMap.count(meshFaceId)==0)
480 if(uniqueFaceMap.count(meshFaceId)==0 && dof > 0)
482 uniqueFaceMap[meshFaceId]=matrixlocation;
483 modeoffset[matrixlocation]=dof*dof;
484 globaloffset[matrixlocation]+=ntotalentries;
485 ntotalentries+=dof*dof;
486 nblks[matrixlocation++] = dof;
488 nlocalNonDirFaces+=dof*dof;
499 nlocalNonDirFaces,-1);
503 nlocalNonDirFaces,0.0);
507 int uniEdgeOffset = 0;
511 for(n=0; n < n_exp; ++n)
513 for(j = 0; j < locExpansion->GetNedges(); ++j)
516 ->GetGeom3D()->GetEid(j);
518 uniEdgeOffset = max(meshEdgeId, uniEdgeOffset);
524 uniEdgeOffset = uniEdgeOffset*maxEdgeDof*maxEdgeDof;
526 for(n=0; n < n_exp; ++n)
531 for(j = 0; j < locExpansion->GetNedges(); ++j)
534 meshEdgeId = locExpansion->
GetGeom()->GetEid(j);
536 nedgemodes = EdgeSize[meshEdgeId];
538 if(edgeDirMap.count(meshEdgeId)==0 && nedgemodes > 0)
541 int edgeOffset = globaloffset[uniqueEdgeMap[meshEdgeId]];
544 int uniOffset = meshEdgeId;
545 auto pIt = periodicEdges.find(meshEdgeId);
546 if (pIt != periodicEdges.end())
548 for (
int l = 0; l < pIt->second.size(); ++l)
550 uniOffset = min(uniOffset, pIt->second[l].id);
553 uniOffset = uniOffset*maxEdgeDof*maxEdgeDof;
555 for(k=0; k<nedgemodes*nedgemodes; ++k)
557 vGlobal=edgeOffset+k;
558 localToGlobalMatrixMap[matrixoffset+k]=vGlobal;
559 BlockToUniversalMap[vGlobal] = uniOffset + k + 1;
561 matrixoffset+=nedgemodes*nedgemodes;
568 for(j = 0; j < locExpansion->GetNtraces(); ++j)
571 meshFaceId = locExpansion->GetGeom()->GetFid(j);
573 nfacemodes = FaceSize[meshFaceId];
576 if(faceDirMap.count(meshFaceId)==0 && nfacemodes > 0)
579 int faceOffset = globaloffset[uniqueFaceMap[meshFaceId]];
581 int uniOffset = meshFaceId;
583 auto pIt = periodicFaces.find(meshFaceId);
584 if (pIt != periodicFaces.end())
586 uniOffset = min(uniOffset, pIt->second[0].id);
588 uniOffset = uniOffset * maxFaceDof * maxFaceDof;
590 for(k=0; k<nfacemodes*nfacemodes; ++k)
592 vGlobal=faceOffset+k;
594 localToGlobalMatrixMap[matrixoffset+k]
597 BlockToUniversalMap[vGlobal] = uniOffset +
598 uniEdgeOffset + k + 1;
600 matrixoffset+=nfacemodes*nfacemodes;
607 map<int,int>::iterator it;
609 n_blks[0] = nNonDirVerts;
610 for(i =1, it = nblks.begin(); it != nblks.end(); ++it)
612 n_blks[i++] = it->second;
621 for(cnt=n=0; n < n_exp; ++n)
630 (nCoeffs, nCoeffs, zero, storage);
633 nVerts=locExpansion->GetGeom()->GetNumVerts();
634 nEdges=locExpansion->GetGeom()->GetNumEdges();
635 nFaces=locExpansion->GetGeom()->GetNumFaces();
638 loc_mat = (
m_linsys.lock())->GetStaticCondBlock(n);
641 bnd_mat=loc_mat->GetBlock(0,0);
644 offset = bnd_mat->GetRows();
653 for(
int i = 0; i < nCoeffs; ++i)
655 for(
int j = 0; j < nCoeffs; ++j)
658 Sloc.SetValue(i,j,val);
667 for (v=0; v<nVerts; ++v)
669 vMap1=locExpansion->GetVertexMap(v);
673 GetLocalToGlobalBndMap(cnt+vMap1)-nDirBnd;
677 for (m=0; m<nVerts; ++m)
679 vMap2=locExpansion->GetVertexMap(m);
684 GetLocalToGlobalBndMap(cnt+vMap2)-nDirBnd;
687 if (globalcol == globalrow)
691 GetLocalToGlobalBndSign(cnt + vMap1);
693 GetLocalToGlobalBndSign(cnt + vMap2);
696 += sign1*sign2*RSRT(vMap1,vMap2);
699 meshVertId = locExpansion->GetGeom()->GetVid(v);
701 auto pIt = periodicVerts.find(meshVertId);
702 if (pIt != periodicVerts.end())
704 for (k = 0; k < pIt->second.size(); ++k)
706 meshVertId = min(meshVertId, pIt->second[k].id);
710 VertBlockToUniversalMap[globalrow]
718 for (eid=0; eid<nEdges; ++eid)
722 ->GetGeom3D()->GetEid(eid);
725 nedgemodes = EdgeSize[meshEdgeId];
731 (nedgemodes,nedgemodes,zero,storage);
735 if(edgeDirMap.count(meshEdgeId)==0)
737 for (v=0; v<nedgemodesloc; ++v)
739 eMap1=edgemodearray[v];
741 GetLocalToGlobalBndSign(cnt + eMap1);
748 for (m=0; m<nedgemodesloc; ++m)
750 eMap2=edgemodearray[m];
754 GetLocalToGlobalBndSign(cnt + eMap2);
756 NekDouble globalEdgeValue = sign1*sign2*RSRT(eMap1,eMap2);
761 BlockArray[matrixoffset+v*nedgemodes+m]=globalEdgeValue;
765 matrixoffset+=nedgemodes*nedgemodes;
771 for (fid=0; fid<nFaces; ++fid)
774 ->GetGeom3D()->GetFid(fid);
776 nfacemodes = FaceSize[meshFaceId];
781 (nfacemodes,nfacemodes,zero,storage);
783 if(faceDirMap.count(meshFaceId) == 0)
787 locExpansion->GetTraceOrient(fid);
789 auto pIt = periodicFaces.find(meshFaceId);
790 if (pIt != periodicFaces.end())
792 if(meshFaceId == min(meshFaceId, pIt->second[0].id))
795 (faceOrient,pIt->second[0].orient);
799 facemodearray = locExpansion->GetTraceInverseBoundaryMap
800 (fid,faceOrient,FaceModes[meshFaceId].first,
801 FaceModes[meshFaceId].second);
803 for (v=0; v<nfacemodes; ++v)
805 fMap1=facemodearray[v];
808 GetLocalToGlobalBndSign(cnt + fMap1);
810 ASSERTL1(sign1 != 0,
"Something is wrong since we "
811 "shoudl only be extracting modes for "
812 "lowest order expansion");
814 for (m=0; m<nfacemodes; ++m)
816 fMap2=facemodearray[m];
820 GetLocalToGlobalBndSign(cnt + fMap2);
822 ASSERTL1(sign2 != 0,
"Something is wrong since "
823 "we shoudl only be extracting modes for "
824 "lowest order expansion");
833 BlockArray[matrixoffset+v*nfacemodes+m]=
837 matrixoffset+=nfacemodes*nfacemodes;
860 localToGlobalMatrixMap,
869 for (
int i = 0; i < nNonDirVerts; ++i)
871 VertBlk->SetValue(i,i,1.0/vertArray[i]);
882 for(
int loc=0;
loc<n_blks.size()-1; ++
loc)
884 nmodes = n_blks[1+
loc];
886 (nmodes,nmodes,zero,storage);
888 for (v=0; v<nmodes; ++v)
890 for (m=0; m<nmodes; ++m)
892 NekDouble Value = GlobalBlock[offset+v*nmodes+m];
893 gmat->SetValue(v,m,Value);
898 offset+=modeoffset[
loc];
902 int totblks=
m_BlkMat->GetNumberOfBlockRows();
903 for (i=1; i< totblks; ++i)
905 unsigned int nmodes=
m_BlkMat->GetNumberOfRowsInBlockRow(i);
910 (nmodes,nmodes,zero,storage);
931 int nNonDir = nGlobal-nDir;
948 std::shared_ptr<MultiRegions::ExpList>
949 expList=((
m_linsys.lock())->GetLocMat()).lock();
952 map<int,int> EdgeSize;
956 std::map<ShapeType, DNekScalMatSharedPtr> maxRmat;
957 map<ShapeType, LocalRegions::Expansion3DSharedPtr > maxElmt;
958 map<ShapeType, Array<OneD, unsigned int> > vertMapMaxR;
959 map<ShapeType, Array<OneD, Array<OneD, unsigned int> > > edgeMapMaxR;
969 int n_exp=expList->GetNumElmts();
987 for(n=0; n < n_exp; ++n)
993 int nbndcoeffs = locExp->NumBndryCoeffs();
1000 edgeMapMaxR[eltype]);
1002 m_RBlk->SetBlock(n, n, rmat);
1010 m_sameBlock.push_back(pair<int,int>(1,nbndcoeffs));
1019 for(
int i = 0; i < 3; ++i)
1021 if(locExpSav->GetBasis(i) != locExp->GetBasis(i))
1030 m_RBlk->SetBlock(n, n, rmat);
1034 (pair<int,int>(
m_sameBlock[offset].first+1,nbndcoeffs));
1040 vertMapMaxR[eltype],
1041 edgeMapMaxR[eltype]);
1044 m_RBlk->SetBlock(n, n, rmat);
1051 m_sameBlock.push_back(pair<int,int>(1,nbndcoeffs));
1069 int nLocBndDofs =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1087 Blas::Dgemm(
'N',
'N', nbndcoeffs, nexp, nbndcoeffs,
1088 1.0, &(R.GetBlock(cnt1,cnt1)->GetPtr()[0]),
1089 nbndcoeffs,pLocalIn.get() + cnt, nbndcoeffs,
1090 0.0, pInOut.get() + cnt, nbndcoeffs);
1091 cnt += nbndcoeffs*nexp;
1108 int nLocBndDofs =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1110 ASSERTL1(pInOut.size() >= nLocBndDofs,
1111 "Output array is not greater than the nLocBndDofs");
1125 Blas::Dgemm(
'T',
'N', nbndcoeffs, nexp, nbndcoeffs,
1126 1.0, &(R.GetBlock(cnt1,cnt1)->GetPtr()[0]),
1127 nbndcoeffs,pLocalIn.get() + cnt, nbndcoeffs,
1128 0.0, pInOut.get() + cnt, nbndcoeffs);
1129 cnt += nbndcoeffs*nexp;
1149 int nLocBndDofs =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1151 ASSERTL1(pInput.size() >= nLocBndDofs,
1152 "Input array is smaller than nLocBndDofs");
1153 ASSERTL1(pOutput.size() >= nLocBndDofs,
1154 "Output array is smaller than nLocBndDofs");
1168 Blas::Dgemm(
'N',
'N', nbndcoeffs, nexp, nbndcoeffs,
1169 1.0, &(invR.GetBlock(cnt1,cnt1)->GetPtr()[0]),
1170 nbndcoeffs,pLocalIn.get() + cnt, nbndcoeffs,
1171 0.0, pOutput.get() + cnt, nbndcoeffs);
1172 cnt += nbndcoeffs*nexp;
1188 int nLocBndDofs =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1190 ASSERTL1(pInput.size() >= nLocBndDofs,
1191 "Input array is less than nLocBndDofs");
1192 ASSERTL1(pOutput.size() >= nLocBndDofs,
1193 "Output array is less than nLocBndDofs");
1207 Blas::Dgemm(
'T',
'N', nbndcoeffs, nexp, nbndcoeffs,
1208 1.0, &(invR.GetBlock(cnt1,cnt1)->GetPtr()[0]),
1209 nbndcoeffs,pLocalIn.get() + cnt, nbndcoeffs,
1210 0.0, pOutput.get() + cnt, nbndcoeffs);
1211 cnt += nbndcoeffs*nexp;
1226 const std::shared_ptr<DNekScalMat > &loc_mat)
1228 std::shared_ptr<MultiRegions::ExpList>
1229 expList=((
m_linsys.lock())->GetLocMat()).lock();
1232 locExpansion = expList->GetExp(n);
1233 unsigned int nbnd=locExpansion->NumBndryCoeffs();
1250 for(
int i = 0; i < nbnd; ++i)
1252 for(
int j = 0; j < nbnd; ++j)
1256 Sloc.SetValue(i,j,val);
1276 unsigned int nLocBnd =
m_locToGloMap.lock()->GetNumLocalBndCoeffs();
1281 = asmMap->GetLocalToGlobalBndSign();
1287 for (i = 0; i < nLocBnd; ++i)
1311 const int nVerts = 6;
1312 const double point[][3] = {
1313 {-1,-1,0}, {1,-1,0}, {1,1,0},
1314 {-1,1,0}, {0,-1,
sqrt(
double(3))}, {0,1,
sqrt(
double(3))},
1319 for(
int i=0; i < nVerts; ++i)
1322 ( three, i, point[i][0], point[i][1], point[i][2] );
1324 const int nEdges = 9;
1325 const int vertexConnectivity[][2] = {
1326 {0,1}, {1,2}, {3,2}, {0,3}, {0,4},
1327 {1,4}, {2,5}, {3,5}, {4,5}
1332 for(
int i=0; i < nEdges; ++i){
1334 for(
int j=0; j<2; ++j)
1336 vertsArray[j] = verts[vertexConnectivity[i][j]];
1345 const int nFaces = 5;
1347 const int quadEdgeConnectivity[][4] = { {0,1,2,3}, {1,6,8,5}, {3,7,8,4} };
1349 const int quadId[] = { 0,-1,1,-1,2 };
1352 const int triEdgeConnectivity[][3] = { {0,5,4}, {2,6,7} };
1354 const int triId[] = { -1,0,-1,1,-1 };
1358 for(
int f = 0; f < nFaces; ++f){
1359 if(f == 1 || f == 3) {
1362 for(
int j = 0; j < 3; ++j){
1363 edgeArray[j] = edges[triEdgeConnectivity[i][j]];
1370 for(
int j=0; j < 4; ++j){
1371 edgeArray[j] = edges[quadEdgeConnectivity[i][j]];
1392 const int nVerts = 5;
1393 const double point[][3] = {
1394 {-1,-1,0}, {1,-1,0}, {1,1,0},
1395 {-1,1,0}, {0,0,
sqrt(
double(2))}
1401 for(
int i=0; i < nVerts; ++i)
1404 ( three, i, point[i][0], point[i][1], point[i][2] );
1406 const int nEdges = 8;
1407 const int vertexConnectivity[][2] = {
1408 {0,1}, {1,2}, {2,3}, {3,0},
1409 {0,4}, {1,4}, {2,4}, {3,4}
1414 for(
int i=0; i < nEdges; ++i)
1417 for(
int j=0; j<2; ++j)
1419 vertsArray[j] = verts[vertexConnectivity[i][j]];
1428 const int nFaces = 5;
1430 const int quadEdgeConnectivity[][4] = {{0,1,2,3}};
1433 const int triEdgeConnectivity[][3] = { {0,5,4}, {1,6,5}, {2,7,6}, {3,4,7}};
1437 for(
int f = 0; f < nFaces; ++f)
1442 for(
int j=0; j < 4; ++j)
1444 edgeArray[j] = edges[quadEdgeConnectivity[f][j]];
1452 for(
int j = 0; j < 3; ++j)
1454 edgeArray[j] = edges[triEdgeConnectivity[i][j]];
1478 const int nVerts = 4;
1479 const double point[][3] = {
1480 {-1,-1/
sqrt(
double(3)),-1/
sqrt(
double(6))},
1481 {1,-1/
sqrt(
double(3)),-1/
sqrt(
double(6))},
1482 {0,2/
sqrt(
double(3)),-1/
sqrt(
double(6))},
1483 {0,0,3/
sqrt(
double(6))}};
1485 std::shared_ptr<SpatialDomains::PointGeom> verts[4];
1486 for(i=0; i < nVerts; ++i)
1491 ( three, i, point[i][0], point[i][1], point[i][2] );
1499 const int nEdges = 6;
1500 const int vertexConnectivity[][2] = {
1501 {0,1},{1,2},{0,2},{0,3},{1,3},{2,3}
1506 for(i=0; i < nEdges; ++i)
1508 std::shared_ptr<SpatialDomains::PointGeom>
1512 vertsArray[j] = verts[vertexConnectivity[i][j]];
1523 const int nFaces = 4;
1524 const int edgeConnectivity[][3] = {
1525 {0,1,2}, {0,4,3}, {1,5,4}, {2,5,3}
1530 for(i=0; i < nFaces; ++i)
1533 for(j=0; j < 3; ++j)
1535 edgeArray[j] = edges[edgeConnectivity[i][j]];
1562 const int nVerts = 8;
1563 const double point[][3] = {
1564 {0,0,0}, {1,0,0}, {1,1,0}, {0,1,0},
1565 {0,0,1}, {1,0,1}, {1,1,1}, {0,1,1}
1570 for(
int i = 0; i < nVerts; ++i ) {
1573 point[i][1], point[i][2]);
1581 const int nEdges = 12;
1582 const int vertexConnectivity[][2] = {
1583 {0,1}, {1,2}, {2,3}, {0,3}, {0,4}, {1,5},
1584 {2,6}, {3,7}, {4,5}, {5,6}, {6,7}, {4,7}
1589 for(
int i = 0; i < nEdges; ++i ) {
1591 for(
int j = 0; j < 2; ++j ) {
1592 vertsArray[j] = verts[vertexConnectivity[i][j]];
1602 const int nFaces = 6;
1603 const int edgeConnectivity[][4] = {
1604 {0,1,2,3}, {0,5,8,4}, {1,6,9,5},
1605 {2,7,10,6}, {3,7,11,4}, {8,9,10,11}
1610 for(
int i = 0; i < nFaces; ++i ) {
1612 for(
int j = 0; j < 4; ++j ) {
1613 edgeArray[j] = edges[edgeConnectivity[i][j]];
1633 (std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
1634 map<ShapeType, LocalRegions::Expansion3DSharedPtr > &maxElmt,
1639 std::shared_ptr<MultiRegions::ExpList>
1640 expList=((
m_linsys.lock())->GetLocMat()).lock();
1646 map<ShapeType, Array<OneD, Array<OneD, unsigned int> > > faceMapMaxR;
1649 int nummodesmax = 0;
1652 for(
int n = 0; n < expList->GetNumElmts(); ++n)
1654 locExp = expList->GetExp(n);
1656 nummodesmax = max(nummodesmax, locExp->GetBasisNumModes(0));
1657 nummodesmax = max(nummodesmax, locExp->GetBasisNumModes(1));
1658 nummodesmax = max(nummodesmax, locExp->GetBasisNumModes(2));
1660 Shapes[locExp->DetShapeType()] = 1;
1713 HexExp->GetInverseBoundaryMaps(vmap,emap,fmap);
1722 maxRmat[
eHexahedron] = HexExp->GetLocMatrix(HexR);
1744 TetExp->GetInverseBoundaryMaps(vmap,emap,fmap);
1758 vertMapMaxR, edgeMapMaxR, faceMapMaxR);
1783 PyrExp->GetInverseBoundaryMaps(vmap,emap,fmap);
1791 edgeMapMaxR,faceMapMaxR);
1810 maxElmt[
ePrism] = PrismExp;
1813 PrismExp->GetInverseBoundaryMaps(vmap,emap,fmap);
1814 vertMapMaxR[
ePrism] = vmap;
1815 edgeMapMaxR[
ePrism] = emap;
1817 faceMapMaxR[
ePrism] = fmap;
1822 vertMapMaxR, edgeMapMaxR,
1823 faceMapMaxR,
false);
1833 PrismExp->GetLocMatrix(PrismR);
1838 vertMapMaxR, edgeMapMaxR,
1847 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
1852 int nRows = PyrExp->NumBndryCoeffs();
1859 for(
int i = 0; i < nRows; ++i)
1861 newmat->SetValue(i,i,1.0);
1869 const int nadjedge[] = {3,3,3,3,4};
1870 const int VEHexVert[][4] = {{0,0,0,-1},{1,1,1,-1},{2,2,2,-1},{3,3,3,-1},{4,5,6,7}};
1871 const int VEHexEdge[][4] = {{0,3,4,-1},{0,1,5,-1},{1,2,6,-1},{2,3,7,-1},{4,5,6,7}};
1872 const int VEPyrEdge[][4] = {{0,3,4,-1},{0,1,5,-1},{1,2,6,-1},{2,3,7,-1},{4,5,6,7}};
1875 for(
int v = 0; v < 5; ++v)
1877 for(
int e = 0; e < nadjedge[v]; ++e)
1879 for(
int i = 0; i < nummodesmax-2; ++i)
1886 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1887 edgeMapMaxR[
ePyramid][VEPyrEdge[v][e]][i],val);
1893 nfacemodes = (nummodesmax-2)*(nummodesmax-2);
1895 for(
int v = 0; v < 4; ++v)
1897 for(
int i = 0; i < nfacemodes; ++i)
1901 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1907 const int nadjface[] = {2,2,2,2,4};
1908 const int VFTetVert[][4] = {{0,0,-1,-1},{1,1,-1,-1},{2,2,-1,-1},{0,2,-1,-1},{3,3,3,3}};
1909 const int VFTetFace[][4] = {{1,3,-1,-1},{1,2,-1,-1},{2,3,-1,-1},{1,3,-1,-1},{1,2,1,2}};
1910 const int VFPyrFace[][4] = {{1,4,-1,-1},{1,2,-1,-1},{2,3,-1,-1},{3,4,-1,-1},{1,2,3,4}};
1913 nfacemodes = (nummodesmax-3)*(nummodesmax-2)/2;
1914 for(
int v = 0; v < 5; ++v)
1916 for(
int f = 0; f < nadjface[v]; ++f)
1918 for(
int i = 0; i < nfacemodes; ++i)
1922 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1923 faceMapMaxR[
ePyramid][VFPyrFace[v][f]][i],val);
1931 nfacemodes = (nummodesmax-2)*(nummodesmax-2);
1932 for(
int e = 0; e < 4; ++e)
1934 for(
int i = 0; i < nummodesmax-2; ++i)
1936 for(
int j = 0; j < nfacemodes; ++j)
1941 val = (*maxRmat[
eHexahedron])(edgemapid,facemapid);
1942 newmat->SetValue(edgeMapMaxR[
ePyramid][e][i],
1949 const int nadjface1[] = {1,1,1,1,2,2,2,2};
1950 const int EFTetEdge[][2] = {{0,-1},{1,-1},{0,-1},{2,-1},{3,3},{4,4},{5,5},{3,5}};
1951 const int EFTetFace[][2] = {{1,-1},{2,-1},{1,-1},{3,-1},{1,3},{1,2},{2,3},{1,3}};
1952 const int EFPyrFace[][2] = {{1,-1},{2,-1},{3,-1},{4,-1},{1,4},{1,2},{2,3},{3,4}};
1955 nfacemodes = (nummodesmax-3)*(nummodesmax-2)/2;
1956 for(
int e = 0; e < 8; ++e)
1958 for(
int f = 0; f < nadjface1[e]; ++f)
1960 for(
int i = 0; i < nummodesmax-2; ++i)
1962 for(
int j = 0; j < nfacemodes; ++j)
1964 int edgemapid = edgeMapMaxR[
eTetrahedron][EFTetEdge[e][f]][i];
1965 int facemapid = faceMapMaxR[
eTetrahedron][EFTetFace[e][f]][j];
1968 newmat->SetValue(edgeMapMaxR[
ePyramid][e][i],
1969 faceMapMaxR[
ePyramid][EFPyrFace[e][f]][j],val);
1983 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
1988 boost::ignore_unused(faceMapMaxR);
1990 int nRows = TetExp->NumBndryCoeffs();
1997 for(
int i = 0; i < nRows; ++i)
1999 for(
int j = 0; j < nRows; ++j)
2002 newmat->SetValue(i,j,val);
2011 const int VEHexVert[][4] = {{0,0,0},{1,1,1},{2,2,2},{4,5,6}};
2012 const int VEHexEdge[][4] = {{0,3,4},{0,1,5},{1,2,6},{4,5,6}};
2013 const int VETetEdge[][4] = {{0,2,3},{0,1,4},{1,2,5},{3,4,5}};
2016 for(
int v = 0; v < 4; ++v)
2018 for(
int e = 0; e < 3; ++e)
2020 for(
int i = 0; i < nummodesmax-2; ++i)
2042 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
2048 int nRows = PrismExp->NumBndryCoeffs();
2060 for(
int i = 0; i < nRows; ++i)
2062 for(
int j = 0; j < nRows; ++j)
2064 val = (*maxRmat[
ePrism])(i,j);
2065 newmat->SetValue(i,j,val);
2070 const int VETetVert[][2] = {{0,0},{1,1},{1,1},{0,0},{3,3},{3,3}};
2071 const int VETetEdge[][2] = {{0,3},{0,4},{0,4},{0,3},{3,4},{4,3}};
2072 const int VEPrismEdge[][2] = {{0,4},{0,5},{2,6},{2,7},{4,5},{6,7}};
2075 for(
int v = 0; v < 6; ++v)
2077 for(
int e = 0; e < 2; ++e)
2079 for(
int i = 0; i < nummodesmax-2; ++i)
2087 SetValue(vertMapMaxR[
ePrism][v],
2088 edgeMapMaxR[
ePrism][VEPrismEdge[v][e]][i],
2098 for(
int i = 0; i < nRows; ++i)
2100 newmat->SetValue(i,i,1.0);
2111 const int VEHexVert[][3] = {{0,0,0},{1,1,1},{2,2,2},{3,3,3},
2113 const int VEHexEdge[][3] = {{0,3,4},{0,1,5},{1,2,6},{2,3,7},
2115 const int VEPrismEdge[][3] = {{0,3,4},{0,1,5},{1,2,6},{2,3,7},
2119 for(
int v = 0; v < 6; ++v)
2121 for(
int e = 0; e < 3; ++e)
2123 for(
int i = 0; i < nummodesmax-2; ++i)
2130 newmat->SetValue(vertMapMaxR[
ePrism][v],
2131 edgeMapMaxR[
ePrism][VEPrismEdge[v][e]][i],
2139 const int VFHexVert[][2] = {{0,0},{1,1},{4,5},{2,2},{3,3},{6,7}};
2140 const int VFHexFace[][2] = {{0,4},{0,2},{4,2},{0,2},{0,4},{2,4}};
2142 const int VQFPrismVert[][2] = {{0,0},{1,1},{4,4},{2,2},{3,3},{5,5}};
2143 const int VQFPrismFace[][2] = {{0,4},{0,2},{4,2},{0,2},{0,4},{2,4}};
2145 nfacemodes = (nummodesmax-2)*(nummodesmax-2);
2147 for(
int v = 0; v < 6; ++v)
2149 for(
int f = 0; f < 2; ++f)
2151 for(
int i = 0; i < nfacemodes; ++i)
2156 newmat->SetValue(vertMapMaxR[
ePrism][VQFPrismVert[v][f]],
2157 faceMapMaxR[
ePrism][VQFPrismFace[v][f]][i],val);
2163 const int nadjface[] = {1,2,1,2,1,1,1,1,2};
2164 const int EFHexEdge[][2] = {{0,-1},{1,1},{2,-1},{3,3},{4,-1},{5,-1},{6,-1},{7,-1},{9,11}};
2165 const int EFHexFace[][2] = {{0,-1},{0,2},{0,-1},{0,4},{4,-1},{2,-1},{2,-1},{4,-1},{2,4}};
2166 const int EQFPrismEdge[][2] = {{0,-1},{1,1},{2,-1},{3,3},{4,-1},{5,-1},{6,-1},{7,-1},{8,8}};
2167 const int EQFPrismFace[][2] = {{0,-1},{0,2},{0,-1},{0,4},{4,-1},{2,-1},{2,-1},{4,-1},{2,4}};
2170 nfacemodes = (nummodesmax-2)*(nummodesmax-2);
2171 for(
int e = 0; e < 9; ++e)
2173 for(
int f = 0; f < nadjface[e]; ++f)
2175 for(
int i = 0; i < nummodesmax-2; ++i)
2177 for(
int j = 0; j < nfacemodes; ++j)
2179 int edgemapid = edgeMapMaxR[
eHexahedron][EFHexEdge[e][f]][i];
2180 int facemapid = faceMapMaxR[
eHexahedron][EFHexFace[e][f]][j];
2182 val = (*maxRmat[
eHexahedron])(edgemapid,facemapid);
2184 int edgemapid1 = edgeMapMaxR[
ePrism][EQFPrismEdge[e][f]][i];
2185 int facemapid1 = faceMapMaxR[
ePrism][EQFPrismFace[e][f]][j];
2186 newmat->SetValue(edgemapid1, facemapid1, val);
2193 const int VFTetVert[] = {0,1,3,1,0,3};
2194 const int VFTetFace[] = {1,1,1,1,1,1};
2195 const int VTFPrismVert[] = {0,1,4,2,3,5};
2196 const int VTFPrismFace[] = {1,1,1,3,3,3};
2199 nfacemodes = (nummodesmax-3)*(nummodesmax-2)/2;
2200 for(
int v = 0; v < 6; ++v)
2202 for(
int i = 0; i < nfacemodes; ++i)
2208 newmat->SetValue(vertMapMaxR[
ePrism][VTFPrismVert[v]],
2209 faceMapMaxR[
ePrism][VTFPrismFace[v]][i],val);
2214 const int EFTetEdge[] = {0,3,4,0,4,3};
2215 const int EFTetFace[] = {1,1,1,1,1,1};
2216 const int ETFPrismEdge[] = {0,4,5,2,6,7};
2217 const int ETFPrismFace[] = {1,1,1,3,3,3};
2221 nfacemodes = (nummodesmax-3)*(nummodesmax-2)/2;
2222 for(
int e = 0; e < 6; ++e)
2224 for(
int i = 0; i < nummodesmax-2; ++i)
2226 for(
int j = 0; j < nfacemodes; ++j)
2228 int edgemapid = edgeMapMaxR[
eTetrahedron][EFTetEdge[e]][i];
2229 int facemapid = faceMapMaxR[
eTetrahedron][EFTetFace[e]][j];
2232 newmat->SetValue(edgeMapMaxR[
ePrism][ETFPrismEdge[e]][i],
2233 faceMapMaxR[
ePrism][ETFPrismFace[e]][j],val);
2241 maxRmat[
ePrism] = PrismR;
2254 int nRows = locExp->NumBndryCoeffs();
2262 locExp->GetInverseBoundaryMaps(vlocmap,elocmap,flocmap);
2265 for(
int i = 0; i < nRows; ++i)
2268 newmat->SetValue(i,i,val);
2271 int nverts = locExp->GetNverts();
2272 int nedges = locExp->GetNedges();
2273 int nfaces = locExp->GetNtraces();
2276 for(
int e = 0; e < nedges; ++e)
2278 int nEdgeInteriorCoeffs = locExp->GetEdgeNcoeffs(e) -2;
2280 for(
int v = 0; v < nverts; ++v)
2282 for(
int i = 0; i < nEdgeInteriorCoeffs; ++i)
2284 val = (*maxRmat)(vmap[v],emap[e][i]);
2285 newmat->SetValue(vlocmap[v],elocmap[e][i],val);
2290 for(
int f = 0; f < nfaces; ++f)
2296 int nFaceInteriorCoeffs = locExp->GetTraceIntNcoeffs(f);
2298 locExp->GetTraceNumModes(f,m0,m1,FwdOrient);
2301 GetTraceInverseBoundaryMap(f,FwdOrient, m0,m1);
2304 for(
int v = 0; v < nverts; ++v)
2306 for(
int i = 0; i < nFaceInteriorCoeffs; ++i)
2308 val = (*maxRmat)(vmap[v],fmapRmat[i]);
2309 newmat->SetValue(vlocmap[v],flocmap[f][i],val);
2314 for(
int e = 0; e < nedges; ++e)
2316 int nEdgeInteriorCoeffs = locExp->GetEdgeNcoeffs(e) -2;
2318 for(
int j = 0; j < nEdgeInteriorCoeffs; ++j)
2321 for(
int i = 0; i < nFaceInteriorCoeffs; ++i)
2323 val = (*maxRmat)(emap[e][j],fmapRmat[i]);
2324 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
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)
virtual void v_DoTransformBasisFromLowEnergy(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
Multiply by the block inverse transformation matrix This transforms the bassi from Low Energy to orig...
DNekBlkMatSharedPtr m_InvRBlk
virtual void v_DoPreconditioner(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
virtual void v_DoTransformCoeffsFromLowEnergy(Array< OneD, NekDouble > &pInOut)
transform the solution coeffiicents from low energy back to the original coefficient space.
virtual void v_DoTransformBasisToLowEnergy(Array< OneD, NekDouble > &pInOut)
Transform the basis vector to low energy space.
void SetupBlockTransformationMatrix(void)
DNekBlkMatSharedPtr m_RBlk
DNekMatSharedPtr ExtractLocMat(LocalRegions::Expansion3DSharedPtr &locExp, DNekScalMatSharedPtr &maxRmat, LocalRegions::Expansion3DSharedPtr &expMax, Array< OneD, unsigned int > &vertMapMaxR, Array< OneD, Array< OneD, unsigned int > > &edgeMapMaxR)
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.
std::vector< std::pair< int, int > > m_sameBlock
virtual void v_BuildPreconditioner()
Construct the low energy preconditioner from .
virtual void v_InitObject()
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)
virtual DNekScalMatSharedPtr v_TransformedSchurCompl(int n, int offset, const std::shared_ptr< DNekScalMat > &loc_mat)
Set up the transformed block matrix system.
void CreateVariablePMask(void)
virtual void v_DoTransformCoeffsToLowEnergy(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
Multiply by the block tranposed inverse transformation matrix (R^T)^{-1} which is equivlaent to trans...
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.
@ eGaussRadauMAlpha2Beta0
Gauss Radau pinned at x=-1, .
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eGaussRadauMAlpha1Beta0
Gauss Radau pinned at x=-1, .
@ 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< SegGeom > SegGeomSharedPtr
std::shared_ptr< PyrGeom > PyrGeomSharedPtr
std::shared_ptr< TetGeom > TetGeomSharedPtr
std::shared_ptr< HexGeom > HexGeomSharedPtr
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)