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>
53 namespace MultiRegions
71 AssemblyMapCG::AssemblyMapCG(
73 const std::string variable):
76 pSession->LoadParameter(
84 const bool checkIfSystemSingular,
90 set<int> &extraDirVerts,
91 set<int> &extraDirEdges,
92 int &firstNonDirGraphVertId,
99 int meshVertId, meshEdgeId, meshFaceId;
100 int meshVertId2, meshEdgeId2;
106 PeriodicMap::const_iterator pIt;
111 for(i = 0; i < bndCondExp.num_elements(); i++)
115 for(k = 0; k < bndConditions.num_elements(); ++k)
117 if (bndConditions[k][i]->GetBoundaryConditionType() ==
122 if (bndConditions[k][i]->GetBoundaryConditionType() !=
131 for (j = 0; j < bndCondExp[i]->GetNumElmts(); ++j)
134 for (k = 0; k < bndExp->GetNverts(); ++k)
136 if (vMaxVertId < bndExp->GetGeom()->GetVid(k))
138 vMaxVertId = bndExp->
GetGeom()->GetVid(k);
145 if(cnt == bndConditions.num_elements())
147 for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
149 bndExp = bndCondExp[i]->GetExp(j);
151 for (k = 0; k < bndExp->GetNverts(); k++)
153 meshVertId = bndExp->GetGeom()->GetVid(k);
154 if (graph[0].count(meshVertId) == 0)
156 graph[0][meshVertId] = graphVertId++;
160 for (k = 0; k < bndExp->GetNedges(); k++)
162 meshEdgeId = bndExp->GetGeom()->GetEid(k);
163 if (graph[1].count(meshEdgeId) == 0)
165 graph[1][meshEdgeId] = graphVertId++;
170 meshFaceId = bndExp->GetGeom()->GetGlobalID();
171 const int bndDim = bndExp->GetNumBases();
172 if (graph[bndDim].count(meshFaceId) == 0)
174 graph[bndDim][meshFaceId] = graphVertId++;
209 int n = vComm->GetSize();
210 int p = vComm->GetRank();
219 vertcounts[p] = graph[0].size();
220 edgecounts[p] = graph[1].size();
224 for (i = 1; i < n; ++i)
226 vertoffsets[i] = vertoffsets[i-1] + vertcounts[i-1];
227 edgeoffsets[i] = edgeoffsets[i-1] + edgecounts[i-1];
238 for (it = graph[0].begin(), i = 0;
239 it != graph[0].end();
242 vertlist[vertoffsets[p] + i] = it->first;
246 for (it = graph[1].begin(), i = 0;
247 it != graph[1].end();
250 edgelist[edgeoffsets[p] + i] = it->first;
258 map<int, int> extraDirVertIds, extraDirEdgeIds;
268 for (i = 0; i < n; ++i)
275 for(j = 0; j < locExpVector.size(); j++)
279 for(k = 0; k < exp->GetNverts(); k++)
281 meshVertId = exp->GetGeom()->GetVid(k);
282 if(graph[0].count(meshVertId) == 0)
284 for (l = 0; l < vertcounts[i]; ++l)
286 if (vertlist[vertoffsets[i]+l] == meshVertId)
288 extraDirVertIds[meshVertId] = i;
289 graph[0][meshVertId] = graphVertId++;
296 for(k = 0; k < exp->GetNedges(); k++)
298 meshEdgeId = exp->GetGeom()->GetEid(k);
299 if(graph[1].count(meshEdgeId) == 0)
301 for (l = 0; l < edgecounts[i]; ++l)
303 if (edgelist[edgeoffsets[i]+l] == meshEdgeId)
305 extraDirEdgeIds[meshEdgeId] = i;
306 graph[1][meshEdgeId] = graphVertId++;
307 nExtraDirichlet += exp->GetEdgeNcoeffs(k)-2;
317 map<int, int>::const_iterator mapConstIt;
319 for (mapConstIt = extraDirEdgeIds.begin(), i = 0;
320 mapConstIt != extraDirEdgeIds.end(); mapConstIt++)
322 meshEdgeId = mapConstIt->first;
332 for (i = 0; i < n; ++i)
340 vertcounts[p] = extraDirVertIds.size();
341 edgecounts[p] = extraDirEdgeIds.size();
347 vertoffsets[0] = edgeoffsets[0] = 0;
349 for (i = 1; i < n; ++i)
351 vertoffsets[i] = vertoffsets[i-1] + vertcounts[i-1];
352 edgeoffsets[i] = edgeoffsets[i-1] + edgecounts[i-1];
360 for (it = extraDirVertIds.begin(), i = 0;
361 it != extraDirVertIds.end(); ++it, ++i)
363 vertids [vertoffsets[p]+i] = it->first;
364 vertprocs[vertoffsets[p]+i] = it->second;
367 for (it = extraDirEdgeIds.begin(), i = 0;
368 it != extraDirEdgeIds.end(); ++it, ++i)
370 edgeids [edgeoffsets[p]+i] = it->first;
371 edgeprocs[edgeoffsets[p]+i] = it->second;
381 for (i = 0; i < nTotVerts; ++i)
383 if (vComm->GetRank() == vertprocs[i])
385 extraDirVerts.insert(vertids[i]);
390 for (i = 0; i < nTotEdges; ++i)
392 if (vComm->GetRank() == edgeprocs[i])
394 extraDirEdges.insert(edgeids[i]);
405 bcminvertid[p] = vMaxVertId;
420 if (
m_session->DefinesParameter(
"SingularVertex"))
422 m_session->LoadParameter(
"SingularVertex", meshVertId);
424 else if (vMaxVertId == -1)
427 meshVertId = locExpVector[0]->GetGeom()->GetVid(0);
433 meshVertId = bcminvertid[p];
436 if (graph[0].count(meshVertId) == 0)
438 graph[0][meshVertId] = graphVertId++;
454 for (i = 0; i < locExpVector.size(); ++i)
456 for (j = 0; j < locExpVector[i]->GetNverts(); ++j)
458 if (locExpVector[i]->GetGeom()->GetVid(j) !=
464 if (graph[0].count(meshVertId) == 0)
466 graph[0][meshVertId] =
482 if (graph[0].count(meshVertId) == 0)
488 gId = graph[0][meshVertId];
491 for (pIt = periodicVerts.begin();
492 pIt != periodicVerts.end(); ++pIt)
499 if (pIt->first == meshVertId)
501 graph[0][meshVertId] = gId < 0 ? graphVertId++ : gId;
503 for (i = 0; i < pIt->second.size(); ++i)
505 if (pIt->second[i].isLocal)
507 graph[0][pIt->second[i].id] = graph[0][meshVertId];
514 for (i = 0; i < pIt->second.size(); ++i)
516 if (pIt->second[i].id == meshVertId)
525 graph[0][pIt->first] = gId < 0 ? graphVertId++ : gId;
527 for (i = 0; i < pIt->second.size(); ++i)
529 if (pIt->second[i].isLocal)
531 graph[0][pIt->second[i].id] = graph[0][pIt->first];
541 firstNonDirGraphVertId = graphVertId;
543 typedef boost::adjacency_list<
544 boost::setS, boost::vecS, boost::undirectedS> BoostGraph;
545 BoostGraph boostGraphObj;
547 vector<map<int,int> > tempGraph(3);
548 map<int, int> vwgts_map;
553 int tempGraphVertId = 0;
554 int localVertOffset = 0;
555 int localEdgeOffset = 0;
556 int localFaceOffset = 0;
574 map<int,int> EdgeSize;
575 map<int,int> FaceSize;
578 for(i = 0; i < locExpVector.size(); ++i)
581 nTotalVerts += exp->GetNverts();
582 nTotalEdges += exp->GetNedges();
583 nTotalFaces += exp->GetNfaces();
585 nEdges = exp->GetNedges();
586 for(j = 0; j < nEdges; ++j)
588 meshEdgeId = exp->GetGeom()->GetEid(j);
589 if (EdgeSize.count(meshEdgeId) > 0)
591 EdgeSize[meshEdgeId] =
592 min(EdgeSize[meshEdgeId],
593 exp->GetEdgeNcoeffs(j) - 2);
597 EdgeSize[meshEdgeId] = exp->GetEdgeNcoeffs(j) - 2;
601 nFaces = exp->GetNfaces();
603 for(j = 0; j < nFaces; ++j)
605 meshFaceId = exp->GetGeom()->GetFid(j);
606 if (FaceSize.count(meshFaceId) > 0)
608 FaceSize[meshFaceId] =
609 min(FaceSize[meshFaceId],
610 exp->GetFaceIntNcoeffs(j));
614 FaceSize[meshFaceId] = exp->GetFaceIntNcoeffs(j);
616 FaceSize[meshFaceId] = exp->GetFaceIntNcoeffs(j);
621 for (pIt = periodicVerts.begin(); pIt != periodicVerts.end(); ++pIt)
623 meshVertId = pIt->first;
626 if (graph[0].count(pIt->first) != 0)
628 for (i = 0; i < pIt->second.size(); ++i)
630 meshVertId2 = pIt->second[i].id;
631 if (graph[0].count(meshVertId2) == 0 &&
632 pIt->second[i].isLocal)
634 graph[0][meshVertId2] =
635 graph[0][meshVertId];
642 bool isDirichlet =
false;
643 for (i = 0; i < pIt->second.size(); ++i)
645 if (!pIt->second[i].isLocal)
650 meshVertId2 = pIt->second[i].id;
651 if (graph[0].count(meshVertId2) > 0)
660 graph[0][meshVertId] =
661 graph[0][pIt->second[i].id];
663 for (j = 0; j < pIt->second.size(); ++j)
665 meshVertId2 = pIt->second[i].id;
666 if (j == i || !pIt->second[j].isLocal ||
667 graph[0].count(meshVertId2) > 0)
672 graph[0][meshVertId2] =
673 graph[0][pIt->second[i].id];
680 for (i = 0; i < pIt->second.size(); ++i)
682 if (!pIt->second[i].isLocal)
687 if (tempGraph[0].count(pIt->second[i].id) > 0)
693 if (i == pIt->second.size())
695 boost::add_vertex(boostGraphObj);
696 tempGraph[0][meshVertId] = tempGraphVertId++;
701 tempGraph[0][meshVertId] = tempGraph[0][pIt->second[i].id];
712 for(i = 0; i < locExpVector.size(); ++i)
714 exp = locExpVector[i];
716 nVerts = exp->GetNverts();
717 for(j = 0; j < nVerts; ++j)
719 meshVertId = exp->GetGeom()->GetVid(j);
720 if(graph[0].count(meshVertId) == 0)
722 if(tempGraph[0].count(meshVertId) == 0)
724 boost::add_vertex(boostGraphObj);
725 tempGraph[0][meshVertId] = tempGraphVertId++;
728 localVerts[localVertOffset+vertCnt++] = tempGraph[0][meshVertId];
729 vwgts_map[ tempGraph[0][meshVertId] ] = 1;
733 localVertOffset+=nVerts;
737 for (pIt = periodicEdges.begin(); pIt != periodicEdges.end(); ++pIt)
739 meshEdgeId = pIt->first;
742 if (graph[1].count(pIt->first) != 0)
744 for (i = 0; i < pIt->second.size(); ++i)
746 meshEdgeId2 = pIt->second[i].id;
747 if (graph[1].count(meshEdgeId2) == 0 &&
748 pIt->second[i].isLocal)
750 graph[1][meshEdgeId2] =
751 graph[1][meshEdgeId];
758 bool isDirichlet =
false;
759 for (i = 0; i < pIt->second.size(); ++i)
761 if (!pIt->second[i].isLocal)
766 meshEdgeId2 = pIt->second[i].id;
767 if (graph[1].count(meshEdgeId2) > 0)
776 graph[1][meshEdgeId] =
777 graph[1][pIt->second[i].id];
779 for (j = 0; j < pIt->second.size(); ++j)
781 meshEdgeId2 = pIt->second[i].id;
782 if (j == i || !pIt->second[j].isLocal ||
783 graph[1].count(meshEdgeId2) > 0)
788 graph[1][meshEdgeId2] =
789 graph[1][pIt->second[i].id];
796 for (i = 0; i < pIt->second.size(); ++i)
798 if (!pIt->second[i].isLocal)
803 if (tempGraph[1].count(pIt->second[i].id) > 0)
809 if (i == pIt->second.size())
811 boost::add_vertex(boostGraphObj);
812 tempGraph[1][meshEdgeId] = tempGraphVertId++;
818 tempGraph[1][meshEdgeId] = tempGraph[1][pIt->second[i].id];
822 int nEdgeIntCoeffs, nFaceIntCoeffs;
825 for(i = 0; i < locExpVector.size(); ++i)
827 exp = locExpVector[i];
829 nEdges = exp->GetNedges();
831 for(j = 0; j < nEdges; ++j)
833 nEdgeIntCoeffs = exp->GetEdgeNcoeffs(j) - 2;
834 meshEdgeId = exp->GetGeom()->GetEid(j);
835 if(graph[1].count(meshEdgeId) == 0)
837 if(tempGraph[1].count(meshEdgeId) == 0)
839 boost::add_vertex(boostGraphObj);
840 tempGraph[1][meshEdgeId] = tempGraphVertId++;
845 localEdges[localEdgeOffset+edgeCnt++] = tempGraph[1][meshEdgeId];
846 vwgts_map[ tempGraph[1][meshEdgeId] ] = nEdgeIntCoeffs;
850 localEdgeOffset+=nEdges;
854 for (pIt = periodicFaces.begin(); pIt != periodicFaces.end(); ++pIt)
856 if (!pIt->second[0].isLocal)
859 meshFaceId = pIt->first;
860 ASSERTL0(graph[2].count(meshFaceId) == 0,
861 "This periodic boundary edge has been specified before");
862 boost::add_vertex(boostGraphObj);
863 tempGraph[2][meshFaceId] = tempGraphVertId++;
864 nFaceIntCoeffs = FaceSize[meshFaceId];
868 else if (pIt->first < pIt->second[0].id)
870 ASSERTL0(graph[2].count(pIt->first) == 0,
871 "This periodic boundary face has been specified before");
872 ASSERTL0(graph[2].count(pIt->second[0].id) == 0,
873 "This periodic boundary face has been specified before");
875 boost::add_vertex(boostGraphObj);
876 tempGraph[2][pIt->first] = tempGraphVertId;
877 tempGraph[2][pIt->second[0].id] = tempGraphVertId++;
878 nFaceIntCoeffs = FaceSize[pIt->first];
885 for(i = 0; i < locExpVector.size(); ++i)
887 exp = locExpVector[i];
888 nFaces = exp->GetNfaces();
890 for(j = 0; j < nFaces; ++j)
892 nFaceIntCoeffs = exp->GetFaceIntNcoeffs(j);
893 meshFaceId = exp->GetGeom()->GetFid(j);
894 if(graph[2].count(meshFaceId) == 0)
896 if(tempGraph[2].count(meshFaceId) == 0)
898 boost::add_vertex(boostGraphObj);
899 tempGraph[2][meshFaceId] = tempGraphVertId++;
904 localFaces[localFaceOffset+faceCnt++] = tempGraph[2][meshFaceId];
905 vwgts_map[ tempGraph[2][meshFaceId] ] = nFaceIntCoeffs;
910 localFaceOffset+=nFaces;
916 for(i = 0; i < locExpVector.size(); ++i)
918 exp = locExpVector[i];
919 nVerts = exp->GetNverts();
920 nEdges = exp->GetNedges();
921 nFaces = exp->GetNfaces();
928 for(j = 0; j < nVerts; j++)
930 if(localVerts[j+localVertOffset]==-1)
935 for(k = 0; k < nVerts; k++)
937 if(localVerts[k+localVertOffset]==-1)
943 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
944 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
948 for(k = 0; k < nEdges; k++)
950 if(localEdges[k+localEdgeOffset]==-1)
954 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
955 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
958 for(k = 0; k < nFaces; k++)
960 if(localFaces[k+localFaceOffset]==-1)
964 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
965 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
970 for(j = 0; j < nEdges; j++)
972 if(localEdges[j+localEdgeOffset]==-1)
977 for(k = 0; k < nEdges; k++)
979 if(localEdges[k+localEdgeOffset]==-1)
985 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
986 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
990 for(k = 0; k < nVerts; k++)
992 if(localVerts[k+localVertOffset]==-1)
996 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
997 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
1000 for(k = 0; k < nFaces; k++)
1002 if(localFaces[k+localFaceOffset]==-1)
1006 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
1007 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
1012 for(j = 0; j < nFaces; j++)
1014 if(localFaces[j+localFaceOffset]==-1)
1019 for(k = 0; k < nFaces; k++)
1021 if(localFaces[k+localFaceOffset]==-1)
1027 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1028 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
1032 for(k = 0; k < nVerts; k++)
1034 if(localVerts[k+localVertOffset]==-1)
1038 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1039 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
1042 for(k = 0; k < nEdges; k++)
1044 if(localEdges[k+localEdgeOffset]==-1)
1048 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1049 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
1053 localVertOffset+=nVerts;
1054 localEdgeOffset+=nEdges;
1055 localFaceOffset+=nFaces;
1065 vector<long> procVerts, procEdges, procFaces;
1066 set <int> foundVerts, foundEdges, foundFaces;
1071 for(i = cnt = 0; i < locExpVector.size(); ++i)
1074 exp = locExpVector[elmtid];
1075 for (j = 0; j < exp->GetNverts(); ++j)
1077 int vid = exp->GetGeom()->GetVid(j)+1;
1078 if (foundVerts.count(vid) == 0)
1080 procVerts.push_back(vid);
1081 foundVerts.insert(vid);
1085 for (j = 0; j < exp->GetNedges(); ++j)
1087 int eid = exp->GetGeom()->GetEid(j)+1;
1089 if (foundEdges.count(eid) == 0)
1091 procEdges.push_back(eid);
1092 foundEdges.insert(eid);
1096 for (j = 0; j < exp->GetNfaces(); ++j)
1098 int fid = exp->GetGeom()->GetFid(j)+1;
1100 if (foundFaces.count(fid) == 0)
1102 procFaces.push_back(fid);
1103 foundFaces.insert(fid);
1108 int unique_verts = foundVerts.size();
1109 int unique_edges = foundEdges.size();
1110 int unique_faces = foundFaces.size();
1124 if (unique_edges > 0)
1132 if (unique_faces > 0)
1142 for (i = 0; i < unique_verts; ++i)
1146 if (graph[0].count(procVerts[i]-1) == 0)
1148 partVerts.insert(tempGraph[0][procVerts[i]-1]);
1153 for (i = 0; i < unique_edges; ++i)
1157 if (graph[1].count(procEdges[i]-1) == 0)
1159 partVerts.insert(tempGraph[1][procEdges[i]-1]);
1164 for (i = 0; i < unique_faces; ++i)
1168 if (graph[2].count(procFaces[i]-1) == 0)
1170 partVerts.insert(tempGraph[2][procFaces[i]-1]);
1176 for (pIt = periodicVerts.begin(); pIt != periodicVerts.end(); ++pIt)
1178 if (graph[0].count(pIt->first) == 0)
1180 partVerts.insert(tempGraph[0][pIt->first]);
1183 for (pIt = periodicEdges.begin(); pIt != periodicEdges.end(); ++pIt)
1185 if (graph[1].count(pIt->first) == 0)
1187 partVerts.insert(tempGraph[1][pIt->first]);
1190 for (pIt = periodicFaces.begin(); pIt != periodicFaces.end(); ++pIt)
1192 if (graph[2].count(pIt->first) == 0)
1194 partVerts.insert(tempGraph[2][pIt->first]);
1199 int nGraphVerts = tempGraphVertId;
1203 ASSERTL1(vwgts_map.size()==nGraphVerts,
"Non matching dimensions");
1204 for(i = 0; i < nGraphVerts; ++i)
1206 vwgts[i] = vwgts_map[i];
1237 boostGraphObj, perm, iperm, bottomUpGraph,
1238 partVerts, mdswitch);
1244 "Unrecognised solution type: " + std::string(
1269 for(mapIt = tempGraph[0].begin(); mapIt != tempGraph[0].end(); mapIt++)
1271 graph[0][mapIt->first] = iperm[mapIt->second] + graphVertId;
1273 for(mapIt = tempGraph[1].begin(); mapIt != tempGraph[1].end(); mapIt++)
1275 graph[1][mapIt->first] = iperm[mapIt->second] + graphVertId;
1277 for(mapIt = tempGraph[2].begin(); mapIt != tempGraph[2].end(); mapIt++)
1279 graph[2][mapIt->first] = iperm[mapIt->second] + graphVertId;
1290 const int numLocalCoeffs,
1294 const bool checkIfSystemSingular,
1295 const std::string variable,
1304 int meshVertId, meshEdgeId, meshFaceId;
1306 int nEdgeInteriorCoeffs;
1307 int nFaceInteriorCoeffs;
1308 int firstNonDirGraphVertId;
1318 PeriodicMap::const_iterator pIt;
1328 set<int> extraDirVerts, extraDirEdges;
1333 for (i = 0; i < locExpVector.size(); ++i)
1335 exp = locExpVector[i];
1337 for(j = 0; j < locExpVector[i]->GetNverts(); ++j)
1339 dofs[0][exp->GetGeom()->GetVid(j)] = 1;
1342 for(j = 0; j < locExpVector[i]->GetNedges(); ++j)
1344 if (dofs[1].count(exp->GetGeom()->GetEid(j)) > 0)
1346 if (dofs[1][exp->GetGeom()->GetEid(j)] !=
1347 locExpVector[i]->GetEdgeNcoeffs(j)-2)
1351 "CG with variable order only available with modal expansion");
1353 dofs[1][exp->GetGeom()->GetEid(j)] =
1354 min(dofs[1][exp->GetGeom()->GetEid(j)],
1355 locExpVector[i]->GetEdgeNcoeffs(j)-2);
1359 dofs[1][exp->GetGeom()->GetEid(j)] =
1360 exp->GetEdgeNcoeffs(j) - 2;
1364 for(j = 0; j < locExpVector[i]->GetNfaces(); ++j)
1366 if (dofs[2].count(exp->GetGeom()->GetFid(j)) > 0)
1368 if (dofs[2][exp->GetGeom()->GetFid(j)] !=
1369 exp->GetFaceIntNcoeffs(j))
1372 "CG with variable order not available in 3D");
1374 dofs[2][exp->GetGeom()->GetFid(j)] =
1375 min(dofs[2][exp->GetGeom()->GetFid(j)],
1376 exp->GetFaceIntNcoeffs(j));
1380 dofs[2][exp->GetGeom()->GetFid(j)] =
1381 exp->GetFaceIntNcoeffs(j);
1391 for(dofIt = dofs[1].begin(), i=0; dofIt != dofs[1].end(); dofIt++, i++)
1393 edgeId[i] = dofIt->first;
1399 for (i=0; i < dofs[1].size(); i++)
1401 dofs[1][edgeId[i]] = (int) (edgeDof[i]+0.5);
1406 for(dofIt = dofs[2].begin(), i=0; dofIt != dofs[2].end(); dofIt++, i++)
1408 faceId[i] = dofIt->first;
1414 for (i=0; i < dofs[2].size(); i++)
1416 dofs[2][faceId[i]] = (int) (faceDof[i]+0.5);
1424 int nExtraDirichlet;
1427 checkIfSystemSingular, periodicVerts, periodicEdges,
1428 periodicFaces, graph, bottomUpGraph, extraDirVerts,
1429 extraDirEdges, firstNonDirGraphVertId,
1444 graph[0].size() + graph[1].size() + graph[2].size() + 1);
1446 graphVertOffset[0] = 0;
1448 for(i = 0; i < locExpVector.size(); ++i)
1452 for(j = 0; j < exp->GetNverts(); ++j)
1454 meshVertId = exp->GetGeom()->GetVid(j);
1455 graphVertOffset[graph[0][meshVertId]+1] = 1;
1458 for(j = 0; j < exp->GetNedges(); ++j)
1460 nEdgeInteriorCoeffs = exp->GetEdgeNcoeffs(j) - 2;
1461 meshEdgeId = exp->GetGeom()->GetEid(j);
1462 graphVertOffset[graph[1][meshEdgeId]+1]
1463 = dofs[1][meshEdgeId];
1465 bType = exp->GetEdgeBasisType(j);
1469 if(nEdgeInteriorCoeffs &&
1477 for(j = 0; j < exp->GetNfaces(); ++j)
1479 nFaceInteriorCoeffs = exp->GetFaceIntNcoeffs(j);
1480 meshFaceId = exp->GetGeom()->GetFid(j);
1481 graphVertOffset[graph[2][meshFaceId]+1] = dofs[2][meshFaceId];
1485 for(i = 1; i < graphVertOffset.num_elements(); i++)
1487 graphVertOffset[i] += graphVertOffset[i-1];
1512 m_numLocalIntCoeffsPerPatch[i] = (
unsigned int)
1529 for(i = 0; i < locExpVector.size(); ++i)
1531 exp = locExpVector[i];
1533 for(j = 0; j < exp->GetNverts(); ++j)
1535 meshVertId = exp->GetGeom()->GetVid(j);
1539 graphVertOffset[graph[0][meshVertId]];
1542 for(j = 0; j < exp->GetNedges(); ++j)
1544 nEdgeInteriorCoeffs = exp->GetEdgeNcoeffs(j)-2;
1545 edgeOrient = exp->GetGeom()->GetEorient(j);
1546 meshEdgeId = exp->GetGeom()->GetEid(j);
1548 pIt = periodicEdges.find(meshEdgeId);
1553 if (pIt != periodicEdges.end())
1555 pair<int, StdRegions::Orientation> idOrient =
1557 meshEdgeId, edgeOrient, pIt->second);
1558 edgeOrient = idOrient.second;
1561 exp->GetEdgeInteriorMap(j,edgeOrient,edgeInteriorMap,edgeInteriorSign);
1564 for(k = 0; k < dofs[1][exp->GetGeom()->GetEid(j)]; ++k)
1567 graphVertOffset[graph[1][meshEdgeId]]+k;
1569 for(k = dofs[1][exp->GetGeom()->GetEid(j)]; k < nEdgeInteriorCoeffs; ++k)
1572 graphVertOffset[graph[1][meshEdgeId]];
1578 for(k = 0; k < dofs[1][exp->GetGeom()->GetEid(j)]; ++k)
1582 for(k = dofs[1][exp->GetGeom()->GetEid(j)]; k < nEdgeInteriorCoeffs; ++k)
1589 for(j = 0; j < exp->GetNfaces(); ++j)
1591 nFaceInteriorCoeffs = exp->GetFaceIntNcoeffs(j);
1592 faceOrient = exp->GetGeom()->GetForient(j);
1593 meshFaceId = exp->GetGeom()->GetFid(j);
1595 pIt = periodicFaces.find(meshFaceId);
1597 if (pIt != periodicFaces.end() &&
1598 meshFaceId == min(meshFaceId, pIt->second[0].id))
1603 exp->GetFaceInteriorMap(j,faceOrient,faceInteriorMap,faceInteriorSign);
1606 for(k = 0; k < dofs[2][exp->GetGeom()->GetFid(j)]; ++k)
1609 graphVertOffset[graph[2][meshFaceId]]+k;
1611 for(k = dofs[2][exp->GetGeom()->GetFid(j)]; k < nFaceInteriorCoeffs; ++k)
1614 graphVertOffset[graph[2][meshFaceId]];
1619 for(k = 0; k < dofs[2][exp->GetGeom()->GetFid(j)]; ++k)
1623 for(k = dofs[2][exp->GetGeom()->GetFid(j)]; k < nFaceInteriorCoeffs; ++k)
1635 for(i = 0; i < bndCondExp.num_elements(); i++)
1637 set<int> foundExtraVerts, foundExtraEdges;
1638 for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
1640 bndExp = bndCondExp[i]->GetExp(j);
1641 cnt = offset + bndCondExp[i]->GetCoeff_Offset(j);
1642 for(k = 0; k < bndExp->GetNverts(); k++)
1644 meshVertId = bndExp->GetGeom()->GetVid(k);
1645 m_bndCondCoeffsToGlobalCoeffsMap[cnt+bndExp->GetVertexMap(k)] = graphVertOffset[graph[0][meshVertId]];
1647 if (bndConditions[i]->GetBoundaryConditionType() !=
1654 if (iter != extraDirVerts.end() &&
1655 foundExtraVerts.count(meshVertId) == 0)
1657 int loc = bndCondExp[i]->GetCoeff_Offset(j) +
1658 bndExp->GetVertexMap(k);
1659 int gid = graphVertOffset[
1660 graph[0][meshVertId]];
1663 foundExtraVerts.insert(meshVertId);
1667 for(k = 0; k < bndExp->GetNedges(); k++)
1669 nEdgeInteriorCoeffs = bndExp->GetEdgeNcoeffs(k)-2;
1670 edgeOrient = bndExp->GetGeom()->GetEorient(k);
1671 meshEdgeId = bndExp->GetGeom()->GetEid(k);
1673 pIt = periodicEdges.find(meshEdgeId);
1678 if (pIt != periodicEdges.end())
1680 pair<int, StdRegions::Orientation> idOrient =
1682 meshEdgeId, edgeOrient, pIt->second);
1683 edgeOrient = idOrient.second;
1686 bndExp->GetEdgeInteriorMap(
1687 k,edgeOrient,edgeInteriorMap,edgeInteriorSign);
1689 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1691 m_bndCondCoeffsToGlobalCoeffsMap[cnt+edgeInteriorMap[l]] =
1692 graphVertOffset[graph[1][meshEdgeId]]+l;
1698 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1704 if (bndConditions[i]->GetBoundaryConditionType() !=
1711 if (iter != extraDirEdges.end() &&
1712 foundExtraEdges.count(meshEdgeId) == 0 &&
1713 nEdgeInteriorCoeffs > 0)
1715 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1717 int loc = bndCondExp[i]->GetCoeff_Offset(j) +
1719 int gid = graphVertOffset[
1720 graph[1][meshEdgeId]]+l;
1724 foundExtraEdges.insert(meshEdgeId);
1728 meshFaceId = bndExp->GetGeom()->GetGlobalID();
1730 for(k = 0; k < bndExp->GetNcoeffs(); k++)
1732 if(m_bndCondCoeffsToGlobalCoeffsMap[cnt+k] == -1)
1734 m_bndCondCoeffsToGlobalCoeffsMap[cnt+k] =
1735 graphVertOffset[graph[bndExp->GetNumBases()][meshFaceId]]+intDofCnt;
1740 offset += bndCondExp[i]->GetNcoeffs();
1780 map<int, vector<ExtraDirDof> >
::iterator Tit;
1785 for (i = 0; i < Tit->second.size(); ++i)
1787 valence[Tit->second[i].get<1>()] = 1.0;
1796 for (i = 0; i < Tit->second.size(); ++i)
1798 boost::get<2>(Tit->second.at(i)) /= valence[Tit->second.at(i).get<1>()];
1812 dofs[0].size() + dofs[1].size() + dofs[2].size()
1813 - firstNonDirGraphVertId);
1815 for (i = 0; i < locExpVector.size(); ++i)
1819 for (j = 0; j < exp->GetNverts(); ++j)
1821 meshVertId = exp->GetGeom()->GetVid(j);
1823 if (graph[0][meshVertId] >= firstNonDirGraphVertId)
1825 vwgts_perm[graph[0][meshVertId] -
1826 firstNonDirGraphVertId] =
1827 dofs[0][meshVertId];
1831 for (j = 0; j < exp->GetNedges(); ++j)
1833 meshEdgeId = exp->GetGeom()->GetEid(j);
1835 if (graph[1][meshEdgeId] >= firstNonDirGraphVertId)
1837 vwgts_perm[graph[1][meshEdgeId] -
1838 firstNonDirGraphVertId] =
1839 dofs[1][meshEdgeId];
1843 for (j = 0; j < exp->GetNfaces(); ++j)
1845 meshFaceId = exp->GetGeom()->GetFid(j);
1847 if (graph[2][meshFaceId] >= firstNonDirGraphVertId)
1849 vwgts_perm[graph[2][meshFaceId] -
1850 firstNonDirGraphVertId] =
1851 dofs[2][meshFaceId];
1856 bottomUpGraph->ExpandGraphWithVertexWeights(vwgts_perm);
1905 const vector<PeriodicEntity> &periodicEdges)
1907 int minId = periodicEdges[0].id;
1911 for (k = 1; k < periodicEdges.size(); ++k)
1913 if (periodicEdges[k].
id < minId)
1915 minId = min(minId, periodicEdges[k].
id);
1920 minId = min(minId, meshEdgeId);
1922 if (meshEdgeId != minId)
1932 return make_pair(minId, edgeOrient);
1958 int tmp1 = (int)faceOrient - 5;
1959 int tmp2 = (int)perFaceOrient - 5;
1961 int flipDir1Map [8] = {2,3,0,1,6,7,4,5};
1962 int flipDir2Map [8] = {1,0,3,2,5,4,7,6};
1963 int transposeMap[8] = {4,5,6,7,0,2,1,3};
1968 tmp1 = transposeMap[tmp1];
1972 if (tmp2 == 2 || tmp2 == 3 || tmp2 == 6 || tmp2 == 7)
1974 tmp1 = flipDir1Map[tmp1];
1980 tmp1 = flipDir2Map[tmp1];
2014 int maxBndGlobalId = 0;
2022 PeriodicMap::const_iterator pIt;
2033 for(i = 0; i < locExpVector.size(); ++i)
2035 exp = locExpVector[i];
2036 nVert += exp->GetNverts();
2037 nEdge += exp->GetNedges();
2038 nFace += exp->GetNfaces();
2040 for(j = 0; j < exp->GetNedges(); ++j)
2042 dof = exp->GetEdgeNcoeffs(j)-2;
2043 maxEdgeDof = (dof > maxEdgeDof ? dof : maxEdgeDof);
2045 for(j = 0; j < exp->GetNfaces(); ++j)
2047 dof = exp->GetFaceIntNcoeffs(j);
2048 maxFaceDof = (dof > maxFaceDof ? dof : maxFaceDof);
2050 exp->GetInteriorMap(interiorMap);
2051 dof = interiorMap.num_elements();
2052 maxIntDof = (dof > maxIntDof ? dof : maxIntDof);
2064 for(i = 0; i < locExpVector.size(); ++i)
2066 exp = locExpVector[i];
2070 for(j = 0; j < exp->GetNverts(); ++j)
2072 meshVertId = exp->GetGeom()->GetVid(j);
2075 pIt = perVerts.find(meshVertId);
2076 if (pIt != perVerts.end())
2078 for (k = 0; k < pIt->second.size(); ++k)
2080 meshVertId = min(meshVertId, pIt->second[k].id);
2086 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2090 for(j = 0; j < exp->GetNedges(); ++j)
2092 meshEdgeId = exp->GetGeom()->GetEid(j);
2093 pIt = perEdges.find(meshEdgeId);
2094 edgeOrient = exp->GetGeom()->GetEorient(j);
2096 if (pIt != perEdges.end())
2098 pair<int, StdRegions::Orientation> idOrient =
2100 meshEdgeId, edgeOrient, pIt->second);
2101 meshEdgeId = idOrient.first;
2102 edgeOrient = idOrient.second;
2105 exp->GetEdgeInteriorMap(j,edgeOrient,edgeInteriorMap,edgeInteriorSign);
2106 dof = exp->GetEdgeNcoeffs(j)-2;
2110 for(k = dof-1; k >= 0; --k)
2114 = nVert + meshEdgeId * maxEdgeDof + k + 1;
2116 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2121 for(j = 0; j < exp->GetNfaces(); ++j)
2123 faceOrient = exp->GetGeom()->GetForient(j);
2125 meshFaceId = exp->GetGeom()->GetFid(j);
2127 pIt = perFaces.find(meshFaceId);
2128 if (pIt != perFaces.end())
2130 if(meshFaceId == min(meshFaceId, pIt->second[0].id))
2134 meshFaceId = min(meshFaceId, pIt->second[0].id);
2138 exp->GetFaceInteriorMap(j,faceOrient,faceInteriorMap,faceInteriorSign);
2139 dof = exp->GetFaceIntNcoeffs(j);
2142 for(k = dof-1; k >= 0; --k)
2146 = nVert + nEdge*maxEdgeDof + meshFaceId * maxFaceDof
2150 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2155 exp->GetInteriorMap(interiorMap);
2156 dof = interiorMap.num_elements();
2157 elementId = (exp->GetGeom())->GetGlobalID();
2158 for (k = 0; k < dof; ++k)
2162 = nVert + nEdge*maxEdgeDof + nFace*maxFaceDof + elementId*maxIntDof + k + 1;
2183 m_globalToUniversalMapUnique[i] = (tmp[i] >= 0 ? 1 : 0);
2187 m_globalToUniversalBndMapUnique[i] = (tmp2[i] >= 0 ? 1 : 0);
2206 const boost::shared_ptr<LocalRegions::ExpansionVector> exp
2208 int nelmts = exp->size();
2213 returnval->m_solnType = solnType;
2214 returnval->m_preconType =
eNull;
2215 returnval->m_maxStaticCondLevel = 0;
2216 returnval->m_signChange =
false;
2217 returnval->m_comm =
m_comm;
2220 for (i = 0; i < nelmts; ++i)
2222 nverts += (*exp)[i]->GetNverts();
2225 returnval->m_numLocalCoeffs = nverts;
2236 for (i = 0; i < nelmts; ++i)
2238 for (j = 0; j < (*exp)[i]->GetNverts(); ++j)
2240 returnval->m_localToGlobalMap[cnt] =
2241 returnval->m_localToGlobalBndMap[cnt] =
2243 GlobCoeffs[returnval->m_localToGlobalMap[cnt]] = 1;
2246 if ((returnval->m_localToGlobalMap[cnt]) <
2249 returnval->m_numLocalDirBndCoeffs++;
2253 cnt1 += (*exp)[i]->GetNcoeffs();
2260 if (GlobCoeffs[i] != -1)
2262 GlobCoeffs[i] = cnt++;
2267 returnval->m_numGlobalCoeffs = cnt;
2272 if (GlobCoeffs[i] != -1)
2274 returnval->m_numGlobalDirBndCoeffs++;
2283 int nglocoeffs = returnval->m_numGlobalCoeffs;
2284 returnval->m_globalToUniversalMap
2286 returnval->m_globalToUniversalMapUnique
2290 for (i = 0; i < nverts; ++i)
2292 cnt = returnval->m_localToGlobalMap[i];
2293 returnval->m_localToGlobalMap[i] = GlobCoeffs[cnt];
2295 returnval->m_globalToUniversalMap[GlobCoeffs[cnt]] =
2301 for (
unsigned int i = 0; i < nglocoeffs; ++i)
2303 tmp[i] = returnval->m_globalToUniversalMap[i];
2305 returnval->m_gsh =
Gs::Init(tmp, vCommRow);
2307 for (
unsigned int i = 0; i < nglocoeffs; ++i)
2309 returnval->m_globalToUniversalMapUnique[i]
2310 = (tmp[i] >= 0 ? 1 : 0);
2315 for (i = 0; i < nverts; ++i)
2317 cnt = returnval->m_localToGlobalMap[i];
2318 returnval->m_localToGlobalMap[i] = GlobCoeffs[cnt];
2351 for(j = 0; j < locSize; j++)
2366 bwidth = (bwidth>(maxId-minId))?bwidth:(maxId-minId);
2431 if(global.data() == loc.data())
2466 if(global.data() == loc.data())
2498 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.
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)
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, std::set< int > &extraDirVerts, std::set< int > &extraDirEdges, int &firstNonDirGraphVertId, int &nExtraDirichlet, int mdswitch=1)
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
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.
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
std::map< int, std::vector< ExtraDirDof > > m_extraDirDofs
Map indicating degrees of freedom which are Dirichlet but whose value is stored on another processor...
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.
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.
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.
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
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
std::vector< std::map< int, int > > DofGraph
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.
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...
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)