43 #include <boost/config.hpp>
44 #include <boost/graph/adjacency_list.hpp>
45 #include <boost/graph/cuthill_mckee_ordering.hpp>
46 #include <boost/graph/properties.hpp>
47 #include <boost/graph/bandwidth.hpp>
51 namespace MultiRegions
71 const std::string variable):
74 pSession->LoadParameter(
82 const bool checkIfSystemSingular,
88 set<int> &extraDirVerts,
89 set<int> &extraDirEdges,
90 int &firstNonDirGraphVertId,
97 int meshVertId, meshEdgeId, meshFaceId;
98 int meshVertId2, meshEdgeId2;
104 PeriodicMap::const_iterator pIt;
109 for(i = 0; i < bndCondExp.num_elements(); i++)
113 for(k = 0; k < bndConditions.num_elements(); ++k)
115 if (bndConditions[k][i]->GetBoundaryConditionType() ==
120 if (bndConditions[k][i]->GetBoundaryConditionType() !=
129 for (j = 0; j < bndCondExp[i]->GetNumElmts(); ++j)
132 for (k = 0; k < bndExp->GetNverts(); ++k)
134 if (vMaxVertId < bndExp->GetGeom()->GetVid(k))
136 vMaxVertId = bndExp->
GetGeom()->GetVid(k);
143 if(cnt == bndConditions.num_elements())
145 for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
147 bndExp = bndCondExp[i]->GetExp(j);
149 for (k = 0; k < bndExp->GetNverts(); k++)
151 meshVertId = bndExp->GetGeom()->GetVid(k);
152 if (graph[0].count(meshVertId) == 0)
154 graph[0][meshVertId] = graphVertId++;
158 for (k = 0; k < bndExp->GetNedges(); k++)
160 meshEdgeId = bndExp->GetGeom()->GetEid(k);
161 if (graph[1].count(meshEdgeId) == 0)
163 graph[1][meshEdgeId] = graphVertId++;
168 meshFaceId = bndExp->GetGeom()->GetGlobalID();
169 const int bndDim = bndExp->GetNumBases();
170 if (graph[bndDim].count(meshFaceId) == 0)
172 graph[bndDim][meshFaceId] = graphVertId++;
207 int n = vComm->GetSize();
208 int p = vComm->GetRank();
217 vertcounts[p] = graph[0].size();
218 edgecounts[p] = graph[1].size();
222 for (i = 1; i < n; ++i)
224 vertoffsets[i] = vertoffsets[i-1] + vertcounts[i-1];
225 edgeoffsets[i] = edgeoffsets[i-1] + edgecounts[i-1];
236 for (it = graph[0].begin(), i = 0;
237 it != graph[0].end();
240 vertlist[vertoffsets[p] + i] = it->first;
244 for (it = graph[1].begin(), i = 0;
245 it != graph[1].end();
248 edgelist[edgeoffsets[p] + i] = it->first;
256 map<int, int> extraDirVertIds, extraDirEdgeIds;
266 for (i = 0; i < n; ++i)
273 for(j = 0; j < locExpVector.size(); j++)
277 for(k = 0; k < exp->GetNverts(); k++)
279 meshVertId = exp->GetGeom()->GetVid(k);
280 if(graph[0].count(meshVertId) == 0)
282 for (l = 0; l < vertcounts[i]; ++l)
284 if (vertlist[vertoffsets[i]+l] == meshVertId)
286 extraDirVertIds[meshVertId] = i;
287 graph[0][meshVertId] = graphVertId++;
294 for(k = 0; k < exp->GetNedges(); k++)
296 meshEdgeId = exp->GetGeom()->GetEid(k);
297 if(graph[1].count(meshEdgeId) == 0)
299 for (l = 0; l < edgecounts[i]; ++l)
301 if (edgelist[edgeoffsets[i]+l] == meshEdgeId)
303 extraDirEdgeIds[meshEdgeId] = i;
304 graph[1][meshEdgeId] = graphVertId++;
305 nExtraDirichlet += exp->GetEdgeNcoeffs(k)-2;
315 map<int, int>::const_iterator mapConstIt;
317 for (mapConstIt = extraDirEdgeIds.begin(), i = 0;
318 mapConstIt != extraDirEdgeIds.end(); mapConstIt++)
320 meshEdgeId = mapConstIt->first;
330 for (i = 0; i < n; ++i)
338 vertcounts[p] = extraDirVertIds.size();
339 edgecounts[p] = extraDirEdgeIds.size();
345 vertoffsets[0] = edgeoffsets[0] = 0;
347 for (i = 1; i < n; ++i)
349 vertoffsets[i] = vertoffsets[i-1] + vertcounts[i-1];
350 edgeoffsets[i] = edgeoffsets[i-1] + edgecounts[i-1];
358 for (it = extraDirVertIds.begin(), i = 0;
359 it != extraDirVertIds.end(); ++it, ++i)
361 vertids [vertoffsets[p]+i] = it->first;
362 vertprocs[vertoffsets[p]+i] = it->second;
365 for (it = extraDirEdgeIds.begin(), i = 0;
366 it != extraDirEdgeIds.end(); ++it, ++i)
368 edgeids [edgeoffsets[p]+i] = it->first;
369 edgeprocs[edgeoffsets[p]+i] = it->second;
379 for (i = 0; i < nTotVerts; ++i)
381 if (vComm->GetRank() == vertprocs[i])
383 extraDirVerts.insert(vertids[i]);
388 for (i = 0; i < nTotEdges; ++i)
390 if (vComm->GetRank() == edgeprocs[i])
392 extraDirEdges.insert(edgeids[i]);
403 bcminvertid[p] = vMaxVertId;
418 if (
m_session->DefinesParameter(
"SingularVertex"))
420 m_session->LoadParameter(
"SingularVertex", meshVertId);
422 else if (vMaxVertId == -1)
425 meshVertId = locExpVector[0]->GetGeom()->GetVid(0);
431 meshVertId = bcminvertid[p];
434 if (graph[0].count(meshVertId) == 0)
436 graph[0][meshVertId] = graphVertId++;
452 for (i = 0; i < locExpVector.size(); ++i)
454 for (j = 0; j < locExpVector[i]->GetNverts(); ++j)
456 if (locExpVector[i]->GetGeom()->GetVid(j) !=
462 if (graph[0].count(meshVertId) == 0)
464 graph[0][meshVertId] =
480 if (graph[0].count(meshVertId) == 0)
486 gId = graph[0][meshVertId];
489 for (pIt = periodicVerts.begin();
490 pIt != periodicVerts.end(); ++pIt)
497 if (pIt->first == meshVertId)
499 graph[0][meshVertId] = gId < 0 ? graphVertId++ : gId;
501 for (i = 0; i < pIt->second.size(); ++i)
503 if (pIt->second[i].isLocal)
505 graph[0][pIt->second[i].id] = gId;
512 for (i = 0; i < pIt->second.size(); ++i)
514 if (pIt->second[i].id == meshVertId)
523 graph[0][pIt->first] = gId < 0 ? graphVertId++ : gId;
525 for (i = 0; i < pIt->second.size(); ++i)
527 if (pIt->second[i].isLocal)
529 graph[0][pIt->second[i].id] = gId;
539 firstNonDirGraphVertId = graphVertId;
541 typedef boost::adjacency_list<
542 boost::setS, boost::vecS, boost::undirectedS> BoostGraph;
543 BoostGraph boostGraphObj;
545 vector<map<int,int> > tempGraph(3);
546 map<int, int> vwgts_map;
551 int tempGraphVertId = 0;
552 int localVertOffset = 0;
553 int localEdgeOffset = 0;
554 int localFaceOffset = 0;
572 map<int,int> EdgeSize;
573 map<int,int> FaceSize;
576 for(i = 0; i < locExpVector.size(); ++i)
579 nTotalVerts += exp->GetNverts();
580 nTotalEdges += exp->GetNedges();
581 nTotalFaces += exp->GetNfaces();
583 nEdges = exp->GetNedges();
584 for(j = 0; j < nEdges; ++j)
586 meshEdgeId = exp->GetGeom()->GetEid(j);
587 if (EdgeSize.count(meshEdgeId) > 0)
589 EdgeSize[meshEdgeId] =
590 min(EdgeSize[meshEdgeId],
591 exp->GetEdgeNcoeffs(j) - 2);
595 EdgeSize[meshEdgeId] = exp->GetEdgeNcoeffs(j) - 2;
599 nFaces = exp->GetNfaces();
601 for(j = 0; j < nFaces; ++j)
603 meshFaceId = exp->GetGeom()->GetFid(j);
604 if (FaceSize.count(meshFaceId) > 0)
606 FaceSize[meshFaceId] =
607 min(FaceSize[meshFaceId],
608 exp->GetFaceIntNcoeffs(j));
612 FaceSize[meshFaceId] = exp->GetFaceIntNcoeffs(j);
614 FaceSize[meshFaceId] = exp->GetFaceIntNcoeffs(j);
619 for (pIt = periodicVerts.begin(); pIt != periodicVerts.end(); ++pIt)
621 meshVertId = pIt->first;
624 if (graph[0].count(pIt->first) != 0)
626 for (i = 0; i < pIt->second.size(); ++i)
628 meshVertId2 = pIt->second[i].id;
629 if (graph[0].count(meshVertId2) == 0 &&
630 pIt->second[i].isLocal)
632 graph[0][meshVertId2] =
633 graph[0][meshVertId];
640 bool isDirichlet =
false;
641 for (i = 0; i < pIt->second.size(); ++i)
643 if (!pIt->second[i].isLocal)
648 meshVertId2 = pIt->second[i].id;
649 if (graph[0].count(meshVertId2) > 0)
658 graph[0][meshVertId] =
659 graph[0][pIt->second[i].id];
661 for (j = 0; j < pIt->second.size(); ++j)
663 meshVertId2 = pIt->second[i].id;
664 if (j == i || !pIt->second[j].isLocal ||
665 graph[0].count(meshVertId2) > 0)
670 graph[0][meshVertId2] =
671 graph[0][pIt->second[i].id];
678 for (i = 0; i < pIt->second.size(); ++i)
680 if (!pIt->second[i].isLocal)
685 if (tempGraph[0].count(pIt->second[i].id) > 0)
691 if (i == pIt->second.size())
693 tempGraph[0][meshVertId] = tempGraphVertId++;
698 tempGraph[0][meshVertId] = tempGraph[0][pIt->second[i].id];
709 for(i = 0; i < locExpVector.size(); ++i)
711 exp = locExpVector[i];
713 nVerts = exp->GetNverts();
714 for(j = 0; j < nVerts; ++j)
716 meshVertId = exp->GetGeom()->GetVid(j);
717 if(graph[0].count(meshVertId) == 0)
719 if(tempGraph[0].count(meshVertId) == 0)
721 boost::add_vertex(boostGraphObj);
722 tempGraph[0][meshVertId] = tempGraphVertId++;
725 localVerts[localVertOffset+vertCnt++] = tempGraph[0][meshVertId];
726 vwgts_map[ tempGraph[0][meshVertId] ] = 1;
730 localVertOffset+=nVerts;
734 for (pIt = periodicEdges.begin(); pIt != periodicEdges.end(); ++pIt)
736 meshEdgeId = pIt->first;
739 if (graph[1].count(pIt->first) != 0)
741 for (i = 0; i < pIt->second.size(); ++i)
743 meshEdgeId2 = pIt->second[i].id;
744 if (graph[1].count(meshEdgeId2) == 0 &&
745 pIt->second[i].isLocal)
747 graph[1][meshEdgeId2] =
748 graph[1][meshEdgeId];
755 bool isDirichlet =
false;
756 for (i = 0; i < pIt->second.size(); ++i)
758 if (!pIt->second[i].isLocal)
763 meshEdgeId2 = pIt->second[i].id;
764 if (graph[1].count(meshEdgeId2) > 0)
773 graph[1][meshEdgeId] =
774 graph[1][pIt->second[i].id];
776 for (j = 0; j < pIt->second.size(); ++j)
778 meshEdgeId2 = pIt->second[i].id;
779 if (j == i || !pIt->second[j].isLocal ||
780 graph[1].count(meshEdgeId2) > 0)
785 graph[1][meshEdgeId2] =
786 graph[1][pIt->second[i].id];
793 for (i = 0; i < pIt->second.size(); ++i)
795 if (!pIt->second[i].isLocal)
800 if (tempGraph[1].count(pIt->second[i].id) > 0)
806 if (i == pIt->second.size())
808 tempGraph[1][meshEdgeId] = tempGraphVertId++;
814 tempGraph[1][meshEdgeId] = tempGraph[1][pIt->second[i].id];
818 int nEdgeIntCoeffs, nFaceIntCoeffs;
821 for(i = 0; i < locExpVector.size(); ++i)
823 exp = locExpVector[i];
825 nEdges = exp->GetNedges();
827 for(j = 0; j < nEdges; ++j)
829 nEdgeIntCoeffs = exp->GetEdgeNcoeffs(j) - 2;
830 meshEdgeId = exp->GetGeom()->GetEid(j);
831 if(graph[1].count(meshEdgeId) == 0)
833 if(tempGraph[1].count(meshEdgeId) == 0)
835 boost::add_vertex(boostGraphObj);
836 tempGraph[1][meshEdgeId] = tempGraphVertId++;
841 localEdges[localEdgeOffset+edgeCnt++] = tempGraph[1][meshEdgeId];
842 vwgts_map[ tempGraph[1][meshEdgeId] ] = nEdgeIntCoeffs;
846 localEdgeOffset+=nEdges;
850 for (pIt = periodicFaces.begin(); pIt != periodicFaces.end(); ++pIt)
852 if (!pIt->second[0].isLocal)
855 meshFaceId = pIt->first;
856 ASSERTL0(graph[2].count(meshFaceId) == 0,
857 "This periodic boundary edge has been specified before");
858 tempGraph[2][meshFaceId] = tempGraphVertId++;
859 nFaceIntCoeffs = FaceSize[meshFaceId];
863 else if (pIt->first < pIt->second[0].id)
865 ASSERTL0(graph[2].count(pIt->first) == 0,
866 "This periodic boundary face has been specified before");
867 ASSERTL0(graph[2].count(pIt->second[0].id) == 0,
868 "This periodic boundary face has been specified before");
870 tempGraph[2][pIt->first] = tempGraphVertId;
871 tempGraph[2][pIt->second[0].id] = tempGraphVertId++;
872 nFaceIntCoeffs = FaceSize[pIt->first];
879 for(i = 0; i < locExpVector.size(); ++i)
881 exp = locExpVector[i];
882 nFaces = exp->GetNfaces();
884 for(j = 0; j < nFaces; ++j)
886 nFaceIntCoeffs = exp->GetFaceIntNcoeffs(j);
887 meshFaceId = exp->GetGeom()->GetFid(j);
888 if(graph[2].count(meshFaceId) == 0)
890 if(tempGraph[2].count(meshFaceId) == 0)
892 boost::add_vertex(boostGraphObj);
893 tempGraph[2][meshFaceId] = tempGraphVertId++;
898 localFaces[localFaceOffset+faceCnt++] = tempGraph[2][meshFaceId];
899 vwgts_map[ tempGraph[2][meshFaceId] ] = nFaceIntCoeffs;
904 localFaceOffset+=nFaces;
910 for(i = 0; i < locExpVector.size(); ++i)
912 exp = locExpVector[i];
913 nVerts = exp->GetNverts();
914 nEdges = exp->GetNedges();
915 nFaces = exp->GetNfaces();
922 for(j = 0; j < nVerts; j++)
924 if(localVerts[j+localVertOffset]==-1)
929 for(k = 0; k < nVerts; k++)
931 if(localVerts[k+localVertOffset]==-1)
937 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
938 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
942 for(k = 0; k < nEdges; k++)
944 if(localEdges[k+localEdgeOffset]==-1)
948 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
949 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
952 for(k = 0; k < nFaces; k++)
954 if(localFaces[k+localFaceOffset]==-1)
958 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
959 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
964 for(j = 0; j < nEdges; j++)
966 if(localEdges[j+localEdgeOffset]==-1)
971 for(k = 0; k < nEdges; k++)
973 if(localEdges[k+localEdgeOffset]==-1)
979 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
980 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
984 for(k = 0; k < nVerts; k++)
986 if(localVerts[k+localVertOffset]==-1)
990 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
991 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
994 for(k = 0; k < nFaces; k++)
996 if(localFaces[k+localFaceOffset]==-1)
1000 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
1001 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
1006 for(j = 0; j < nFaces; j++)
1008 if(localFaces[j+localFaceOffset]==-1)
1013 for(k = 0; k < nFaces; k++)
1015 if(localFaces[k+localFaceOffset]==-1)
1021 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1022 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
1026 for(k = 0; k < nVerts; k++)
1028 if(localVerts[k+localVertOffset]==-1)
1032 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1033 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
1036 for(k = 0; k < nEdges; k++)
1038 if(localEdges[k+localEdgeOffset]==-1)
1042 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1043 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
1047 localVertOffset+=nVerts;
1048 localEdgeOffset+=nEdges;
1049 localFaceOffset+=nFaces;
1059 vector<long> procVerts, procEdges, procFaces;
1060 set <int> foundVerts, foundEdges, foundFaces;
1065 for(i = cnt = 0; i < locExpVector.size(); ++i)
1068 exp = locExpVector[elmtid];
1069 for (j = 0; j < exp->GetNverts(); ++j)
1071 int vid = exp->GetGeom()->GetVid(j)+1;
1072 if (foundVerts.count(vid) == 0)
1074 procVerts.push_back(vid);
1075 foundVerts.insert(vid);
1079 for (j = 0; j < exp->GetNedges(); ++j)
1081 int eid = exp->GetGeom()->GetEid(j)+1;
1083 if (foundEdges.count(eid) == 0)
1085 procEdges.push_back(eid);
1086 foundEdges.insert(eid);
1090 for (j = 0; j < exp->GetNfaces(); ++j)
1092 int fid = exp->GetGeom()->GetFid(j)+1;
1094 if (foundFaces.count(fid) == 0)
1096 procFaces.push_back(fid);
1097 foundFaces.insert(fid);
1102 int unique_verts = foundVerts.size();
1103 int unique_edges = foundEdges.size();
1104 int unique_faces = foundFaces.size();
1118 if (unique_edges > 0)
1126 if (unique_faces > 0)
1136 for (i = 0; i < unique_verts; ++i)
1140 if (graph[0].count(procVerts[i]-1) == 0)
1142 partVerts.insert(tempGraph[0][procVerts[i]-1]);
1147 for (i = 0; i < unique_edges; ++i)
1151 if (graph[1].count(procEdges[i]-1) == 0)
1153 partVerts.insert(tempGraph[1][procEdges[i]-1]);
1158 for (i = 0; i < unique_faces; ++i)
1162 if (graph[2].count(procFaces[i]-1) == 0)
1164 partVerts.insert(tempGraph[2][procFaces[i]-1]);
1170 int nGraphVerts = tempGraphVertId;
1174 ASSERTL1(vwgts_map.size()==nGraphVerts,
"Non matching dimensions");
1175 for(i = 0; i < nGraphVerts; ++i)
1177 vwgts[i] = vwgts_map[i];
1208 boostGraphObj, perm, iperm, bottomUpGraph,
1209 partVerts, mdswitch);
1215 "Unrecognised solution type: " + std::string(
1240 for(mapIt = tempGraph[0].begin(); mapIt != tempGraph[0].end(); mapIt++)
1242 graph[0][mapIt->first] = iperm[mapIt->second] + graphVertId;
1244 for(mapIt = tempGraph[1].begin(); mapIt != tempGraph[1].end(); mapIt++)
1246 graph[1][mapIt->first] = iperm[mapIt->second] + graphVertId;
1248 for(mapIt = tempGraph[2].begin(); mapIt != tempGraph[2].end(); mapIt++)
1250 graph[2][mapIt->first] = iperm[mapIt->second] + graphVertId;
1261 const int numLocalCoeffs,
1265 const bool checkIfSystemSingular,
1266 const std::string variable,
1275 int meshVertId, meshEdgeId, meshFaceId;
1277 int nEdgeInteriorCoeffs;
1278 int nFaceInteriorCoeffs;
1279 int firstNonDirGraphVertId;
1289 PeriodicMap::const_iterator pIt;
1299 set<int> extraDirVerts, extraDirEdges;
1304 for (i = 0; i < locExpVector.size(); ++i)
1306 exp = locExpVector[i];
1308 for(j = 0; j < locExpVector[i]->GetNverts(); ++j)
1310 dofs[0][exp->GetGeom()->GetVid(j)] = 1;
1313 for(j = 0; j < locExpVector[i]->GetNedges(); ++j)
1315 if (dofs[1].count(exp->GetGeom()->GetEid(j)) > 0)
1317 if (dofs[1][exp->GetGeom()->GetEid(j)] !=
1318 locExpVector[i]->GetEdgeNcoeffs(j)-2)
1322 "CG with variable order only available with modal expansion");
1324 dofs[1][exp->GetGeom()->GetEid(j)] =
1325 min(dofs[1][exp->GetGeom()->GetEid(j)],
1326 locExpVector[i]->GetEdgeNcoeffs(j)-2);
1330 dofs[1][exp->GetGeom()->GetEid(j)] =
1331 exp->GetEdgeNcoeffs(j) - 2;
1335 for(j = 0; j < locExpVector[i]->GetNfaces(); ++j)
1337 if (dofs[2].count(exp->GetGeom()->GetFid(j)) > 0)
1339 if (dofs[2][exp->GetGeom()->GetFid(j)] !=
1340 exp->GetFaceIntNcoeffs(j))
1343 "CG with variable order not available in 3D");
1345 dofs[2][exp->GetGeom()->GetFid(j)] =
1346 min(dofs[2][exp->GetGeom()->GetFid(j)],
1347 exp->GetFaceIntNcoeffs(j));
1351 dofs[2][exp->GetGeom()->GetFid(j)] =
1352 exp->GetFaceIntNcoeffs(j);
1362 for(dofIt = dofs[1].begin(), i=0; dofIt != dofs[1].end(); dofIt++, i++)
1364 edgeId[i] = dofIt->first;
1370 for (i=0; i < dofs[1].size(); i++)
1372 dofs[1][edgeId[i]] = (int) (edgeDof[i]+0.5);
1377 for(dofIt = dofs[2].begin(), i=0; dofIt != dofs[2].end(); dofIt++, i++)
1379 faceId[i] = dofIt->first;
1385 for (i=0; i < dofs[2].size(); i++)
1387 dofs[2][faceId[i]] = (int) (faceDof[i]+0.5);
1395 int nExtraDirichlet;
1398 checkIfSystemSingular, periodicVerts, periodicEdges,
1399 periodicFaces, graph, bottomUpGraph, extraDirVerts,
1400 extraDirEdges, firstNonDirGraphVertId,
1415 graph[0].size() + graph[1].size() + graph[2].size() + 1);
1417 graphVertOffset[0] = 0;
1419 for(i = 0; i < locExpVector.size(); ++i)
1423 for(j = 0; j < exp->GetNverts(); ++j)
1425 meshVertId = exp->GetGeom()->GetVid(j);
1426 graphVertOffset[graph[0][meshVertId]+1] = 1;
1429 for(j = 0; j < exp->GetNedges(); ++j)
1431 nEdgeInteriorCoeffs = exp->GetEdgeNcoeffs(j) - 2;
1432 meshEdgeId = exp->GetGeom()->GetEid(j);
1433 graphVertOffset[graph[1][meshEdgeId]+1]
1434 = dofs[1][meshEdgeId];
1436 bType = exp->GetEdgeBasisType(j);
1440 if(nEdgeInteriorCoeffs &&
1448 for(j = 0; j < exp->GetNfaces(); ++j)
1450 nFaceInteriorCoeffs = exp->GetFaceIntNcoeffs(j);
1451 meshFaceId = exp->GetGeom()->GetFid(j);
1452 graphVertOffset[graph[2][meshFaceId]+1] = dofs[2][meshFaceId];
1456 for(i = 1; i < graphVertOffset.num_elements(); i++)
1458 graphVertOffset[i] += graphVertOffset[i-1];
1483 m_numLocalIntCoeffsPerPatch[i] = (
unsigned int)
1500 for(i = 0; i < locExpVector.size(); ++i)
1502 exp = locExpVector[i];
1504 for(j = 0; j < exp->GetNverts(); ++j)
1506 meshVertId = exp->GetGeom()->GetVid(j);
1510 graphVertOffset[graph[0][meshVertId]];
1513 for(j = 0; j < exp->GetNedges(); ++j)
1515 nEdgeInteriorCoeffs = exp->GetEdgeNcoeffs(j)-2;
1516 edgeOrient = exp->GetGeom()->GetEorient(j);
1517 meshEdgeId = exp->GetGeom()->GetEid(j);
1519 pIt = periodicEdges.find(meshEdgeId);
1524 if (pIt != periodicEdges.end())
1526 pair<int, StdRegions::Orientation> idOrient =
1528 meshEdgeId, edgeOrient, pIt->second);
1529 edgeOrient = idOrient.second;
1532 exp->GetEdgeInteriorMap(j,edgeOrient,edgeInteriorMap,edgeInteriorSign);
1535 for(k = 0; k < dofs[1][exp->GetGeom()->GetEid(j)]; ++k)
1538 graphVertOffset[graph[1][meshEdgeId]]+k;
1540 for(k = dofs[1][exp->GetGeom()->GetEid(j)]; k < nEdgeInteriorCoeffs; ++k)
1543 graphVertOffset[graph[1][meshEdgeId]];
1549 for(k = 0; k < dofs[1][exp->GetGeom()->GetEid(j)]; ++k)
1553 for(k = dofs[1][exp->GetGeom()->GetEid(j)]; k < nEdgeInteriorCoeffs; ++k)
1560 for(j = 0; j < exp->GetNfaces(); ++j)
1562 nFaceInteriorCoeffs = exp->GetFaceIntNcoeffs(j);
1563 faceOrient = exp->GetGeom()->GetForient(j);
1564 meshFaceId = exp->GetGeom()->GetFid(j);
1566 pIt = periodicFaces.find(meshFaceId);
1568 if (pIt != periodicFaces.end() &&
1569 meshFaceId == min(meshFaceId, pIt->second[0].id))
1574 exp->GetFaceInteriorMap(j,faceOrient,faceInteriorMap,faceInteriorSign);
1577 for(k = 0; k < dofs[2][exp->GetGeom()->GetFid(j)]; ++k)
1580 graphVertOffset[graph[2][meshFaceId]]+k;
1582 for(k = dofs[2][exp->GetGeom()->GetFid(j)]; k < nFaceInteriorCoeffs; ++k)
1585 graphVertOffset[graph[2][meshFaceId]];
1590 for(k = 0; k < dofs[2][exp->GetGeom()->GetFid(j)]; ++k)
1594 for(k = dofs[2][exp->GetGeom()->GetFid(j)]; k < nFaceInteriorCoeffs; ++k)
1606 for(i = 0; i < bndCondExp.num_elements(); i++)
1608 set<int> foundExtraVerts, foundExtraEdges;
1609 for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
1611 bndExp = bndCondExp[i]->GetExp(j);
1612 cnt = offset + bndCondExp[i]->GetCoeff_Offset(j);
1613 for(k = 0; k < bndExp->GetNverts(); k++)
1615 meshVertId = bndExp->GetGeom()->GetVid(k);
1616 m_bndCondCoeffsToGlobalCoeffsMap[cnt+bndExp->GetVertexMap(k)] = graphVertOffset[graph[0][meshVertId]];
1618 if (bndConditions[i]->GetBoundaryConditionType() !=
1625 if (iter != extraDirVerts.end() &&
1626 foundExtraVerts.count(meshVertId) == 0)
1628 int loc = bndCondExp[i]->GetCoeff_Offset(j) +
1629 bndExp->GetVertexMap(k);
1630 int gid = graphVertOffset[
1631 graph[0][meshVertId]];
1634 foundExtraVerts.insert(meshVertId);
1638 for(k = 0; k < bndExp->GetNedges(); k++)
1640 nEdgeInteriorCoeffs = bndExp->GetEdgeNcoeffs(k)-2;
1641 edgeOrient = bndExp->GetGeom()->GetEorient(k);
1642 meshEdgeId = bndExp->GetGeom()->GetEid(k);
1644 pIt = periodicEdges.find(meshEdgeId);
1649 if (pIt != periodicEdges.end())
1651 pair<int, StdRegions::Orientation> idOrient =
1653 meshEdgeId, edgeOrient, pIt->second);
1654 edgeOrient = idOrient.second;
1657 bndExp->GetEdgeInteriorMap(
1658 k,edgeOrient,edgeInteriorMap,edgeInteriorSign);
1660 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1662 m_bndCondCoeffsToGlobalCoeffsMap[cnt+edgeInteriorMap[l]] =
1663 graphVertOffset[graph[1][meshEdgeId]]+l;
1669 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1675 if (bndConditions[i]->GetBoundaryConditionType() !=
1682 if (iter != extraDirEdges.end() &&
1683 foundExtraEdges.count(meshEdgeId) == 0 &&
1684 nEdgeInteriorCoeffs > 0)
1686 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1688 int loc = bndCondExp[i]->GetCoeff_Offset(j) +
1690 int gid = graphVertOffset[
1691 graph[1][meshEdgeId]]+l;
1695 foundExtraEdges.insert(meshEdgeId);
1699 meshFaceId = bndExp->GetGeom()->GetGlobalID();
1701 for(k = 0; k < bndExp->GetNcoeffs(); k++)
1703 if(m_bndCondCoeffsToGlobalCoeffsMap[cnt+k] == -1)
1705 m_bndCondCoeffsToGlobalCoeffsMap[cnt+k] =
1706 graphVertOffset[graph[bndExp->GetNumBases()][meshFaceId]]+intDofCnt;
1711 offset += bndCondExp[i]->GetNcoeffs();
1751 map<int, vector<ExtraDirDof> >
::iterator Tit;
1756 for (i = 0; i < Tit->second.size(); ++i)
1758 valence[Tit->second[i].get<1>()] = 1.0;
1767 for (i = 0; i < Tit->second.size(); ++i)
1769 boost::get<2>(Tit->second.at(i)) /= valence[Tit->second.at(i).get<1>()];
1783 dofs[0].size() + dofs[1].size() + dofs[2].size()
1784 - firstNonDirGraphVertId);
1786 for (i = 0; i < locExpVector.size(); ++i)
1790 for (j = 0; j < exp->GetNverts(); ++j)
1792 meshVertId = exp->GetGeom()->GetVid(j);
1794 if (graph[0][meshVertId] >= firstNonDirGraphVertId)
1796 vwgts_perm[graph[0][meshVertId] -
1797 firstNonDirGraphVertId] =
1798 dofs[0][meshVertId];
1802 for (j = 0; j < exp->GetNedges(); ++j)
1804 meshEdgeId = exp->GetGeom()->GetEid(j);
1806 if (graph[1][meshEdgeId] >= firstNonDirGraphVertId)
1808 vwgts_perm[graph[1][meshEdgeId] -
1809 firstNonDirGraphVertId] =
1810 dofs[1][meshEdgeId];
1814 for (j = 0; j < exp->GetNfaces(); ++j)
1816 meshFaceId = exp->GetGeom()->GetFid(j);
1818 if (graph[2][meshFaceId] >= firstNonDirGraphVertId)
1820 vwgts_perm[graph[2][meshFaceId] -
1821 firstNonDirGraphVertId] =
1822 dofs[2][meshFaceId];
1827 bottomUpGraph->ExpandGraphWithVertexWeights(vwgts_perm);
1876 const vector<PeriodicEntity> &periodicEdges)
1878 int minId = periodicEdges[0].id;
1882 for (k = 1; k < periodicEdges.size(); ++k)
1884 if (periodicEdges[k].
id < minId)
1886 minId = min(minId, periodicEdges[k].
id);
1891 minId = min(minId, meshEdgeId);
1893 if (meshEdgeId != minId)
1903 return make_pair(minId, edgeOrient);
1929 int tmp1 = (int)faceOrient - 5;
1930 int tmp2 = (int)perFaceOrient - 5;
1932 int flipDir1Map [8] = {2,3,0,1,6,7,4,5};
1933 int flipDir2Map [8] = {1,0,3,2,5,4,7,6};
1934 int transposeMap[8] = {4,5,6,7,0,2,1,3};
1939 tmp1 = transposeMap[tmp1];
1943 if (tmp2 == 2 || tmp2 == 3 || tmp2 == 6 || tmp2 == 7)
1945 tmp1 = flipDir1Map[tmp1];
1951 tmp1 = flipDir2Map[tmp1];
1985 int maxBndGlobalId = 0;
1993 PeriodicMap::const_iterator pIt;
2004 for(i = 0; i < locExpVector.size(); ++i)
2006 exp = locExpVector[i];
2007 nVert += exp->GetNverts();
2008 nEdge += exp->GetNedges();
2009 nFace += exp->GetNfaces();
2011 for(j = 0; j < exp->GetNedges(); ++j)
2013 dof = exp->GetEdgeNcoeffs(j)-2;
2014 maxEdgeDof = (dof > maxEdgeDof ? dof : maxEdgeDof);
2016 for(j = 0; j < exp->GetNfaces(); ++j)
2018 dof = exp->GetFaceIntNcoeffs(j);
2019 maxFaceDof = (dof > maxFaceDof ? dof : maxFaceDof);
2021 exp->GetInteriorMap(interiorMap);
2022 dof = interiorMap.num_elements();
2023 maxIntDof = (dof > maxIntDof ? dof : maxIntDof);
2035 for(i = 0; i < locExpVector.size(); ++i)
2037 exp = locExpVector[i];
2041 for(j = 0; j < exp->GetNverts(); ++j)
2043 meshVertId = exp->GetGeom()->GetVid(j);
2046 pIt = perVerts.find(meshVertId);
2047 if (pIt != perVerts.end())
2049 for (k = 0; k < pIt->second.size(); ++k)
2051 meshVertId = min(meshVertId, pIt->second[k].id);
2057 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2061 for(j = 0; j < exp->GetNedges(); ++j)
2063 meshEdgeId = exp->GetGeom()->GetEid(j);
2064 pIt = perEdges.find(meshEdgeId);
2065 edgeOrient = exp->GetGeom()->GetEorient(j);
2067 if (pIt != perEdges.end())
2069 pair<int, StdRegions::Orientation> idOrient =
2071 meshEdgeId, edgeOrient, pIt->second);
2072 meshEdgeId = idOrient.first;
2073 edgeOrient = idOrient.second;
2076 exp->GetEdgeInteriorMap(j,edgeOrient,edgeInteriorMap,edgeInteriorSign);
2077 dof = exp->GetEdgeNcoeffs(j)-2;
2081 for(k = dof-1; k >= 0; --k)
2085 = nVert + meshEdgeId * maxEdgeDof + k + 1;
2087 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2092 for(j = 0; j < exp->GetNfaces(); ++j)
2094 faceOrient = exp->GetGeom()->GetForient(j);
2096 meshFaceId = exp->GetGeom()->GetFid(j);
2098 pIt = perFaces.find(meshFaceId);
2099 if (pIt != perFaces.end())
2101 if(meshFaceId == min(meshFaceId, pIt->second[0].id))
2105 meshFaceId = min(meshFaceId, pIt->second[0].id);
2109 exp->GetFaceInteriorMap(j,faceOrient,faceInteriorMap,faceInteriorSign);
2110 dof = exp->GetFaceIntNcoeffs(j);
2113 for(k = dof-1; k >= 0; --k)
2117 = nVert + nEdge*maxEdgeDof + meshFaceId * maxFaceDof
2121 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2126 exp->GetInteriorMap(interiorMap);
2127 dof = interiorMap.num_elements();
2128 elementId = (exp->GetGeom())->GetGlobalID();
2129 for (k = 0; k < dof; ++k)
2133 = nVert + nEdge*maxEdgeDof + nFace*maxFaceDof + elementId*maxIntDof + k + 1;
2154 m_globalToUniversalMapUnique[i] = (tmp[i] >= 0 ? 1 : 0);
2158 m_globalToUniversalBndMapUnique[i] = (tmp2[i] >= 0 ? 1 : 0);
2177 const boost::shared_ptr<LocalRegions::ExpansionVector> exp
2179 int nelmts = exp->size();
2184 returnval->m_solnType = solnType;
2185 returnval->m_preconType =
eNull;
2186 returnval->m_maxStaticCondLevel = 0;
2187 returnval->m_signChange =
false;
2188 returnval->m_comm =
m_comm;
2191 for (i = 0; i < nelmts; ++i)
2193 nverts += (*exp)[i]->GetNverts();
2196 returnval->m_numLocalCoeffs = nverts;
2207 for (i = 0; i < nelmts; ++i)
2209 for (j = 0; j < (*exp)[i]->GetNverts(); ++j)
2211 returnval->m_localToGlobalMap[cnt] =
2212 returnval->m_localToGlobalBndMap[cnt] =
2214 GlobCoeffs[returnval->m_localToGlobalMap[cnt]] = 1;
2217 if ((returnval->m_localToGlobalMap[cnt]) <
2220 returnval->m_numLocalDirBndCoeffs++;
2224 cnt1 += (*exp)[i]->GetNcoeffs();
2231 if (GlobCoeffs[i] != -1)
2233 GlobCoeffs[i] = cnt++;
2238 returnval->m_numGlobalCoeffs = cnt;
2243 if (GlobCoeffs[i] != -1)
2245 returnval->m_numGlobalDirBndCoeffs++;
2254 int nglocoeffs = returnval->m_numGlobalCoeffs;
2255 returnval->m_globalToUniversalMap
2257 returnval->m_globalToUniversalMapUnique
2261 for (i = 0; i < nverts; ++i)
2263 cnt = returnval->m_localToGlobalMap[i];
2264 returnval->m_localToGlobalMap[i] = GlobCoeffs[cnt];
2266 returnval->m_globalToUniversalMap[GlobCoeffs[cnt]] =
2272 for (
unsigned int i = 0; i < nglocoeffs; ++i)
2274 tmp[i] = returnval->m_globalToUniversalMap[i];
2276 returnval->m_gsh =
Gs::Init(tmp, vCommRow);
2278 for (
unsigned int i = 0; i < nglocoeffs; ++i)
2280 returnval->m_globalToUniversalMapUnique[i]
2281 = (tmp[i] >= 0 ? 1 : 0);
2286 for (i = 0; i < nverts; ++i)
2288 cnt = returnval->m_localToGlobalMap[i];
2289 returnval->m_localToGlobalMap[i] = GlobCoeffs[cnt];
2322 for(j = 0; j < locSize; j++)
2337 bwidth = (bwidth>(maxId-minId))?bwidth:(maxId-minId);
2402 if(global.data() == loc.data())
2437 if(global.data() == loc.data())
2469 if(global.data() == loc.data())
#define ASSERTL0(condition, msg)
bool m_systemSingular
Flag indicating if the system is singular or not.
bool m_signChange
Flag indicating if modes require sign reversal.
AssemblyMapCG(const LibUtilities::SessionReaderSharedPtr &pSession, const std::string variable="DefaultVar")
Default constructor.
virtual void v_LocalToGlobal(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
void MultiLevelBisectionReordering(const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm, BottomUpSubStructuredGraphSharedPtr &substructgraph, std::set< int > partVerts, int mdswitch)
LibUtilities::CommSharedPtr m_comm
Communicator.
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.
int m_maxStaticCondLevel
Maximum static condensation level.
void Gathr(int n, const T *x, const int *y, T *z)
Gather vector z[i] = x[y[i]].
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
std::map< int, vector< PeriodicEntity > > PeriodicMap
static void Finalise(gs_data *pGsh)
Deallocates the GSLib mapping data.
boost::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
virtual int v_GetNumNonDirEdgeModes() const
Array< OneD, int > m_globalToUniversalMapUnique
Integer map of unique process coeffs to universal space (signed)
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Array< OneD, int > m_extraDirEdges
Extra dirichlet edges in parallel.
void SetUpUniversalC0ContMap(const ExpList &locExp, const PeriodicMap &perVerts=NullPeriodicMap, const PeriodicMap &perEdges=NullPeriodicMap, const PeriodicMap &perFaces=NullPeriodicMap)
virtual int v_GetNumNonDirFaceModes() const
static gs_data * Init(const Nektar::Array< OneD, long > pId, const LibUtilities::CommSharedPtr &pComm)
Initialise Gather-Scatter map.
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
int m_numNonDirVertexModes
Number of non Dirichlet vertex modes.
Principle Modified Functions .
boost::shared_ptr< BottomUpSubStructuredGraph > BottomUpSubStructuredGraphSharedPtr
int CreateGraph(const ExpList &locExp, const BndCondExp &bndCondExp, const Array< OneD, const BndCond > &bndConditions, const bool checkIfSystemSingular, const PeriodicMap &periodicVerts, const PeriodicMap &periodicEdges, const PeriodicMap &periodicFaces, DofGraph &graph, BottomUpSubStructuredGraphSharedPtr &bottomUpGraph, set< int > &extraDirVerts, set< int > &extraDirEdges, int &firstNonDirGraphVertId, int &nExtraDirichlet, int mdswitch=1)
Array< OneD, int > m_globalToUniversalMap
Integer map of process coeffs to universal space.
int m_numNonDirEdges
Number of Dirichlet edges.
int m_numLocalCoeffs
Total number of local coefficients.
vector< map< int, int > > DofGraph
void CuthillMckeeReordering(const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm)
int m_numLocalBndCondCoeffs
Number of local boundary condition coefficients.
virtual void v_Assemble(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
virtual void v_GlobalToLocal(const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
int Imax(int n, const T *x, const int incx)
Return the index of the maximum element in x.
void CalculateFullSystemBandWidth()
Calculate the bandwith of the full matrix system.
std::vector< ExpansionSharedPtr > ExpansionVector
Array< OneD, int > m_localToGlobalMap
Integer map of local coeffs to global space.
virtual const Array< OneD, const int > & v_GetLocalToGlobalMap()
AssemblyMapSharedPtr m_nextLevelLocalToGlobalMap
Map from the patches of the previous level to the patches of the current level.
Base class for constructing local to global mapping of degrees of freedom.
const char *const GlobalSysSolnTypeMap[]
int m_numNonDirFaceModes
Number of non Dirichlet face modes.
size_t m_hash
Hash for map.
void UniversalAssemble(Array< OneD, NekDouble > &pGlobal) const
Base class for all multi-elemental spectral/hp expansions.
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
map< int, vector< ExtraDirDof > > m_extraDirDofs
Map indicating degrees of freedom which are Dirichlet but whose value is stored on another processor...
Array< OneD, unsigned int > m_numLocalBndCoeffsPerPatch
The number of bnd dofs per patch.
virtual int v_GetNumDirFaces() const
GlobalSysSolnType m_solnType
The solution type of the global system.
Array< OneD, NekDouble > m_bndCondCoeffsToGlobalCoeffsSign
Integer map of bnd cond coeffs to global coefficients.
boost::tuple< int, int, NekDouble > ExtraDirDof
virtual AssemblyMapSharedPtr v_LinearSpaceMap(const ExpList &locexp, GlobalSysSolnType solnType)
Construct an AssemblyMapCG object which corresponds to the linear space of the current object...
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Principle Modified Functions .
StdRegions::Orientation DeterminePeriodicFaceOrient(StdRegions::Orientation faceOrient, StdRegions::Orientation perFaceOrient)
Determine relative orientation between two faces.
void GlobalToLocal(const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const
int m_numDirFaces
Number of Dirichlet faces.
virtual int v_GetNumDirEdges() const
void Scatr(int n, const T *x, const int *y, T *z)
Scatter vector z[y[i]] = x[i].
static void Unique(const Nektar::Array< OneD, long > pId, const LibUtilities::CommSharedPtr &pComm)
Updates pId to negate all-but-one references to each universal ID.
virtual int v_GetNumNonDirFaces() const
void Assmb(int n, const T *x, const int *y, T *z)
Assemble z[y[i]] += x[i]; z should be zero'd first.
pair< int, StdRegions::Orientation > DeterminePeriodicEdgeOrientId(int meshEdgeId, StdRegions::Orientation edgeOrient, const vector< PeriodicEntity > &periodicEdges)
Determine orientation of an edge to its periodic equivalents, as well as the ID of the representative...
boost::shared_ptr< Expansion > ExpansionSharedPtr
void LocalToGlobal(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
virtual int v_GetFullSystemBandWidth() const
Array< OneD, unsigned int > m_numLocalIntCoeffsPerPatch
The number of int dofs per patch.
virtual void v_UniversalAssemble(Array< OneD, NekDouble > &pGlobal) const
int m_lowestStaticCondLevel
Lowest static condensation level.
void CalculateBndSystemBandWidth()
Calculates the bandwidth of the boundary system.
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
No Solution type specified.
virtual const Array< OneD, const int > & v_GetExtraDirEdges()
Array< OneD, int > m_bndCondCoeffsToGlobalCoeffsMap
Integer map of bnd cond coeffs to global coefficients.
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
int m_numLocalBndCoeffs
Number of local boundary coefficients.
int m_numDirEdges
Number of Dirichlet edges.
int m_staticCondLevel
The level of recursion in the case of multi-level static condensation.
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
SpatialDomains::GeometrySharedPtr GetGeom() const
Array< OneD, NekDouble > m_localToGlobalSign
Integer sign of local coeffs to global space.
int GetOffset_Elmt_Id(int n) const
Get the element id associated with the n th consecutive block of data in m_phys and m_coeffs...
int m_numNonDirEdgeModes
Number of non Dirichlet edge modes.
virtual int v_GetNumNonDirVertexModes() const
LibUtilities::SessionReaderSharedPtr m_session
Session object.
Array< OneD, int > m_globalToUniversalBndMap
Integer map of process coeffs to universal space.
Array< OneD, int > m_globalToUniversalBndMapUnique
Integer map of unique process coeffs to universal space (signed)
virtual ~AssemblyMapCG()
Destructor.
void UniversalAssembleBnd(Array< OneD, NekDouble > &pGlobal) const
int m_numGlobalCoeffs
Total number of global coefficients.
int m_numNonDirFaces
Number of Dirichlet faces.
virtual const Array< OneD, NekDouble > & v_GetLocalToGlobalSign() const
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMapUnique()
T Vsum(int n, const T *x, const int incx)
Subtract return sum(x)
void Zero(int n, T *x, const int incx)
Zero vector.
virtual int v_GetNumNonDirEdges() const
boost::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMap()
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
int m_fullSystemBandWidth
Bandwith of the full matrix system (no static condensation).
void Assemble(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
Array< OneD, DataType > & GetPtr()
int m_numPatches
The number of patches (~elements) in the current level.
void NoReordering(const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm)