117 std::shared_ptr<MultiRegions::ExpList> expList =
118 ((
m_linsys.lock())->GetLocMat()).lock();
125 int nVerts, nEdges, nFaces;
126 int eid, fid, n, cnt, nmodes, nedgemodes, nfacemodes;
130 int vMap1, vMap2, sign1, sign2;
131 int m, v, eMap1, eMap2, fMap1, fMap2;
132 int offset, globalrow, globalcol, nCoeffs;
138 expList->GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
156 int nDirBnd = asmMap->GetNumGlobalDirBndCoeffs();
157 int nNonDirVerts = asmMap->GetNumNonDirVertexModes();
161 nNonDirVerts, nNonDirVerts, zero, vertstorage);
167 int n_exp = expList->GetNumElmts();
168 int nNonDirEdgeIDs = asmMap->GetNumNonDirEdges();
169 int nNonDirFaceIDs = asmMap->GetNumNonDirFaces();
173 map<int, int> uniqueEdgeMap;
174 map<int, int> uniqueFaceMap;
181 expList->GetBndCondExpansions();
184 &bndConditions = expList->GetBndConditions();
191 for (i = 0; i < extradiredges.size(); ++i)
193 meshEdgeId = extradiredges[i];
194 edgeDirMap.insert(meshEdgeId);
198 for (i = 0; i < bndCondExp.size(); i++)
201 for (j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
204 std::dynamic_pointer_cast<LocalRegions::Expansion2D>(
205 bndCondExp[i]->GetExp(j));
206 if (bndConditions[i]->GetBoundaryConditionType() ==
209 for (k = 0; k < bndCondFaceExp->GetNtraces(); k++)
211 meshEdgeId = bndCondFaceExp->GetGeom()->GetEid(k);
212 if (edgeDirMap.count(meshEdgeId) == 0)
214 edgeDirMap.insert(meshEdgeId);
217 meshFaceId = bndCondFaceExp->GetGeom()->GetGlobalID();
218 faceDirMap.insert(meshFaceId);
226 int nlocalNonDirEdges = 0;
227 int nlocalNonDirFaces = 0;
228 int ntotalentries = 0;
230 map<int, int> EdgeSize;
231 map<int, int> FaceSize;
232 map<int, pair<int, int>> FaceModes;
235 for (n = 0; n < n_exp; ++n)
240 for (j = 0; j < nEdges; ++j)
242 int nEdgeInteriorCoeffs = locExpansion->GetEdgeNcoeffs(j) - 2;
246 if (EdgeSize.count(meshEdgeId) == 0)
248 EdgeSize[meshEdgeId] = nEdgeInteriorCoeffs;
252 EdgeSize[meshEdgeId] =
253 min(EdgeSize[meshEdgeId], nEdgeInteriorCoeffs);
257 nFaces = locExpansion->GetNtraces();
258 for (j = 0; j < nFaces; ++j)
260 int nFaceInteriorCoeffs = locExpansion->GetTraceIntNcoeffs(j);
261 meshFaceId = locExpansion->GetGeom3D()->GetFid(j);
263 if (FaceSize.count(meshFaceId) == 0)
265 FaceSize[meshFaceId] = nFaceInteriorCoeffs;
268 locExpansion->GetTraceNumModes(j, m0, m1,
269 locExpansion->GetTraceOrient(j));
270 FaceModes[meshFaceId] = pair<int, int>(m0, m1);
274 if (nFaceInteriorCoeffs < FaceSize[meshFaceId])
276 FaceSize[meshFaceId] = nFaceInteriorCoeffs;
278 locExpansion->GetTraceNumModes(
279 j, m0, m1, locExpansion->GetTraceOrient(j));
280 FaceModes[meshFaceId] = pair<int, int>(m0, m1);
286 bool verbose = expList->GetSession()->DefinesCmdLineArgument(
"verbose");
290 if (vComm->GetSize() > 1)
292 int EdgeSizeLen = EdgeSize.size();
293 int FaceSizeLen = FaceSize.size();
297 map<int, int>::iterator it;
301 for (it = EdgeSize.begin(); it != EdgeSize.end(); ++it, ++cnt)
303 FacetMap[cnt] = it->first;
304 maxid =
max(it->first, maxid);
305 FacetLen[cnt] = it->second;
311 for (it = FaceSize.begin(); it != FaceSize.end(); ++it, ++cnt)
313 FacetMap[cnt] = it->first + maxid;
314 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)
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)
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);
521 vComm->AllReduce(uniEdgeOffset,
ReduceMax);
522 uniEdgeOffset = uniEdgeOffset * maxEdgeDof * maxEdgeDof;
524 for (n = 0; n < n_exp; ++n)
529 for (j = 0; j < locExpansion->GetNedges(); ++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)
717 nedgemodes = EdgeSize[meshEdgeId];
723 nedgemodes, nedgemodes, zero, storage);
726 locExpansion->GetEdgeInverseBoundaryMap(eid);
728 if (edgeDirMap.count(meshEdgeId) == 0)
730 for (v = 0; v < nedgemodesloc; ++v)
732 eMap1 = edgemodearray[v];
733 sign1 = asmMap->GetLocalToGlobalBndSign(cnt + eMap1);
740 for (m = 0; m < nedgemodesloc; ++m)
742 eMap2 = edgemodearray[m];
746 asmMap->GetLocalToGlobalBndSign(cnt + eMap2);
749 sign1 * sign2 * RSRT(eMap1, eMap2);
754 BlockArray[matrixoffset + v * nedgemodes + m] =
759 matrixoffset += nedgemodes * nedgemodes;
765 for (fid = 0; fid < nFaces; ++fid)
771 nfacemodes = FaceSize[meshFaceId];
776 nfacemodes, nfacemodes, zero, storage);
778 if (faceDirMap.count(meshFaceId) == 0)
782 locExpansion->GetTraceOrient(fid);
784 auto pIt = periodicFaces.find(meshFaceId);
785 if (pIt != periodicFaces.end())
787 if (meshFaceId ==
min(meshFaceId, pIt->second[0].id))
790 faceOrient, pIt->second[0].orient);
794 facemodearray = locExpansion->GetTraceInverseBoundaryMap(
795 fid, faceOrient, FaceModes[meshFaceId].first,
796 FaceModes[meshFaceId].second);
798 for (v = 0; v < nfacemodes; ++v)
800 fMap1 = facemodearray[v];
802 sign1 = asmMap->GetLocalToGlobalBndSign(cnt + fMap1);
805 "Something is wrong since we "
806 "shoudl only be extracting modes for "
807 "lowest order expansion");
809 for (m = 0; m < nfacemodes; ++m)
811 fMap2 = facemodearray[m];
815 asmMap->GetLocalToGlobalBndSign(cnt + fMap2);
818 "Something is wrong since "
819 "we shoudl only be extracting modes for "
820 "lowest order expansion");
825 sign1 * sign2 * RSRT(fMap1, fMap2);
829 BlockArray[matrixoffset + v * nfacemodes + m] =
833 matrixoffset += nfacemodes * nfacemodes;
851 Vmath::Assmb(BlockArray.size(), BlockArray, localToGlobalMatrixMap,
861 for (
int i = 0; i < nNonDirVerts; ++i)
863 VertBlk->SetValue(i, i, 1.0 / vertArray[i]);
874 for (
int loc = 0; loc < n_blks.size() - 1; ++loc)
876 nmodes = n_blks[1 + loc];
880 for (v = 0; v < nmodes; ++v)
882 for (m = 0; m < nmodes; ++m)
884 NekDouble Value = GlobalBlock[offset + v * nmodes + m];
885 gmat->SetValue(v, m, Value);
888 m_BlkMat->SetBlock(1 + loc, 1 + loc, gmat);
889 offset += modeoffset[loc];
893 int totblks =
m_BlkMat->GetNumberOfBlockRows();
894 for (i = 1; i < totblks; ++i)
896 unsigned int nmodes =
m_BlkMat->GetNumberOfRowsInBlockRow(i);
1880 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
1885 int nRows = PyrExp->NumBndryCoeffs();
1892 for (
int i = 0; i < nRows; ++i)
1894 newmat->SetValue(i, i, 1.0);
1902 const int nadjedge[] = {3, 3, 3, 3, 4};
1903 const int VEHexVert[][4] = {{0, 0, 0, -1},
1908 const int VEHexEdge[][4] = {{0, 3, 4, -1},
1913 const int VEPyrEdge[][4] = {{0, 3, 4, -1},
1920 for (
int v = 0; v < 5; ++v)
1922 for (
int e = 0; e < nadjedge[v]; ++e)
1924 for (
int i = 0; i < nummodesmax - 2; ++i)
1931 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1932 edgeMapMaxR[
ePyramid][VEPyrEdge[v][e]][i],
1939 nfacemodes = (nummodesmax - 2) * (nummodesmax - 2);
1941 for (
int v = 0; v < 4; ++v)
1943 for (
int i = 0; i < nfacemodes; ++i)
1947 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1952 const int nadjface[] = {2, 2, 2, 2, 4};
1953 const int VFTetVert[][4] = {{0, 0, -1, -1},
1958 const int VFTetFace[][4] = {{1, 3, -1, -1},
1963 const int VFPyrFace[][4] = {{1, 4, -1, -1},
1970 nfacemodes = (nummodesmax - 3) * (nummodesmax - 2) / 2;
1971 for (
int v = 0; v < 5; ++v)
1973 for (
int f = 0; f < nadjface[v]; ++f)
1975 for (
int i = 0; i < nfacemodes; ++i)
1980 newmat->SetValue(vertMapMaxR[
ePyramid][v],
1981 faceMapMaxR[
ePyramid][VFPyrFace[v][f]][i],
1989 nfacemodes = (nummodesmax - 2) * (nummodesmax - 2);
1990 for (
int e = 0; e < 4; ++e)
1992 for (
int i = 0; i < nummodesmax - 2; ++i)
1994 for (
int j = 0; j < nfacemodes; ++j)
1999 val = (*maxRmat[
eHexahedron])(edgemapid, facemapid);
2000 newmat->SetValue(edgeMapMaxR[
ePyramid][e][i],
2006 const int nadjface1[] = {1, 1, 1, 1, 2, 2, 2, 2};
2007 const int EFTetEdge[][2] = {{0, -1}, {1, -1}, {0, -1}, {2, -1},
2008 {3, 3}, {4, 4}, {5, 5}, {3, 5}};
2009 const int EFTetFace[][2] = {{1, -1}, {2, -1}, {1, -1}, {3, -1},
2010 {1, 3}, {1, 2}, {2, 3}, {1, 3}};
2011 const int EFPyrFace[][2] = {{1, -1}, {2, -1}, {3, -1}, {4, -1},
2012 {1, 4}, {1, 2}, {2, 3}, {3, 4}};
2015 nfacemodes = (nummodesmax - 3) * (nummodesmax - 2) / 2;
2016 for (
int e = 0; e < 8; ++e)
2018 for (
int f = 0; f < nadjface1[e]; ++f)
2020 for (
int i = 0; i < nummodesmax - 2; ++i)
2022 for (
int j = 0; j < nfacemodes; ++j)
2030 newmat->SetValue(edgeMapMaxR[
ePyramid][e][i],
2031 faceMapMaxR[
ePyramid][EFPyrFace[e][f]][j],
2103 std::map<ShapeType, DNekScalMatSharedPtr> &maxRmat,
2109 int nRows = PrismExp->NumBndryCoeffs();
2120 for (
int i = 0; i < nRows; ++i)
2122 for (
int j = 0; j < nRows; ++j)
2124 val = (*maxRmat[
ePrism])(i, j);
2125 newmat->SetValue(i, j, val);
2130 const int VETetVert[][2] = {{0, 0}, {1, 1}, {1, 1},
2131 {0, 0}, {3, 3}, {3, 3}};
2132 const int VETetEdge[][2] = {{0, 3}, {0, 4}, {0, 4},
2133 {0, 3}, {3, 4}, {4, 3}};
2134 const int VEPrismEdge[][2] = {{0, 4}, {0, 5}, {2, 6},
2135 {2, 7}, {4, 5}, {6, 7}};
2138 for (
int v = 0; v < 6; ++v)
2140 for (
int e = 0; e < 2; ++e)
2142 for (
int i = 0; i < nummodesmax - 2; ++i)
2149 newmat->SetValue(vertMapMaxR[
ePrism][v],
2150 edgeMapMaxR[
ePrism][VEPrismEdge[v][e]][i],
2159 for (
int i = 0; i < nRows; ++i)
2161 newmat->SetValue(i, i, 1.0);
2171 const int VEHexVert[][3] = {{0, 0, 0}, {1, 1, 1}, {2, 2, 2},
2172 {3, 3, 3}, {4, 5, 5}, {6, 7, 7}};
2173 const int VEHexEdge[][3] = {{0, 3, 4}, {0, 1, 5}, {1, 2, 6},
2174 {2, 3, 7}, {4, 5, 9}, {6, 7, 11}};
2175 const int VEPrismEdge[][3] = {{0, 3, 4}, {0, 1, 5}, {1, 2, 6},
2176 {2, 3, 7}, {4, 5, 8}, {6, 7, 8}};
2179 for (
int v = 0; v < 6; ++v)
2181 for (
int e = 0; e < 3; ++e)
2183 for (
int i = 0; i < nummodesmax - 2; ++i)
2190 newmat->SetValue(vertMapMaxR[
ePrism][v],
2191 edgeMapMaxR[
ePrism][VEPrismEdge[v][e]][i],
2198 const int VFHexVert[][2] = {{0, 0}, {1, 1}, {4, 5},
2199 {2, 2}, {3, 3}, {6, 7}};
2200 const int VFHexFace[][2] = {{0, 4}, {0, 2}, {4, 2},
2201 {0, 2}, {0, 4}, {2, 4}};
2203 const int VQFPrismVert[][2] = {{0, 0}, {1, 1}, {4, 4},
2204 {2, 2}, {3, 3}, {5, 5}};
2205 const int VQFPrismFace[][2] = {{0, 4}, {0, 2}, {4, 2},
2206 {0, 2}, {0, 4}, {2, 4}};
2208 nfacemodes = (nummodesmax - 2) * (nummodesmax - 2);
2210 for (
int v = 0; v < 6; ++v)
2212 for (
int f = 0; f < 2; ++f)
2214 for (
int i = 0; i < nfacemodes; ++i)
2219 newmat->SetValue(vertMapMaxR[
ePrism][VQFPrismVert[v][f]],
2220 faceMapMaxR[
ePrism][VQFPrismFace[v][f]][i],
2227 const int nadjface[] = {1, 2, 1, 2, 1, 1, 1, 1, 2};
2228 const int EFHexEdge[][2] = {{0, -1}, {1, 1}, {2, -1}, {3, 3}, {4, -1},
2229 {5, -1}, {6, -1}, {7, -1}, {9, 11}};
2230 const int EFHexFace[][2] = {{0, -1}, {0, 2}, {0, -1}, {0, 4}, {4, -1},
2231 {2, -1}, {2, -1}, {4, -1}, {2, 4}};
2232 const int EQFPrismEdge[][2] = {{0, -1}, {1, 1}, {2, -1},
2233 {3, 3}, {4, -1}, {5, -1},
2234 {6, -1}, {7, -1}, {8, 8}};
2235 const int EQFPrismFace[][2] = {{0, -1}, {0, 2}, {0, -1},
2236 {0, 4}, {4, -1}, {2, -1},
2237 {2, -1}, {4, -1}, {2, 4}};
2240 nfacemodes = (nummodesmax - 2) * (nummodesmax - 2);
2241 for (
int e = 0; e < 9; ++e)
2243 for (
int f = 0; f < nadjface[e]; ++f)
2245 for (
int i = 0; i < nummodesmax - 2; ++i)
2247 for (
int j = 0; j < nfacemodes; ++j)
2254 val = (*maxRmat[
eHexahedron])(edgemapid, facemapid);
2257 edgeMapMaxR[
ePrism][EQFPrismEdge[e][f]][i];
2259 faceMapMaxR[
ePrism][EQFPrismFace[e][f]][j];
2260 newmat->SetValue(edgemapid1, facemapid1, val);
2267 const int VFTetVert[] = {0, 1, 3, 1, 0, 3};
2268 const int VFTetFace[] = {1, 1, 1, 1, 1, 1};
2269 const int VTFPrismVert[] = {0, 1, 4, 2, 3, 5};
2270 const int VTFPrismFace[] = {1, 1, 1, 3, 3, 3};
2273 nfacemodes = (nummodesmax - 3) * (nummodesmax - 2) / 2;
2274 for (
int v = 0; v < 6; ++v)
2276 for (
int i = 0; i < nfacemodes; ++i)
2282 newmat->SetValue(vertMapMaxR[
ePrism][VTFPrismVert[v]],
2283 faceMapMaxR[
ePrism][VTFPrismFace[v]][i], val);
2288 const int EFTetEdge[] = {0, 3, 4, 0, 4, 3};
2289 const int EFTetFace[] = {1, 1, 1, 1, 1, 1};
2290 const int ETFPrismEdge[] = {0, 4, 5, 2, 6, 7};
2291 const int ETFPrismFace[] = {1, 1, 1, 3, 3, 3};
2295 nfacemodes = (nummodesmax - 3) * (nummodesmax - 2) / 2;
2296 for (
int e = 0; e < 6; ++e)
2298 for (
int i = 0; i < nummodesmax - 2; ++i)
2300 for (
int j = 0; j < nfacemodes; ++j)
2302 int edgemapid = edgeMapMaxR[
eTetrahedron][EFTetEdge[e]][i];
2303 int facemapid = faceMapMaxR[
eTetrahedron][EFTetFace[e]][j];
2306 newmat->SetValue(edgeMapMaxR[
ePrism][ETFPrismEdge[e]][i],
2307 faceMapMaxR[
ePrism][ETFPrismFace[e]][j], val);
2314 maxRmat[
ePrism] = PrismR;