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 gId = gId < 0 ? graphVertId++ : gId;
502 graph[0][meshVertId] = gId;
504 for (i = 0; i < pIt->second.size(); ++i)
506 if (pIt->second[i].isLocal)
508 graph[0][pIt->second[i].id] = graph[0][meshVertId];
515 for (i = 0; i < pIt->second.size(); ++i)
517 if (pIt->second[i].id == meshVertId)
526 gId = gId < 0 ? graphVertId++ : gId;
527 graph[0][pIt->first] = gId;
529 for (i = 0; i < pIt->second.size(); ++i)
531 if (pIt->second[i].isLocal)
533 graph[0][pIt->second[i].id] = graph[0][pIt->first];
543 firstNonDirGraphVertId = graphVertId;
545 typedef boost::adjacency_list<
546 boost::setS, boost::vecS, boost::undirectedS> BoostGraph;
547 BoostGraph boostGraphObj;
549 vector<map<int,int> > tempGraph(3);
550 map<int, int> vwgts_map;
555 int tempGraphVertId = 0;
556 int localVertOffset = 0;
557 int localEdgeOffset = 0;
558 int localFaceOffset = 0;
576 map<int,int> EdgeSize;
577 map<int,int> FaceSize;
580 for(i = 0; i < locExpVector.size(); ++i)
583 nTotalVerts += exp->GetNverts();
584 nTotalEdges += exp->GetNedges();
585 nTotalFaces += exp->GetNfaces();
587 nEdges = exp->GetNedges();
588 for(j = 0; j < nEdges; ++j)
590 meshEdgeId = exp->GetGeom()->GetEid(j);
591 if (EdgeSize.count(meshEdgeId) > 0)
593 EdgeSize[meshEdgeId] =
594 min(EdgeSize[meshEdgeId],
595 exp->GetEdgeNcoeffs(j) - 2);
599 EdgeSize[meshEdgeId] = exp->GetEdgeNcoeffs(j) - 2;
603 nFaces = exp->GetNfaces();
605 for(j = 0; j < nFaces; ++j)
607 meshFaceId = exp->GetGeom()->GetFid(j);
608 if (FaceSize.count(meshFaceId) > 0)
610 FaceSize[meshFaceId] =
611 min(FaceSize[meshFaceId],
612 exp->GetFaceIntNcoeffs(j));
616 FaceSize[meshFaceId] = exp->GetFaceIntNcoeffs(j);
618 FaceSize[meshFaceId] = exp->GetFaceIntNcoeffs(j);
623 for (pIt = periodicVerts.begin(); pIt != periodicVerts.end(); ++pIt)
625 meshVertId = pIt->first;
628 if (graph[0].count(pIt->first) != 0)
630 for (i = 0; i < pIt->second.size(); ++i)
632 meshVertId2 = pIt->second[i].id;
633 if (graph[0].count(meshVertId2) == 0 &&
634 pIt->second[i].isLocal)
636 graph[0][meshVertId2] =
637 graph[0][meshVertId];
644 bool isDirichlet =
false;
645 for (i = 0; i < pIt->second.size(); ++i)
647 if (!pIt->second[i].isLocal)
652 meshVertId2 = pIt->second[i].id;
653 if (graph[0].count(meshVertId2) > 0)
662 graph[0][meshVertId] =
663 graph[0][pIt->second[i].id];
665 for (j = 0; j < pIt->second.size(); ++j)
667 meshVertId2 = pIt->second[i].id;
668 if (j == i || !pIt->second[j].isLocal ||
669 graph[0].count(meshVertId2) > 0)
674 graph[0][meshVertId2] =
675 graph[0][pIt->second[i].id];
682 for (i = 0; i < pIt->second.size(); ++i)
684 if (!pIt->second[i].isLocal)
689 if (tempGraph[0].count(pIt->second[i].id) > 0)
695 if (i == pIt->second.size())
697 boost::add_vertex(boostGraphObj);
698 tempGraph[0][meshVertId] = tempGraphVertId++;
703 tempGraph[0][meshVertId] = tempGraph[0][pIt->second[i].id];
714 for(i = 0; i < locExpVector.size(); ++i)
716 exp = locExpVector[i];
718 nVerts = exp->GetNverts();
719 for(j = 0; j < nVerts; ++j)
721 meshVertId = exp->GetGeom()->GetVid(j);
722 if(graph[0].count(meshVertId) == 0)
724 if(tempGraph[0].count(meshVertId) == 0)
726 boost::add_vertex(boostGraphObj);
727 tempGraph[0][meshVertId] = tempGraphVertId++;
730 localVerts[localVertOffset+vertCnt++] = tempGraph[0][meshVertId];
731 vwgts_map[ tempGraph[0][meshVertId] ] = 1;
735 localVertOffset+=nVerts;
739 for (pIt = periodicEdges.begin(); pIt != periodicEdges.end(); ++pIt)
741 meshEdgeId = pIt->first;
744 if (graph[1].count(pIt->first) != 0)
746 for (i = 0; i < pIt->second.size(); ++i)
748 meshEdgeId2 = pIt->second[i].id;
749 if (graph[1].count(meshEdgeId2) == 0 &&
750 pIt->second[i].isLocal)
752 graph[1][meshEdgeId2] =
753 graph[1][meshEdgeId];
760 bool isDirichlet =
false;
761 for (i = 0; i < pIt->second.size(); ++i)
763 if (!pIt->second[i].isLocal)
768 meshEdgeId2 = pIt->second[i].id;
769 if (graph[1].count(meshEdgeId2) > 0)
778 graph[1][meshEdgeId] =
779 graph[1][pIt->second[i].id];
781 for (j = 0; j < pIt->second.size(); ++j)
783 meshEdgeId2 = pIt->second[i].id;
784 if (j == i || !pIt->second[j].isLocal ||
785 graph[1].count(meshEdgeId2) > 0)
790 graph[1][meshEdgeId2] =
791 graph[1][pIt->second[i].id];
798 for (i = 0; i < pIt->second.size(); ++i)
800 if (!pIt->second[i].isLocal)
805 if (tempGraph[1].count(pIt->second[i].id) > 0)
811 if (i == pIt->second.size())
813 boost::add_vertex(boostGraphObj);
814 tempGraph[1][meshEdgeId] = tempGraphVertId++;
820 tempGraph[1][meshEdgeId] = tempGraph[1][pIt->second[i].id];
824 int nEdgeIntCoeffs, nFaceIntCoeffs;
827 for(i = 0; i < locExpVector.size(); ++i)
829 exp = locExpVector[i];
831 nEdges = exp->GetNedges();
833 for(j = 0; j < nEdges; ++j)
835 nEdgeIntCoeffs = exp->GetEdgeNcoeffs(j) - 2;
836 meshEdgeId = exp->GetGeom()->GetEid(j);
837 if(graph[1].count(meshEdgeId) == 0)
839 if(tempGraph[1].count(meshEdgeId) == 0)
841 boost::add_vertex(boostGraphObj);
842 tempGraph[1][meshEdgeId] = tempGraphVertId++;
847 localEdges[localEdgeOffset+edgeCnt++] = tempGraph[1][meshEdgeId];
848 vwgts_map[ tempGraph[1][meshEdgeId] ] = nEdgeIntCoeffs;
852 localEdgeOffset+=nEdges;
856 for (pIt = periodicFaces.begin(); pIt != periodicFaces.end(); ++pIt)
858 if (!pIt->second[0].isLocal)
861 meshFaceId = pIt->first;
862 ASSERTL0(graph[2].count(meshFaceId) == 0,
863 "This periodic boundary edge has been specified before");
864 boost::add_vertex(boostGraphObj);
865 tempGraph[2][meshFaceId] = tempGraphVertId++;
866 nFaceIntCoeffs = FaceSize[meshFaceId];
870 else if (pIt->first < pIt->second[0].id)
872 ASSERTL0(graph[2].count(pIt->first) == 0,
873 "This periodic boundary face has been specified before");
874 ASSERTL0(graph[2].count(pIt->second[0].id) == 0,
875 "This periodic boundary face has been specified before");
877 boost::add_vertex(boostGraphObj);
878 tempGraph[2][pIt->first] = tempGraphVertId;
879 tempGraph[2][pIt->second[0].id] = tempGraphVertId++;
880 nFaceIntCoeffs = FaceSize[pIt->first];
887 for(i = 0; i < locExpVector.size(); ++i)
889 exp = locExpVector[i];
890 nFaces = exp->GetNfaces();
892 for(j = 0; j < nFaces; ++j)
894 nFaceIntCoeffs = exp->GetFaceIntNcoeffs(j);
895 meshFaceId = exp->GetGeom()->GetFid(j);
896 if(graph[2].count(meshFaceId) == 0)
898 if(tempGraph[2].count(meshFaceId) == 0)
900 boost::add_vertex(boostGraphObj);
901 tempGraph[2][meshFaceId] = tempGraphVertId++;
906 localFaces[localFaceOffset+faceCnt++] = tempGraph[2][meshFaceId];
907 vwgts_map[ tempGraph[2][meshFaceId] ] = nFaceIntCoeffs;
912 localFaceOffset+=nFaces;
918 for(i = 0; i < locExpVector.size(); ++i)
920 exp = locExpVector[i];
921 nVerts = exp->GetNverts();
922 nEdges = exp->GetNedges();
923 nFaces = exp->GetNfaces();
930 for(j = 0; j < nVerts; j++)
932 if(localVerts[j+localVertOffset]==-1)
937 for(k = 0; k < nVerts; k++)
939 if(localVerts[k+localVertOffset]==-1)
945 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
946 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
950 for(k = 0; k < nEdges; k++)
952 if(localEdges[k+localEdgeOffset]==-1)
956 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
957 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
960 for(k = 0; k < nFaces; k++)
962 if(localFaces[k+localFaceOffset]==-1)
966 boost::add_edge( (
size_t) localVerts[j+localVertOffset],
967 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
972 for(j = 0; j < nEdges; j++)
974 if(localEdges[j+localEdgeOffset]==-1)
979 for(k = 0; k < nEdges; k++)
981 if(localEdges[k+localEdgeOffset]==-1)
987 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
988 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
992 for(k = 0; k < nVerts; k++)
994 if(localVerts[k+localVertOffset]==-1)
998 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
999 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
1002 for(k = 0; k < nFaces; k++)
1004 if(localFaces[k+localFaceOffset]==-1)
1008 boost::add_edge( (
size_t) localEdges[j+localEdgeOffset],
1009 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
1014 for(j = 0; j < nFaces; j++)
1016 if(localFaces[j+localFaceOffset]==-1)
1021 for(k = 0; k < nFaces; k++)
1023 if(localFaces[k+localFaceOffset]==-1)
1029 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1030 (
size_t) localFaces[k+localFaceOffset],boostGraphObj);
1034 for(k = 0; k < nVerts; k++)
1036 if(localVerts[k+localVertOffset]==-1)
1040 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1041 (
size_t) localVerts[k+localVertOffset],boostGraphObj);
1044 for(k = 0; k < nEdges; k++)
1046 if(localEdges[k+localEdgeOffset]==-1)
1050 boost::add_edge( (
size_t) localFaces[j+localFaceOffset],
1051 (
size_t) localEdges[k+localEdgeOffset],boostGraphObj);
1055 localVertOffset+=nVerts;
1056 localEdgeOffset+=nEdges;
1057 localFaceOffset+=nFaces;
1067 vector<long> procVerts, procEdges, procFaces;
1068 set <int> foundVerts, foundEdges, foundFaces;
1073 for(i = cnt = 0; i < locExpVector.size(); ++i)
1076 exp = locExpVector[elmtid];
1077 for (j = 0; j < exp->GetNverts(); ++j)
1079 int vid = exp->GetGeom()->GetVid(j)+1;
1080 if (foundVerts.count(vid) == 0)
1082 procVerts.push_back(vid);
1083 foundVerts.insert(vid);
1087 for (j = 0; j < exp->GetNedges(); ++j)
1089 int eid = exp->GetGeom()->GetEid(j)+1;
1091 if (foundEdges.count(eid) == 0)
1093 procEdges.push_back(eid);
1094 foundEdges.insert(eid);
1098 for (j = 0; j < exp->GetNfaces(); ++j)
1100 int fid = exp->GetGeom()->GetFid(j)+1;
1102 if (foundFaces.count(fid) == 0)
1104 procFaces.push_back(fid);
1105 foundFaces.insert(fid);
1110 int unique_verts = foundVerts.size();
1111 int unique_edges = foundEdges.size();
1112 int unique_faces = foundFaces.size();
1126 if (unique_edges > 0)
1134 if (unique_faces > 0)
1144 for (i = 0; i < unique_verts; ++i)
1148 if (graph[0].count(procVerts[i]-1) == 0)
1150 partVerts.insert(tempGraph[0][procVerts[i]-1]);
1155 for (i = 0; i < unique_edges; ++i)
1159 if (graph[1].count(procEdges[i]-1) == 0)
1161 partVerts.insert(tempGraph[1][procEdges[i]-1]);
1166 for (i = 0; i < unique_faces; ++i)
1170 if (graph[2].count(procFaces[i]-1) == 0)
1172 partVerts.insert(tempGraph[2][procFaces[i]-1]);
1178 for (pIt = periodicVerts.begin(); pIt != periodicVerts.end(); ++pIt)
1180 if (graph[0].count(pIt->first) == 0)
1182 partVerts.insert(tempGraph[0][pIt->first]);
1185 for (pIt = periodicEdges.begin(); pIt != periodicEdges.end(); ++pIt)
1187 if (graph[1].count(pIt->first) == 0)
1189 partVerts.insert(tempGraph[1][pIt->first]);
1192 for (pIt = periodicFaces.begin(); pIt != periodicFaces.end(); ++pIt)
1194 if (graph[2].count(pIt->first) == 0)
1196 partVerts.insert(tempGraph[2][pIt->first]);
1201 int nGraphVerts = tempGraphVertId;
1205 ASSERTL1(vwgts_map.size()==nGraphVerts,
"Non matching dimensions");
1206 for(i = 0; i < nGraphVerts; ++i)
1208 vwgts[i] = vwgts_map[i];
1239 boostGraphObj, perm, iperm, bottomUpGraph,
1240 partVerts, mdswitch);
1246 "Unrecognised solution type: " + std::string(
1271 for(mapIt = tempGraph[0].begin(); mapIt != tempGraph[0].end(); mapIt++)
1273 graph[0][mapIt->first] = iperm[mapIt->second] + graphVertId;
1275 for(mapIt = tempGraph[1].begin(); mapIt != tempGraph[1].end(); mapIt++)
1277 graph[1][mapIt->first] = iperm[mapIt->second] + graphVertId;
1279 for(mapIt = tempGraph[2].begin(); mapIt != tempGraph[2].end(); mapIt++)
1281 graph[2][mapIt->first] = iperm[mapIt->second] + graphVertId;
1292 const int numLocalCoeffs,
1296 const bool checkIfSystemSingular,
1297 const std::string variable,
1306 int meshVertId, meshEdgeId, meshFaceId;
1308 int nEdgeInteriorCoeffs;
1309 int nFaceInteriorCoeffs;
1310 int firstNonDirGraphVertId;
1320 PeriodicMap::const_iterator pIt;
1330 set<int> extraDirVerts, extraDirEdges;
1335 for (i = 0; i < locExpVector.size(); ++i)
1337 exp = locExpVector[i];
1339 for(j = 0; j < locExpVector[i]->GetNverts(); ++j)
1341 dofs[0][exp->GetGeom()->GetVid(j)] = 1;
1344 for(j = 0; j < locExpVector[i]->GetNedges(); ++j)
1346 if (dofs[1].count(exp->GetGeom()->GetEid(j)) > 0)
1348 if (dofs[1][exp->GetGeom()->GetEid(j)] !=
1349 locExpVector[i]->GetEdgeNcoeffs(j)-2)
1353 "CG with variable order only available with modal expansion");
1355 dofs[1][exp->GetGeom()->GetEid(j)] =
1356 min(dofs[1][exp->GetGeom()->GetEid(j)],
1357 locExpVector[i]->GetEdgeNcoeffs(j)-2);
1361 dofs[1][exp->GetGeom()->GetEid(j)] =
1362 exp->GetEdgeNcoeffs(j) - 2;
1366 for(j = 0; j < locExpVector[i]->GetNfaces(); ++j)
1368 if (dofs[2].count(exp->GetGeom()->GetFid(j)) > 0)
1370 if (dofs[2][exp->GetGeom()->GetFid(j)] !=
1371 exp->GetFaceIntNcoeffs(j))
1374 "CG with variable order not available in 3D");
1376 dofs[2][exp->GetGeom()->GetFid(j)] =
1377 min(dofs[2][exp->GetGeom()->GetFid(j)],
1378 exp->GetFaceIntNcoeffs(j));
1382 dofs[2][exp->GetGeom()->GetFid(j)] =
1383 exp->GetFaceIntNcoeffs(j);
1393 for(dofIt = dofs[1].begin(), i=0; dofIt != dofs[1].end(); dofIt++, i++)
1395 edgeId[i] = dofIt->first;
1401 for (i=0; i < dofs[1].size(); i++)
1403 dofs[1][edgeId[i]] = (int) (edgeDof[i]+0.5);
1408 for(dofIt = dofs[2].begin(), i=0; dofIt != dofs[2].end(); dofIt++, i++)
1410 faceId[i] = dofIt->first;
1416 for (i=0; i < dofs[2].size(); i++)
1418 dofs[2][faceId[i]] = (int) (faceDof[i]+0.5);
1426 int nExtraDirichlet;
1429 checkIfSystemSingular, periodicVerts, periodicEdges,
1430 periodicFaces, graph, bottomUpGraph, extraDirVerts,
1431 extraDirEdges, firstNonDirGraphVertId,
1446 graph[0].size() + graph[1].size() + graph[2].size() + 1);
1448 graphVertOffset[0] = 0;
1450 for(i = 0; i < locExpVector.size(); ++i)
1454 for(j = 0; j < exp->GetNverts(); ++j)
1456 meshVertId = exp->GetGeom()->GetVid(j);
1457 graphVertOffset[graph[0][meshVertId]+1] = 1;
1460 for(j = 0; j < exp->GetNedges(); ++j)
1462 nEdgeInteriorCoeffs = exp->GetEdgeNcoeffs(j) - 2;
1463 meshEdgeId = exp->GetGeom()->GetEid(j);
1464 graphVertOffset[graph[1][meshEdgeId]+1]
1465 = dofs[1][meshEdgeId];
1467 bType = exp->GetEdgeBasisType(j);
1471 if(nEdgeInteriorCoeffs &&
1479 for(j = 0; j < exp->GetNfaces(); ++j)
1481 nFaceInteriorCoeffs = exp->GetFaceIntNcoeffs(j);
1482 meshFaceId = exp->GetGeom()->GetFid(j);
1483 graphVertOffset[graph[2][meshFaceId]+1] = dofs[2][meshFaceId];
1487 for(i = 1; i < graphVertOffset.num_elements(); i++)
1489 graphVertOffset[i] += graphVertOffset[i-1];
1514 m_numLocalIntCoeffsPerPatch[i] = (
unsigned int)
1531 for(i = 0; i < locExpVector.size(); ++i)
1533 exp = locExpVector[i];
1535 for(j = 0; j < exp->GetNverts(); ++j)
1537 meshVertId = exp->GetGeom()->GetVid(j);
1541 graphVertOffset[graph[0][meshVertId]];
1544 for(j = 0; j < exp->GetNedges(); ++j)
1546 nEdgeInteriorCoeffs = exp->GetEdgeNcoeffs(j)-2;
1547 edgeOrient = exp->GetGeom()->GetEorient(j);
1548 meshEdgeId = exp->GetGeom()->GetEid(j);
1550 pIt = periodicEdges.find(meshEdgeId);
1555 if (pIt != periodicEdges.end())
1557 pair<int, StdRegions::Orientation> idOrient =
1559 meshEdgeId, edgeOrient, pIt->second);
1560 edgeOrient = idOrient.second;
1563 exp->GetEdgeInteriorMap(j,edgeOrient,edgeInteriorMap,edgeInteriorSign);
1566 for(k = 0; k < dofs[1][exp->GetGeom()->GetEid(j)]; ++k)
1569 graphVertOffset[graph[1][meshEdgeId]]+k;
1571 for(k = dofs[1][exp->GetGeom()->GetEid(j)]; k < nEdgeInteriorCoeffs; ++k)
1574 graphVertOffset[graph[1][meshEdgeId]];
1580 for(k = 0; k < dofs[1][exp->GetGeom()->GetEid(j)]; ++k)
1584 for(k = dofs[1][exp->GetGeom()->GetEid(j)]; k < nEdgeInteriorCoeffs; ++k)
1591 for(j = 0; j < exp->GetNfaces(); ++j)
1593 nFaceInteriorCoeffs = exp->GetFaceIntNcoeffs(j);
1594 faceOrient = exp->GetGeom()->GetForient(j);
1595 meshFaceId = exp->GetGeom()->GetFid(j);
1597 pIt = periodicFaces.find(meshFaceId);
1599 if (pIt != periodicFaces.end() &&
1600 meshFaceId == min(meshFaceId, pIt->second[0].id))
1605 exp->GetFaceInteriorMap(j,faceOrient,faceInteriorMap,faceInteriorSign);
1608 for(k = 0; k < dofs[2][exp->GetGeom()->GetFid(j)]; ++k)
1611 graphVertOffset[graph[2][meshFaceId]]+k;
1613 for(k = dofs[2][exp->GetGeom()->GetFid(j)]; k < nFaceInteriorCoeffs; ++k)
1616 graphVertOffset[graph[2][meshFaceId]];
1621 for(k = 0; k < dofs[2][exp->GetGeom()->GetFid(j)]; ++k)
1625 for(k = dofs[2][exp->GetGeom()->GetFid(j)]; k < nFaceInteriorCoeffs; ++k)
1637 for(i = 0; i < bndCondExp.num_elements(); i++)
1639 set<int> foundExtraVerts, foundExtraEdges;
1640 for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
1642 bndExp = bndCondExp[i]->GetExp(j);
1643 cnt = offset + bndCondExp[i]->GetCoeff_Offset(j);
1644 for(k = 0; k < bndExp->GetNverts(); k++)
1646 meshVertId = bndExp->GetGeom()->GetVid(k);
1647 m_bndCondCoeffsToGlobalCoeffsMap[cnt+bndExp->GetVertexMap(k)] = graphVertOffset[graph[0][meshVertId]];
1649 if (bndConditions[i]->GetBoundaryConditionType() !=
1656 if (iter != extraDirVerts.end() &&
1657 foundExtraVerts.count(meshVertId) == 0)
1659 int loc = bndCondExp[i]->GetCoeff_Offset(j) +
1660 bndExp->GetVertexMap(k);
1661 int gid = graphVertOffset[
1662 graph[0][meshVertId]];
1665 foundExtraVerts.insert(meshVertId);
1669 for(k = 0; k < bndExp->GetNedges(); k++)
1671 nEdgeInteriorCoeffs = bndExp->GetEdgeNcoeffs(k)-2;
1672 edgeOrient = bndExp->GetGeom()->GetEorient(k);
1673 meshEdgeId = bndExp->GetGeom()->GetEid(k);
1675 pIt = periodicEdges.find(meshEdgeId);
1680 if (pIt != periodicEdges.end())
1682 pair<int, StdRegions::Orientation> idOrient =
1684 meshEdgeId, edgeOrient, pIt->second);
1685 edgeOrient = idOrient.second;
1688 bndExp->GetEdgeInteriorMap(
1689 k,edgeOrient,edgeInteriorMap,edgeInteriorSign);
1691 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1693 m_bndCondCoeffsToGlobalCoeffsMap[cnt+edgeInteriorMap[l]] =
1694 graphVertOffset[graph[1][meshEdgeId]]+l;
1700 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1706 if (bndConditions[i]->GetBoundaryConditionType() !=
1713 if (iter != extraDirEdges.end() &&
1714 foundExtraEdges.count(meshEdgeId) == 0 &&
1715 nEdgeInteriorCoeffs > 0)
1717 for(l = 0; l < nEdgeInteriorCoeffs; ++l)
1719 int loc = bndCondExp[i]->GetCoeff_Offset(j) +
1721 int gid = graphVertOffset[
1722 graph[1][meshEdgeId]]+l;
1726 foundExtraEdges.insert(meshEdgeId);
1730 meshFaceId = bndExp->GetGeom()->GetGlobalID();
1732 for(k = 0; k < bndExp->GetNcoeffs(); k++)
1734 if(m_bndCondCoeffsToGlobalCoeffsMap[cnt+k] == -1)
1736 m_bndCondCoeffsToGlobalCoeffsMap[cnt+k] =
1737 graphVertOffset[graph[bndExp->GetNumBases()][meshFaceId]]+intDofCnt;
1742 offset += bndCondExp[i]->GetNcoeffs();
1782 map<int, vector<ExtraDirDof> >
::iterator Tit;
1787 for (i = 0; i < Tit->second.size(); ++i)
1789 valence[Tit->second[i].get<1>()] = 1.0;
1798 for (i = 0; i < Tit->second.size(); ++i)
1800 boost::get<2>(Tit->second.at(i)) /= valence[Tit->second.at(i).get<1>()];
1814 dofs[0].size() + dofs[1].size() + dofs[2].size()
1815 - firstNonDirGraphVertId);
1817 for (i = 0; i < locExpVector.size(); ++i)
1821 for (j = 0; j < exp->GetNverts(); ++j)
1823 meshVertId = exp->GetGeom()->GetVid(j);
1825 if (graph[0][meshVertId] >= firstNonDirGraphVertId)
1827 vwgts_perm[graph[0][meshVertId] -
1828 firstNonDirGraphVertId] =
1829 dofs[0][meshVertId];
1833 for (j = 0; j < exp->GetNedges(); ++j)
1835 meshEdgeId = exp->GetGeom()->GetEid(j);
1837 if (graph[1][meshEdgeId] >= firstNonDirGraphVertId)
1839 vwgts_perm[graph[1][meshEdgeId] -
1840 firstNonDirGraphVertId] =
1841 dofs[1][meshEdgeId];
1845 for (j = 0; j < exp->GetNfaces(); ++j)
1847 meshFaceId = exp->GetGeom()->GetFid(j);
1849 if (graph[2][meshFaceId] >= firstNonDirGraphVertId)
1851 vwgts_perm[graph[2][meshFaceId] -
1852 firstNonDirGraphVertId] =
1853 dofs[2][meshFaceId];
1858 bottomUpGraph->ExpandGraphWithVertexWeights(vwgts_perm);
1907 const vector<PeriodicEntity> &periodicEdges)
1909 int minId = periodicEdges[0].id;
1913 for (k = 1; k < periodicEdges.size(); ++k)
1915 if (periodicEdges[k].
id < minId)
1917 minId = min(minId, periodicEdges[k].
id);
1922 minId = min(minId, meshEdgeId);
1924 if (meshEdgeId != minId)
1934 return make_pair(minId, edgeOrient);
1960 int tmp1 = (int)faceOrient - 5;
1961 int tmp2 = (int)perFaceOrient - 5;
1963 int flipDir1Map [8] = {2,3,0,1,6,7,4,5};
1964 int flipDir2Map [8] = {1,0,3,2,5,4,7,6};
1965 int transposeMap[8] = {4,5,6,7,0,2,1,3};
1970 tmp1 = transposeMap[tmp1];
1974 if (tmp2 == 2 || tmp2 == 3 || tmp2 == 6 || tmp2 == 7)
1976 tmp1 = flipDir1Map[tmp1];
1982 tmp1 = flipDir2Map[tmp1];
2016 int maxBndGlobalId = 0;
2024 PeriodicMap::const_iterator pIt;
2035 for(i = 0; i < locExpVector.size(); ++i)
2037 exp = locExpVector[i];
2038 nVert += exp->GetNverts();
2039 nEdge += exp->GetNedges();
2040 nFace += exp->GetNfaces();
2042 for(j = 0; j < exp->GetNedges(); ++j)
2044 dof = exp->GetEdgeNcoeffs(j)-2;
2045 maxEdgeDof = (dof > maxEdgeDof ? dof : maxEdgeDof);
2047 for(j = 0; j < exp->GetNfaces(); ++j)
2049 dof = exp->GetFaceIntNcoeffs(j);
2050 maxFaceDof = (dof > maxFaceDof ? dof : maxFaceDof);
2052 exp->GetInteriorMap(interiorMap);
2053 dof = interiorMap.num_elements();
2054 maxIntDof = (dof > maxIntDof ? dof : maxIntDof);
2066 for(i = 0; i < locExpVector.size(); ++i)
2068 exp = locExpVector[i];
2072 for(j = 0; j < exp->GetNverts(); ++j)
2074 meshVertId = exp->GetGeom()->GetVid(j);
2077 pIt = perVerts.find(meshVertId);
2078 if (pIt != perVerts.end())
2080 for (k = 0; k < pIt->second.size(); ++k)
2082 meshVertId = min(meshVertId, pIt->second[k].id);
2088 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2092 for(j = 0; j < exp->GetNedges(); ++j)
2094 meshEdgeId = exp->GetGeom()->GetEid(j);
2095 pIt = perEdges.find(meshEdgeId);
2096 edgeOrient = exp->GetGeom()->GetEorient(j);
2098 if (pIt != perEdges.end())
2100 pair<int, StdRegions::Orientation> idOrient =
2102 meshEdgeId, edgeOrient, pIt->second);
2103 meshEdgeId = idOrient.first;
2104 edgeOrient = idOrient.second;
2107 exp->GetEdgeInteriorMap(j,edgeOrient,edgeInteriorMap,edgeInteriorSign);
2108 dof = exp->GetEdgeNcoeffs(j)-2;
2112 for(k = dof-1; k >= 0; --k)
2116 = nVert + meshEdgeId * maxEdgeDof + k + 1;
2118 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2123 for(j = 0; j < exp->GetNfaces(); ++j)
2125 faceOrient = exp->GetGeom()->GetForient(j);
2127 meshFaceId = exp->GetGeom()->GetFid(j);
2129 pIt = perFaces.find(meshFaceId);
2130 if (pIt != perFaces.end())
2132 if(meshFaceId == min(meshFaceId, pIt->second[0].id))
2136 meshFaceId = min(meshFaceId, pIt->second[0].id);
2140 exp->GetFaceInteriorMap(j,faceOrient,faceInteriorMap,faceInteriorSign);
2141 dof = exp->GetFaceIntNcoeffs(j);
2144 for(k = dof-1; k >= 0; --k)
2148 = nVert + nEdge*maxEdgeDof + meshFaceId * maxFaceDof
2152 maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId);
2157 exp->GetInteriorMap(interiorMap);
2158 dof = interiorMap.num_elements();
2159 elementId = (exp->GetGeom())->GetGlobalID();
2160 for (k = 0; k < dof; ++k)
2164 = nVert + nEdge*maxEdgeDof + nFace*maxFaceDof + elementId*maxIntDof + k + 1;
2185 m_globalToUniversalMapUnique[i] = (tmp[i] >= 0 ? 1 : 0);
2189 m_globalToUniversalBndMapUnique[i] = (tmp2[i] >= 0 ? 1 : 0);
2208 const boost::shared_ptr<LocalRegions::ExpansionVector> exp
2210 int nelmts = exp->size();
2215 returnval->m_solnType = solnType;
2216 returnval->m_preconType =
eNull;
2217 returnval->m_maxStaticCondLevel = 0;
2218 returnval->m_signChange =
false;
2219 returnval->m_comm =
m_comm;
2222 for (i = 0; i < nelmts; ++i)
2224 nverts += (*exp)[i]->GetNverts();
2227 returnval->m_numLocalCoeffs = nverts;
2238 for (i = 0; i < nelmts; ++i)
2240 for (j = 0; j < (*exp)[i]->GetNverts(); ++j)
2242 returnval->m_localToGlobalMap[cnt] =
2243 returnval->m_localToGlobalBndMap[cnt] =
2245 GlobCoeffs[returnval->m_localToGlobalMap[cnt]] = 1;
2248 if ((returnval->m_localToGlobalMap[cnt]) <
2251 returnval->m_numLocalDirBndCoeffs++;
2255 cnt1 += (*exp)[i]->GetNcoeffs();
2262 if (GlobCoeffs[i] != -1)
2264 GlobCoeffs[i] = cnt++;
2269 returnval->m_numGlobalCoeffs = cnt;
2274 if (GlobCoeffs[i] != -1)
2276 returnval->m_numGlobalDirBndCoeffs++;
2285 int nglocoeffs = returnval->m_numGlobalCoeffs;
2286 returnval->m_globalToUniversalMap
2288 returnval->m_globalToUniversalMapUnique
2292 for (i = 0; i < nverts; ++i)
2294 cnt = returnval->m_localToGlobalMap[i];
2295 returnval->m_localToGlobalMap[i] = GlobCoeffs[cnt];
2297 returnval->m_globalToUniversalMap[GlobCoeffs[cnt]] =
2303 for (
unsigned int i = 0; i < nglocoeffs; ++i)
2305 tmp[i] = returnval->m_globalToUniversalMap[i];
2307 returnval->m_gsh =
Gs::Init(tmp, vCommRow);
2309 for (
unsigned int i = 0; i < nglocoeffs; ++i)
2311 returnval->m_globalToUniversalMapUnique[i]
2312 = (tmp[i] >= 0 ? 1 : 0);
2317 for (i = 0; i < nverts; ++i)
2319 cnt = returnval->m_localToGlobalMap[i];
2320 returnval->m_localToGlobalMap[i] = GlobCoeffs[cnt];
2353 for(j = 0; j < locSize; j++)
2368 bwidth = (bwidth>(maxId-minId))?bwidth:(maxId-minId);
2433 if(global.data() == loc.data())
2468 if(global.data() == loc.data())
2500 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)