53 namespace MultiRegions
65 DisContField::DisContField():
67 m_bndCondExpansions(),
89 const std::string &variable,
90 const bool SetUpJustDG,
91 const bool DeclareCoeffPhysArrays,
93 :
ExpList(pSession,graph,DeclareCoeffPhysArrays, variable, ImpType),
96 if (variable.compare(
"DefaultVar") != 0)
101 DeclareCoeffPhysArrays);
102 if(DeclareCoeffPhysArrays)
125 for(
int e = 0; e < locExpList->GetExpSize(); ++e)
127 (*m_exp)[ElmtID[cnt+e]]->SetTraceExp
128 (TraceID[cnt+e], locExpList->GetExp(e));
129 locExpList->GetExp(e)->SetAdjacentElementExp
130 (TraceID[cnt+e], (*
m_exp)[ElmtID[cnt+e]]);
135 if(
m_session->DefinesSolverInfo(
"PROJECTION"))
137 std::string ProjectStr =
139 if((ProjectStr ==
"MixedCGDG") ||
140 (ProjectStr ==
"Mixed_CG_Discontinuous"))
182 periodicTraces, variable);
184 if (
m_session->DefinesCmdLineArgument(
"verbose"))
198 for (
int i = 0; i <
m_exp->size(); ++i)
200 for (
int j = 0; j < (*m_exp)[i]->GetNtraces(); ++j)
204 exp->SetAdjacentElementExp(j, (*
m_exp)[i]);
205 (*m_exp)[i]->SetTraceExp (j, exp);
223 (
m_traceMap->GetBndCondIDToGlobalTraceID(cnt+v));
230 std::unordered_map<int,pair<int,int> > perTraceToExpMap;
231 for (cnt = n = 0; n <
m_exp->size(); ++n)
233 for (
int v = 0; v < (*m_exp)[n]->GetNtraces(); ++v, ++cnt)
235 auto it = periodicTraces.find
236 ((*
m_exp)[n]->GetGeom()->GetTid(v));
238 if (it != periodicTraces.end())
240 perTraceToExpMap[it->first] = make_pair(n,v);
249 for (cnt = n = 0; n <
m_exp->size(); ++n)
251 for (
int v = 0; v < (*m_exp)[n]->GetNtraces(); ++v, ++cnt)
259 for (cnt = n = 0; n <
m_exp->size(); ++n)
261 for (
int v = 0; v < (*m_exp)[n]->GetNtraces(); ++v, ++cnt)
263 int GeomId = (*m_exp)[n]->GetGeom()->GetTid(v);
266 auto it = periodicTraces.find(GeomId);
268 if (it != periodicTraces.end())
271 auto it2 = perTraceToExpMap.find(ent.
id);
273 if (it2 == perTraceToExpMap.end())
275 if (
m_session->GetComm()->GetRowComm()->GetSize()
282 ASSERTL1(
false,
"Periodic trace not found!");
287 "Periodic trace in non-forward space?");
289 int offset =
m_trace->GetPhys_Offset
291 [n][v]->GetElmtId());
293 int offset2 =
m_trace->GetPhys_Offset
296 [it2->second.second]->GetElmtId());
311 int nquad = elmtToTrace[n][v]->GetNumPoints(0);
313 vector<int> tmpBwd(nquad);
314 vector<int> tmpFwd(nquad);
318 for (
int i = 0; i < nquad; ++i)
320 tmpBwd[i] = offset2 + i;
321 tmpFwd[i] = offset + i;
326 for (
int i = 0; i < nquad; ++i)
328 tmpBwd[i] = offset2 + i;
329 tmpFwd[i] = offset + nquad - i - 1;
333 for (
int i = 0; i < nquad; ++i)
344 int nquad1 = elmtToTrace[n][v]->GetNumPoints(0);
345 int nquad2 = elmtToTrace[n][v]->GetNumPoints(1);
347 vector<int> tmpBwd(nquad1*nquad2);
348 vector<int> tmpFwd(nquad1*nquad2);
355 for (
int i = 0; i < nquad2; ++i)
357 for (
int j = 0; j < nquad1; ++j)
359 tmpBwd[i*nquad1+j] = offset2 + i*nquad1+j;
360 tmpFwd[i*nquad1+j] = offset + j*nquad2+i;
366 for (
int i = 0; i < nquad2; ++i)
368 for (
int j = 0; j < nquad1; ++j)
370 tmpBwd[i*nquad1+j] = offset2 + i*nquad1+j;
371 tmpFwd[i*nquad1+j] = offset + i*nquad1+j;
382 for (
int i = 0; i < nquad2; ++i)
384 for (
int j = 0; j < nquad1/2; ++j)
386 swap(tmpFwd[i*nquad1 + j],
387 tmpFwd[i*nquad1 + nquad1-j-1]);
398 for (
int j = 0; j < nquad1; ++j)
400 for (
int i = 0; i < nquad2/2; ++i)
402 swap(tmpFwd[i*nquad1 + j],
403 tmpFwd[(nquad2-i-1)*nquad1 + j]);
408 for (
int i = 0; i < nquad1*nquad2; ++i)
437 if (traceEl->GetLeftAdjacentElementTrace () == -1 ||
438 traceEl->GetRightAdjacentElementTrace() == -1)
451 else if (traceEl->GetLeftAdjacentElementTrace () != -1 &&
452 traceEl->GetRightAdjacentElementTrace() != -1)
455 fwd = (traceEl->GetLeftAdjacentElementExp().get())
456 == (*
m_exp)[n].get();
460 ASSERTL2(
false,
"Unconnected trace element!");
473 const std::string &variable)
479 map<int,int> GeometryToRegionsMap;
487 for(
auto &it : bregions)
489 for (
auto &bregionIt : *it.second)
493 int id = bregionIt.second->m_geomVec[0]->GetGlobalID();
494 GeometryToRegionsMap[id] = it.first;
498 map<int,SpatialDomains::GeometrySharedPtr> EndOfDomain;
501 for(
auto &domIt : domain)
504 for(
int i = 0; i < geomvector->m_geomVec.size(); ++i)
506 for(
int j = 0; j < 2; ++j)
508 int vid = geomvector->m_geomVec[i]->GetVid(j);
509 if(EndOfDomain.count(vid) == 0)
511 EndOfDomain[vid] = geomvector->m_geomVec[i]->GetVertex(j);
515 EndOfDomain.erase(vid);
520 ASSERTL1(EndOfDomain.size() == 2,
"Did not find two ends of domain");
523 for(
auto ®It : EndOfDomain)
525 if(GeometryToRegionsMap.count(regIt.first) != 0)
528 auto iter = GeometryToRegionsMap.find(regIt.first);
529 ASSERTL1(iter != GeometryToRegionsMap.end(),
530 "Failied to find GeometryToRegionMap");
532 int regionId = iter->second;
533 auto bregionsIter = bregions.find(regionId);
534 ASSERTL1(bregionsIter != bregions.end(),
535 "Failed to find boundary region");
538 bregionsIter->second;
539 returnval->AddBoundaryRegions(regionId, breg);
541 auto bconditionsIter = bconditions.find(regionId);
542 ASSERTL1(bconditionsIter != bconditions.end(),
543 "Failed to find boundary collection");
546 bconditionsIter->second;
547 returnval->AddBoundaryConditions(regionId,bcond);
557 gvec->m_geomVec.push_back(regIt.second);
558 (*breg)[regIt.first] = gvec;
560 returnval->AddBoundaryRegions(bregions.size()+numNewBc,breg);
566 (*bCondition)[variable] = notDefinedCondition;
568 returnval->AddBoundaryConditions(bregions.size()+numNewBc,bCondition);
589 const std::string &variable,
590 bool SetToOneSpaceDimension,
592 ExpList(pSession,domain,graph1D,true,variable,
593 SetToOneSpaceDimension, pSession->GetComm(),ImpType)
595 if (variable.compare(
"DefaultVar") != 0)
614 const bool DeclareCoeffPhysArrays):
615 ExpList(In,DeclareCoeffPhysArrays),
616 m_bndCondExpansions(In.m_bndCondExpansions),
617 m_bndConditions(In.m_bndConditions),
618 m_globalBndMat(In.m_globalBndMat),
619 m_traceMap(In.m_traceMap),
620 m_boundaryTraces(In.m_boundaryTraces),
621 m_periodicVerts(In.m_periodicVerts),
622 m_periodicFwdCopy(In.m_periodicFwdCopy),
623 m_periodicBwdCopy(In.m_periodicBwdCopy),
624 m_leftAdjacentTraces(In.m_leftAdjacentTraces),
625 m_locTraceToTraceMap (In.m_locTraceToTraceMap)
630 (*In.
m_trace,DeclareCoeffPhysArrays);
642 const std::string &variable,
643 const bool SetUpJustDG,
644 const bool DeclareCoeffPhysArrays):
645 ExpList(In,DeclareCoeffPhysArrays)
652 if(variable.compare(
"DefaultVar") != 0)
657 if (DeclareCoeffPhysArrays)
685 for(e = 0; e < locExpList->GetExpSize(); ++e)
687 (*m_exp)[ElmtID[cnt+e]]->SetTraceExp
688 (TraceID[cnt+e], locExpList->GetExp(e));
689 locExpList->GetExp(e)->SetAdjacentElementExp
690 (TraceID[cnt+e], (*
m_exp)[ElmtID[cnt+e]]);
697 if (
m_session->DefinesSolverInfo(
"PROJECTION"))
699 std::string ProjectStr =
702 if ((ProjectStr ==
"MixedCGDG") ||
703 (ProjectStr ==
"Mixed_CG_Discontinuous"))
732 if (SetUpJustDG ==
false)
746 for (e = 0; e < locExpList->GetExpSize(); ++e)
748 (*m_exp)[ElmtID[cnt+e]]->SetTraceExp
749 (TraceID[cnt+e], locExpList->GetExp(e));
750 locExpList->GetExp(e)->SetAdjacentElementExp
751 (TraceID[cnt+e], (*
m_exp)[ElmtID[cnt+e]]);
799 const std::string variable,
800 const bool DeclareCoeffPhysArrays)
818 for (
auto &it : bregions)
824 DeclareCoeffPhysArrays, variable,
825 false, bc->GetComm());
836 || boost::iequals(type,
"I") || boost::iequals(type,
"CalcBC"))
854 const std::string variable)
869 int i, region1ID, region2ID;
872 map<int,int> BregionToVertMap;
876 for (
auto &it : bregions)
881 if (locBCond->GetBoundaryConditionType()
886 int id = it.second->begin()->second->
887 m_geomVec[0]->GetGlobalID();
889 BregionToVertMap[it.first] = id;
894 int n = vComm->GetSize();
895 int p = vComm->GetRank();
898 nregions[
p] = BregionToVertMap.size();
905 for (i = 1; i < n; ++i)
907 regOffset[i] = regOffset[i-1] + nregions[i-1];
914 for (
auto &iit : BregionToVertMap)
916 bregid [i ] = iit.first;
917 bregmap[i++] = iit.second;
918 islocal.insert(iit.first);
924 for (
int i = 0; i < totRegions; ++i)
926 BregionToVertMap[bregid[i]] = bregmap[i];
930 for (
auto &it : bregions)
935 if (locBCond->GetBoundaryConditionType()
942 region1ID = it.first;
943 region2ID = std::static_pointer_cast<
945 locBCond)->m_connectedBoundaryRegion;
947 ASSERTL0(BregionToVertMap.count(region1ID) != 0,
948 "Cannot determine vertex of region1ID");
950 ASSERTL0(BregionToVertMap.count(region2ID) != 0,
951 "Cannot determine vertex of region2ID");
955 islocal.count(region2ID) != 0);
963 int region1ID, region2ID, i, j, k, cnt;
967 m_graph->GetCompositeOrdering();
969 m_graph->GetBndRegionOrdering();
977 map<int,int> perComps;
978 map<int,vector<int>> allVerts;
980 map<int, pair<int, StdRegions::Orientation>> allEdges;
983 for(i = 0; i < (*m_exp).size(); ++i)
985 for(j = 0; j < (*m_exp)[i]->GetNverts(); ++j)
987 int id = (*m_exp)[i]->GetGeom()->GetVid(j);
993 for (
auto &it : bregions)
996 bconditions, it.first, variable);
998 if (locBCond->GetBoundaryConditionType()
1005 region1ID = it.first;
1006 region2ID = std::static_pointer_cast<
1008 locBCond)->m_connectedBoundaryRegion;
1013 if (vComm->GetSize() == 1)
1015 cId1 = it.second->begin()->first;
1016 cId2 = bregions.find(region2ID)->second->begin()->first;
1020 cId1 = bndRegOrder.find(region1ID)->second[0];
1021 cId2 = bndRegOrder.find(region2ID)->second[0];
1025 "Boundary region "+boost::lexical_cast<string>(
1026 region1ID)+
" should only contain 1 composite.");
1028 vector<unsigned int> tmpOrder;
1033 c = it.second->begin()->second;
1035 for (i = 0; i < c->m_geomVec.size(); ++i)
1038 std::dynamic_pointer_cast<
1040 ASSERTL0(segGeom,
"Unable to cast to shared ptr");
1043 m_graph->GetElementsFromEdge(segGeom);
1045 "The periodic boundaries belong to "
1046 "more than one element of the mesh");
1049 std::dynamic_pointer_cast
1052 allEdges[c->m_geomVec[i]->GetGlobalID()] =
1053 make_pair(elmt->at(0).second,
1054 geom->GetEorient(elmt->at(0).second));
1058 if (vComm->GetSize() == 1)
1060 tmpOrder.push_back(c->m_geomVec[i]->GetGlobalID());
1063 vector<int> vertList(2);
1064 vertList[0] = segGeom->GetVid(0);
1065 vertList[1] = segGeom->GetVid(1);
1066 allVerts[c->m_geomVec[i]->GetGlobalID()] = vertList;
1069 if (vComm->GetSize() == 1)
1071 compOrder[it.second->begin()->first] = tmpOrder;
1077 if (perComps.count(cId1) == 0)
1079 if (perComps.count(cId2) == 0)
1081 perComps[cId1] = cId2;
1085 std::stringstream ss;
1086 ss <<
"Boundary region " << cId2 <<
" should be "
1087 <<
"periodic with " << perComps[cId2] <<
" but "
1088 <<
"found " << cId1 <<
" instead!";
1089 ASSERTL0(perComps[cId2] == cId1, ss.str());
1094 std::stringstream ss;
1095 ss <<
"Boundary region " << cId1 <<
" should be "
1096 <<
"periodic with " << perComps[cId1] <<
" but "
1097 <<
"found " << cId2 <<
" instead!";
1098 ASSERTL0(perComps[cId1] == cId1, ss.str());
1104 int n = vComm->GetSize();
1105 int p = vComm->GetRank();
1111 edgecounts[
p] = allEdges.size();
1115 for (i = 1; i < n; ++i)
1117 edgeoffset[i] = edgeoffset[i-1] + edgecounts[i-1];
1126 auto sIt = allEdges.begin();
1128 for (i = 0; sIt != allEdges.end(); ++sIt)
1130 edgeIds [edgeoffset[
p] + i ] = sIt->first;
1131 edgeIdx [edgeoffset[
p] + i ] = sIt->second.first;
1132 edgeOrient[edgeoffset[
p] + i ] = sIt->second.second;
1133 edgeVerts [edgeoffset[
p] + i++] = allVerts[sIt->first].size();
1156 for (i = 0; i < n; ++i)
1158 if (edgecounts[i] > 0)
1161 edgecounts[i], edgeVerts + edgeoffset[i], 1);
1170 for (i = 1; i < n; ++i)
1172 vertoffset[i] = vertoffset[i-1] + procVerts[i-1];
1176 for (i = 0, sIt = allEdges.begin(); sIt != allEdges.end(); ++sIt)
1178 for (j = 0; j < allVerts[sIt->first].size(); ++j)
1180 traceIds[vertoffset[
p] + i++] = allVerts[sIt->first][j];
1187 map<int, StdRegions::Orientation> orientMap;
1188 map<int, vector<int> > vertMap;
1190 for (cnt = i = 0; i < totEdges; ++i)
1192 ASSERTL0(orientMap.count(edgeIds[i]) == 0,
1193 "Already found edge in orientation map!");
1213 orientMap[edgeIds[i]] = o;
1215 vector<int> verts(edgeVerts[i]);
1217 for (j = 0; j < edgeVerts[i]; ++j)
1219 verts[j] = traceIds[cnt++];
1221 vertMap[edgeIds[i]] = verts;
1228 map<int,int> allCompPairs;
1237 for (
auto &cIt : perComps)
1240 const int id1 = cIt.first;
1241 const int id2 = cIt.second;
1242 std::string id1s = boost::lexical_cast<string>(id1);
1243 std::string id2s = boost::lexical_cast<string>(id2);
1245 if (compMap.count(id1) > 0)
1247 c[0] = compMap[id1];
1250 if (compMap.count(id2) > 0)
1252 c[1] = compMap[id2];
1256 "Both composites not found on this process!");
1261 map<int,int> compPairs;
1264 "Unable to find composite "+id1s+
" in order map.");
1266 "Unable to find composite "+id2s+
" in order map.");
1267 ASSERTL0(compOrder[id1].size() == compOrder[id2].size(),
1268 "Periodic composites "+id1s+
" and "+id2s+
1269 " should have the same number of elements.");
1270 ASSERTL0(compOrder[id1].size() > 0,
1271 "Periodic composites "+id1s+
" and "+id2s+
1275 for (i = 0; i < compOrder[id1].size(); ++i)
1277 int eId1 = compOrder[id1][i];
1278 int eId2 = compOrder[id2][i];
1280 ASSERTL0(compPairs.count(eId1) == 0,
1283 if (compPairs.count(eId2) != 0)
1285 ASSERTL0(compPairs[eId2] == eId1,
"Pairing incorrect");
1287 compPairs[eId1] = eId2;
1293 for (i = 0; i < 2; ++i)
1300 if (c[i]->m_geomVec.size() > 0)
1302 for (j = 0; j < c[i]->m_geomVec.size(); ++j)
1304 locEdges.insert(c[i]->m_geomVec[j]->GetGlobalID());
1310 for (
auto &pIt : compPairs)
1312 int ids [2] = {pIt.first, pIt.second};
1313 bool local[2] = {locEdges.count(pIt.first) > 0,
1314 locEdges.count(pIt.second) > 0};
1316 ASSERTL0(orientMap.count(ids[0]) > 0 &&
1317 orientMap.count(ids[1]) > 0,
1318 "Unable to find edge in orientation map.");
1320 allCompPairs[pIt.first ] = pIt.second;
1321 allCompPairs[pIt.second] = pIt.first;
1323 for (i = 0; i < 2; ++i)
1330 int other = (i+1) % 2;
1333 orientMap[ids[i]] == orientMap[ids[other]] ?
1342 for (i = 0; i < 2; ++i)
1344 int other = (i+1) % 2;
1347 orientMap[ids[i]] == orientMap[ids[other]] ?
1352 vector<int> perVerts1 = vertMap[ids[i]];
1353 vector<int> perVerts2 = vertMap[ids[other]];
1355 map<int, pair<int, bool> > tmpMap;
1358 tmpMap[perVerts1[0]] = make_pair(perVerts2[0],
1359 locVerts.count(perVerts2[0]) > 0);
1360 tmpMap[perVerts1[1]] = make_pair(perVerts2[1],
1361 locVerts.count(perVerts2[1]) > 0);
1365 tmpMap[perVerts1[0]] = make_pair(perVerts2[1],
1366 locVerts.count(perVerts2[1]) > 0);
1367 tmpMap[perVerts1[1]] = make_pair(
1368 perVerts2[0], locVerts.count(perVerts2[0]) > 0);
1371 for (
auto &mIt : tmpMap)
1377 auto perIt = periodicVerts.find(mIt.first);
1379 if (perIt == periodicVerts.end())
1381 periodicVerts[mIt.first].push_back(ent2);
1382 perIt = periodicVerts.find(mIt.first);
1387 for (j = 0; j < perIt->second.size(); ++j)
1389 if (perIt->second[j].id ==
1399 perIt->second.push_back(ent2);
1410 int NPairs = allCompPairs.size();
1416 allCompPairs.size() == NPairs || allCompPairs.size() == 0,
1417 "Local copy of allCompPairs not the same for all ranks"
1425 for(
const auto &it : allCompPairs)
1427 first[cnt] = it.first;
1428 second[cnt++] = it.second;
1436 ASSERTL0(std::count(first.begin(), first.end(), -1) == 0,
1437 "Distribution of allCompPairs failed");
1438 ASSERTL0(std::count(second.begin(), second.end(), -1) == 0,
1439 "Distribution of allCompParis failed")
1442 allCompPairs.clear();
1443 for(cnt = 0; cnt < NPairs; ++cnt)
1445 allCompPairs[first[cnt]] = second[cnt];
1451 for (cnt = i = 0; i < totEdges; ++i)
1453 int edgeId = edgeIds[i];
1455 ASSERTL0(allCompPairs.count(edgeId) > 0,
1456 "Unable to find matching periodic edge.");
1458 int perEdgeId = allCompPairs[edgeId];
1460 for (j = 0; j < edgeVerts[i]; ++j, ++cnt)
1462 int vId = traceIds[cnt];
1464 auto perId = periodicVerts.find(vId);
1466 if (perId == periodicVerts.end())
1475 orientMap[edgeId] == orientMap[perEdgeId] ?
1476 vertMap[perEdgeId][(j+1)%2]:
1477 vertMap[perEdgeId][j];
1481 locVerts.count(perVertexId) > 0);
1483 periodicVerts[vId].push_back(ent);
1490 for (
auto &perIt : periodicVerts)
1493 for (i = 0; i < perIt.second.size(); ++i)
1495 auto perIt2 = periodicVerts.find(perIt.second[i].id);
1496 ASSERTL0(perIt2 != periodicVerts.end(),
1497 "Couldn't find periodic vertex.");
1499 for (j = 0; j < perIt2->second.size(); ++j)
1501 if (perIt2->second[j].id == perIt.first)
1507 for (k = 0; k < perIt.second.size(); ++k)
1509 if (perIt2->second[j].id == perIt.second[k].id)
1518 perIt.second.push_back(perIt2->second[j]);
1526 for (
auto &perIt : periodicVerts)
1528 if (locVerts.count(perIt.first) > 0)
1538 m_graph->GetCompositeOrdering();
1540 m_graph->GetBndRegionOrdering();
1556 map<int,RotPeriodicInfo> rotComp;
1557 map<int,int> perComps;
1558 map<int,vector<int> > allVerts;
1559 map<int,SpatialDomains::PointGeomVector> allCoord;
1560 map<int,vector<int> > allEdges;
1561 map<int,vector<StdRegions::Orientation> > allOrient;
1566 int region1ID, region2ID, i, j, k, cnt;
1570 for(i = 0; i < (*m_exp).size(); ++i)
1572 for(j = 0; j < (*m_exp)[i]->GetNverts(); ++j)
1574 int id = (*m_exp)[i]->GetGeom()->GetVid(j);
1575 locVerts.insert(
id);
1578 for(j = 0; j < (*m_exp)[i]->GetGeom()->GetNumEdges(); ++j)
1580 int id = (*m_exp)[i]->GetGeom()->GetEid(j);
1581 locEdges.insert(
id);
1588 for (
auto &it : bregions)
1592 (bconditions, it.first, variable);
1594 if (locBCond->GetBoundaryConditionType()
1601 region1ID = it.first;
1602 region2ID = std::static_pointer_cast<
1604 (locBCond)->m_connectedBoundaryRegion;
1608 "Boundary region "+boost::lexical_cast<string>
1609 (region1ID)+
" should only contain 1 composite.");
1617 if (vComm->GetSize() == 1)
1619 cId1 = it.second->begin()->first;
1620 cId2 = bregions.find(region2ID)->second->begin()->first;
1624 cId1 = bndRegOrder.find(region1ID)->second[0];
1625 cId2 = bndRegOrder.find(region2ID)->second[0];
1629 if(boost::icontains(locBCond->GetUserDefined(),
"Rotated"))
1631 vector<string> tmpstr;
1633 boost::split(tmpstr,locBCond->GetUserDefined(),
1634 boost::is_any_of(
":"));
1636 if(boost::iequals(tmpstr[0],
"Rotated"))
1639 "Expected Rotated user defined string to "
1640 "contain direction and rotation angle "
1641 "and optionally a tolerance, "
1642 "i.e. Rotated:dir:PI/2:1e-6");
1645 ASSERTL1((tmpstr[1] ==
"x")||(tmpstr[1] ==
"y")
1646 ||(tmpstr[1] ==
"z"),
"Rotated Dir is "
1647 "not specified as x,y or z");
1650 RotInfo.
m_dir = (tmpstr[1] ==
"x")? 0:
1651 (tmpstr[1] ==
"y")? 1:2;
1657 if(tmpstr.size() == 4)
1660 RotInfo.
m_tol = boost::lexical_cast
1665 "failed to cast tolerance input "
1666 "to a double value in Rotated"
1667 "boundary information");
1672 RotInfo.
m_tol = 1e-8;
1674 rotComp[cId1] = RotInfo;
1680 vector<unsigned int> tmpOrder;
1688 for (i = 0; i < c->m_geomVec.size(); ++i)
1691 std::dynamic_pointer_cast<
1693 ASSERTL1(faceGeom,
"Unable to cast to shared ptr");
1696 int faceId = c->m_geomVec[i]->GetGlobalID();
1697 locFaces.insert(faceId);
1701 if (vComm->GetSize() == 1)
1703 tmpOrder.push_back(c->m_geomVec[i]->GetGlobalID());
1708 vector<int> vertList, edgeList;
1710 vector<StdRegions::Orientation> orientVec;
1711 for (j = 0; j < faceGeom->GetNumVerts(); ++j)
1713 vertList .push_back(faceGeom->GetVid (j));
1714 edgeList .push_back(faceGeom->GetEid (j));
1715 coordVec .push_back(faceGeom->GetVertex(j));
1716 orientVec.push_back(faceGeom->GetEorient(j));
1719 allVerts [faceId] = vertList;
1720 allEdges [faceId] = edgeList;
1721 allCoord [faceId] = coordVec;
1722 allOrient[faceId] = orientVec;
1727 if (vComm->GetSize() == 1)
1729 compOrder[it.second->begin()->first] = tmpOrder;
1735 if (perComps.count(cId1) == 0)
1737 if (perComps.count(cId2) == 0)
1739 perComps[cId1] = cId2;
1743 std::stringstream ss;
1744 ss <<
"Boundary region " << cId2 <<
" should be "
1745 <<
"periodic with " << perComps[cId2] <<
" but "
1746 <<
"found " << cId1 <<
" instead!";
1747 ASSERTL0(perComps[cId2] == cId1, ss.str());
1752 std::stringstream ss;
1753 ss <<
"Boundary region " << cId1 <<
" should be "
1754 <<
"periodic with " << perComps[cId1] <<
" but "
1755 <<
"found " << cId2 <<
" instead!";
1756 ASSERTL0(perComps[cId1] == cId1, ss.str());
1762 int n = vComm->GetSize();
1763 int p = vComm->GetRank();
1773 rotcounts[
p] = rotComp.size();
1779 for (i = 1; i < n ; ++i)
1781 rotoffset[i] = rotoffset[i-1] + rotcounts[i-1];
1790 auto rIt = rotComp.begin();
1792 for(i = 0; rIt != rotComp.end(); ++rIt)
1794 compid [rotoffset[
p] + i ] = rIt->first;
1795 rotdir [rotoffset[
p] + i ] = rIt->second.m_dir;
1796 rotangle[rotoffset[
p] + i ] = rIt->second.m_angle;
1797 rottol [rotoffset[
p] + i++] = rIt->second.m_tol;
1806 for(i =0; i < totrot; ++i)
1810 rotComp[compid[i]] = rinfo;
1815 facecounts[
p] = locFaces.size();
1821 for (i = 1; i < n; ++i)
1823 faceoffset[i] = faceoffset[i-1] + facecounts[i-1];
1837 auto sIt = locFaces.begin();
1838 for (i = 0; sIt != locFaces.end(); ++sIt)
1840 faceIds [faceoffset[
p] + i ] = *sIt;
1841 faceVerts[faceoffset[
p] + i++] = allVerts[*sIt].size();
1864 for (i = 0; i < n; ++i)
1866 if (facecounts[i] > 0)
1869 (facecounts[i], faceVerts + faceoffset[i], 1);
1880 for (i = 1; i < n; ++i)
1882 vertoffset[i] = vertoffset[i-1] + procVerts[i-1];
1896 for (cnt = 0, sIt = locFaces.begin();
1897 sIt != locFaces.end(); ++sIt)
1899 for (j = 0; j < allVerts[*sIt].size(); ++j)
1901 int vertId = allVerts[*sIt][j];
1902 vertIds[vertoffset[
p] + cnt ] = vertId;
1903 vertX [vertoffset[
p] + cnt ] = (*allCoord[*sIt][j])(0);
1904 vertY [vertoffset[
p] + cnt ] = (*allCoord[*sIt][j])(1);
1905 vertZ [vertoffset[
p] + cnt ] = (*allCoord[*sIt][j])(2);
1906 edgeIds[vertoffset[
p] + cnt ] = allEdges [*sIt][j];
1907 edgeOrt[vertoffset[
p] + cnt++] = allOrient[*sIt][j];
1922 map<int, vector<int> > vertMap;
1923 map<int, vector<int> > edgeMap;
1924 map<int, SpatialDomains::PointGeomVector> coordMap;
1930 map<int, SpatialDomains::PointGeomSharedPtr> vCoMap;
1931 map<int, pair<int, int> > eIdMap;
1933 for (cnt = i = 0; i < totFaces; ++i)
1935 vector<int> edges(faceVerts[i]);
1936 vector<int> verts(faceVerts[i]);
1942 for (j = 0; j < faceVerts[i]; ++j, ++cnt)
1944 edges[j] = edgeIds[cnt];
1945 verts[j] = vertIds[cnt];
1948 vertY[cnt], vertZ[cnt]);
1949 vCoMap[vertIds[cnt]] = coord[j];
1952 auto testIns = eIdMap.insert
1953 ( make_pair( edgeIds[cnt], make_pair(vertIds[tmp+j],
1954 vertIds[tmp+((j+1) % faceVerts[i])])));
1956 if (testIns.second ==
false)
1978 swap(testIns.first->second.first,
1979 testIns.first->second.second);
1983 vertMap [faceIds[i]] = verts;
1984 edgeMap [faceIds[i]] = edges;
1985 coordMap[faceIds[i]] = coord;
2003 map<int, map<StdRegions::Orientation, vector<int> > > vmap;
2004 map<int, map<StdRegions::Orientation, vector<int> > > emap;
2006 map<StdRegions::Orientation, vector<int> > quadVertMap;
2016 map<StdRegions::Orientation, vector<int> > quadEdgeMap;
2026 map<StdRegions::Orientation, vector<int> > triVertMap;
2030 map<StdRegions::Orientation, vector<int> > triEdgeMap;
2034 vmap[3] = triVertMap;
2035 vmap[4] = quadVertMap;
2036 emap[3] = triEdgeMap;
2037 emap[4] = quadEdgeMap;
2039 map<int,int> allCompPairs;
2042 map<int,int> fIdToCompId;
2047 for (
auto &cIt : perComps)
2050 const int id1 = cIt.first;
2051 const int id2 = cIt.second;
2052 std::string id1s = boost::lexical_cast<string>(id1);
2053 std::string id2s = boost::lexical_cast<string>(id2);
2055 if (compMap.count(id1) > 0)
2057 c[0] = compMap[id1];
2060 if (compMap.count(id2) > 0)
2062 c[1] = compMap[id2];
2066 "Neither composite not found on this process!");
2071 map<int,int> compPairs;
2075 "Unable to find composite "+id1s+
" in order map.");
2077 "Unable to find composite "+id2s+
" in order map.");
2078 ASSERTL0(compOrder[id1].size() == compOrder[id2].size(),
2079 "Periodic composites "+id1s+
" and "+id2s+
2080 " should have the same number of elements.");
2081 ASSERTL0(compOrder[id1].size() > 0,
2082 "Periodic composites "+id1s+
" and "+id2s+
2086 for (i = 0; i < compOrder[id1].size(); ++i)
2088 int eId1 = compOrder[id1][i];
2089 int eId2 = compOrder[id2][i];
2091 ASSERTL0(compPairs.count(eId1) == 0,
2095 if (compPairs.count(eId2) != 0)
2097 ASSERTL0(compPairs[eId2] == eId1,
"Pairing incorrect");
2099 compPairs[eId1] = eId2;
2102 fIdToCompId[eId1] = id1;
2103 fIdToCompId[eId2] = id2;
2109 for (
auto &pIt : compPairs)
2111 int ids [2] = {pIt.first, pIt.second};
2112 bool local[2] = {locFaces.count(pIt.first) > 0,
2113 locFaces.count(pIt.second) > 0};
2115 ASSERTL0(coordMap.count(ids[0]) > 0 &&
2116 coordMap.count(ids[1]) > 0,
2117 "Unable to find face in coordinate map");
2119 allCompPairs[pIt.first ] = pIt.second;
2120 allCompPairs[pIt.second] = pIt.first;
2125 = { coordMap[ids[0]], coordMap[ids[1]] };
2127 ASSERTL0(tmpVec[0].size() == tmpVec[1].size(),
2128 "Two periodic faces have different number "
2137 bool rotbnd =
false;
2144 if(rotComp.count(fIdToCompId[pIt.first]))
2147 dir = rotComp[fIdToCompId[pIt.first]].m_dir;
2148 angle = rotComp[fIdToCompId[pIt.first]].m_angle;
2149 tol = rotComp[fIdToCompId[pIt.first]].m_tol;
2153 for (i = 0; i < 2; ++i)
2161 int other = (i+1) % 2;
2164 sign = (i == 0)? 1.0:-1.0;
2167 if (tmpVec[0].size() == 3)
2170 (tmpVec[i], tmpVec[other],
2171 rotbnd, dir,
sign*angle, tol);
2176 tmpVec[i], tmpVec[other],
2177 rotbnd,dir,
sign*angle,tol);
2187 int nFaceVerts = vertMap[ids[0]].size();
2190 for (i = 0; i < 2; ++i)
2192 int other = (i+1) % 2;
2195 sign = (i == 0)? 1.0:-1.0;
2198 if (tmpVec[0].size() == 3)
2201 tmpVec[i], tmpVec[other], rotbnd, dir,
2207 tmpVec[i], tmpVec[other], rotbnd, dir,
2211 if (nFaceVerts == 3)
2215 "Unsupported face orientation for face "+
2216 boost::lexical_cast<string>(ids[i]));
2220 vector<int> per1 = vertMap[ids[i]];
2221 vector<int> per2 = vertMap[ids[other]];
2225 map<int, pair<int, bool> > tmpMap;
2229 for (j = 0; j < nFaceVerts; ++j)
2231 int v = vmap[nFaceVerts][o][j];
2232 tmpMap[per1[j]] = make_pair
2233 (per2[v], locVerts.count(per2[v]) > 0);
2237 for (
auto &mIt : tmpMap)
2244 auto perIt = periodicVerts.find(mIt.first);
2246 if (perIt == periodicVerts.end())
2250 periodicVerts[mIt.first].push_back(ent2);
2251 perIt = periodicVerts.find(mIt.first);
2258 for (k = 0; k < perIt->second.size(); ++k)
2260 if (perIt->second[k].id == mIt.second.first)
2266 if (k == perIt->second.size())
2268 perIt->second.push_back(ent2);
2276 for (i = 0; i < 2; ++i)
2278 int other = (i+1) % 2;
2281 sign = (i == 0)? 1.0:-1.0;
2283 if (tmpVec[0].size() == 3)
2286 tmpVec[i], tmpVec[other], rotbnd, dir,
2292 tmpVec[i], tmpVec[other], rotbnd, dir,
2296 vector<int> per1 = edgeMap[ids[i]];
2297 vector<int> per2 = edgeMap[ids[other]];
2299 map<int, pair<int, bool> > tmpMap;
2301 for (j = 0; j < nFaceVerts; ++j)
2303 int e = emap[nFaceVerts][o][j];
2304 tmpMap[per1[j]] = make_pair
2305 (per2[e], locEdges.count(per2[e]) > 0);
2308 for (
auto &mIt : tmpMap)
2315 auto perIt = periodicEdges.find(mIt.first);
2317 if (perIt == periodicEdges.end())
2319 periodicEdges[mIt.first].push_back(ent2);
2320 perIt = periodicEdges.find(mIt.first);
2324 for (k = 0; k < perIt->second.size(); ++k)
2326 if (perIt->second[k].id == mIt.second.first)
2332 if (k == perIt->second.size())
2334 perIt->second.push_back(ent2);
2344 ASSERTL1(allCompPairs.size() == fIdToCompId.size(),
2345 "At this point the size of allCompPairs "
2346 "should have been the same as fIdToCompId");
2351 int NPairs = allCompPairs.size();
2357 allCompPairs.size() == NPairs || allCompPairs.size() == 0,
2358 "Local copy of allCompPairs not the same for all ranks"
2366 for(
const auto &it : allCompPairs)
2368 first[cnt] = it.first;
2369 second[cnt++] = it.second;
2377 ASSERTL0(std::count(first.begin(), first.end(), -1) == 0,
2378 "Distribution of allCompPairs failed");
2379 ASSERTL0(std::count(second.begin(), second.end(), -1) == 0,
2380 "Distribution of allCompPairs failed")
2383 allCompPairs.clear();
2384 for(cnt = 0; cnt < NPairs; ++cnt)
2386 allCompPairs[first[cnt]] = second[cnt];
2393 std::fill(first.begin(), first.end(), -1);
2394 std::fill(second.begin(), second.end(), -1);
2397 for (
const auto &pIt : fIdToCompId)
2399 first [cnt ] = pIt.first;
2400 second[cnt++] = pIt.second;
2407 ASSERTL0(std::count(first.begin(), first.end(), -1) == 0,
2408 "Distribution of fIdToCompId failed");
2409 ASSERTL0(std::count(second.begin(), second.end(), -1) == 0,
2410 "Distribution of fIdToCompId failed")
2412 fIdToCompId.clear();
2413 for(cnt = 0; cnt < NPairs; ++cnt)
2415 fIdToCompId[first[cnt]] = second[cnt];
2420 map<int,int> eIdToCompId;
2426 for (cnt = i = 0; i < totFaces; ++i)
2428 bool rotbnd =
false;
2433 int faceId = faceIds[i];
2435 ASSERTL0(allCompPairs.count(faceId) > 0,
2436 "Unable to find matching periodic face.");
2438 int perFaceId = allCompPairs[faceId];
2442 fIdToCompId.count(faceId) > 0,
"Face " +
2443 boost::lexical_cast<string>(faceId) +
2444 " not found in fIdtoCompId map");
2445 if(rotComp.count(fIdToCompId[faceId]))
2448 dir = rotComp[fIdToCompId[faceId]].m_dir;
2449 angle = rotComp[fIdToCompId[faceId]].m_angle;
2450 tol = rotComp[fIdToCompId[faceId]].m_tol;
2453 for (j = 0; j < faceVerts[i]; ++j, ++cnt)
2455 int vId = vertIds[cnt];
2457 auto perId = periodicVerts.find(vId);
2459 if (perId == periodicVerts.end())
2468 = { coordMap[faceId], coordMap[perFaceId] };
2470 int nFaceVerts = tmpVec[0].size();
2473 tmpVec[0], tmpVec[1], rotbnd, dir, angle, tol):
2475 tmpVec[0], tmpVec[1], rotbnd, dir, angle, tol);
2479 int perVertexId = vertMap[perFaceId][vmap[nFaceVerts][o][j]];
2484 locVerts.count(perVertexId) > 0);
2486 periodicVerts[vId].push_back(ent);
2489 int eId = edgeIds[cnt];
2491 perId = periodicEdges.find(eId);
2496 eIdToCompId[eId] = fIdToCompId[faceId];
2499 if (perId == periodicEdges.end())
2507 = { coordMap[faceId], coordMap[perFaceId] };
2509 int nFaceEdges = tmpVec[0].size();
2512 tmpVec[0], tmpVec[1], rotbnd, dir, angle, tol):
2514 tmpVec[0], tmpVec[1], rotbnd, dir, angle, tol);
2518 int perEdgeId = edgeMap[perFaceId][emap[nFaceEdges][o][j]];
2522 locEdges.count(perEdgeId) > 0);
2524 periodicEdges[eId].push_back(ent);
2531 eIdToCompId[perEdgeId] = fIdToCompId[perFaceId];
2539 for (
auto &perIt : periodicVerts)
2542 for (i = 0; i < perIt.second.size(); ++i)
2545 auto perIt2 = periodicVerts.find(perIt.second[i].id);
2546 ASSERTL0(perIt2 != periodicVerts.end(),
2547 "Couldn't find periodic vertex.");
2552 for (j = 0; j < perIt2->second.size(); ++j)
2554 if (perIt2->second[j].id == perIt.first)
2559 for (k = 0; k < perIt.second.size(); ++k)
2561 if (perIt2->second[j].id == perIt.second[k].id)
2567 if (k == perIt.second.size())
2569 perIt.second.push_back(perIt2->second[j]);
2575 for (
auto &perIt : periodicEdges)
2577 for (i = 0; i < perIt.second.size(); ++i)
2579 auto perIt2 = periodicEdges.find(perIt.second[i].id);
2580 ASSERTL0(perIt2 != periodicEdges.end(),
2581 "Couldn't find periodic edge.");
2583 for (j = 0; j < perIt2->second.size(); ++j)
2585 if (perIt2->second[j].id == perIt.first)
2590 for (k = 0; k < perIt.second.size(); ++k)
2592 if (perIt2->second[j].id == perIt.second[k].id)
2598 if (k == perIt.second.size())
2600 perIt.second.push_back(perIt2->second[j]);
2607 for (
auto &perIt : periodicEdges)
2609 bool rotbnd =
false;
2616 auto eIt = eIdMap.find(perIt.first);
2618 *vCoMap[eIt->second.first],
2619 *vCoMap[eIt->second.second]
2623 if(rotComp.count(eIdToCompId[perIt.first]))
2626 dir = rotComp[eIdToCompId[perIt.first]].m_dir;
2627 angle = rotComp[eIdToCompId[perIt.first]].m_angle;
2628 tol = rotComp[eIdToCompId[perIt.first]].m_tol;
2634 for (i = 0; i < perIt.second.size(); ++i)
2636 eIt = eIdMap.find(perIt.second[i].id);
2639 *vCoMap[eIt->second.first],
2640 *vCoMap[eIt->second.second]
2643 int vMap[2] = {-1,-1};
2649 r.
Rotate(v[0],dir,angle);
2651 if(r.
dist(w[0])< tol)
2657 r.
Rotate(v[1],dir,angle);
2658 if(r.
dist(w[0]) < tol)
2665 "Unable to align rotationally "
2666 "periodic edge vertex");
2672 NekDouble cx = 0.5*(w[0](0)-v[0](0)+w[1](0)-v[1](0));
2673 NekDouble cy = 0.5*(w[0](1)-v[0](1)+w[1](1)-v[1](1));
2674 NekDouble cz = 0.5*(w[0](2)-v[0](2)+w[1](2)-v[1](2));
2676 for (j = 0; j < 2; ++j)
2681 for (k = 0; k < 2; ++k)
2687 if (
sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y)+(z1-z)*(z1-z))
2697 ASSERTL0(vMap[0] >= 0 && vMap[1] >= 0,
2698 "Unable to align periodic edge vertex.");
2699 ASSERTL0((vMap[0] == 0 || vMap[0] == 1) &&
2700 (vMap[1] == 0 || vMap[1] == 1) &&
2701 (vMap[0] != vMap[1]),
2702 "Unable to align periodic edge vertex.");
2716 for (
auto &perIt : periodicVerts)
2718 if (locVerts.count(perIt.first) > 0)
2724 for (
auto &perIt : periodicEdges)
2726 if (locEdges.count(perIt.first) > 0)
2734 ASSERTL1(
false,
"Not setup for this expansion");
2746 "Routine currently only tested for HybridDGHelmholtz");
2749 "Full matrix global systems are not supported for HDG "
2754 "The local to global map is not set up for the requested "
2763 (*m_globalBndMat)[mkey] = glo_matrix;
2767 glo_matrix = matrixIter->second;
2783 bool returnval =
true;
2802 int vSame = (returnval?1:0);
2805 return (vSame == 1);
2821 for(
int v = 0; v < 2; ++v)
2826 if(vertExp->GetLeftAdjacentElementExp()->GetGeom()
2828 (*m_exp)[i]->GetGeom()->GetGlobalID())
2876 bool PutFwdInBwdOnBCs,
2896 GetNFwdLocTracePts();
2909 for (
int n = 0, cnt = 0; n < nexp; ++n)
2914 for(
int e = 0; e < exp->GetNtraces(); ++e, ++cnt)
2916 auto offset =
m_trace->GetPhys_Offset(
2917 elmtToTrace[n][e]->GetElmtId());
2922 exp->GetTracePhysVals(e, elmtToTrace[n][e],
2923 field + phys_offset, e_tmp);
2938 m_traceMap->GetAssemblyCommDG()->PerformExchange(Fwd, Bwd);
2945 bool PutFwdInBwdOnBCs)
2948 if (PutFwdInBwdOnBCs)
2957 for (
int e = 0; e < ne; ++e)
2960 GetExp(e)->GetTotPoints();
2962 GetBndCondIDToGlobalTraceID(cnt+e));
2974 for (
int e = 0; e < ne; ++e)
2977 GetExp(e)->GetTotPoints();
2979 GetBndCondIDToGlobalTraceID(cnt+e));
2988 "Method not set up for this "
2989 "boundary condition.");
3001 for (
int e = 0; e < ne; ++e)
3006 ->GetPhys_Offset(e);
3008 GetBndCondIDToGlobalTraceID(cnt+e));
3011 [id1], 1, &Bwd[id2], 1);
3021 for(
int e = 0; e < ne; ++e)
3029 "Method not set up for non-zero "
3030 "Neumann boundary condition");
3031 auto id2 =
m_trace->GetPhys_Offset(
3032 m_traceMap->GetBndCondIDToGlobalTraceID(cnt+e));
3047 "Method not set up for this boundary "
3064 GetNLocTracePts(), 0.0);
3079 "v_AddTraceQuadPhysToField not coded for eGauss_Lagrange");
3117 PerformExchange(outarray, outarray);
3124 int n,
p,offset,phys_offset;
3131 "input array is of insufficient length");
3133 for (n = 0; n < nexp; ++n)
3137 for (
p = 0;
p < (*m_exp)[n]->GetNtraces(); ++
p)
3139 offset =
m_trace->GetPhys_Offset
3140 (elmtToTrace[n][
p]->GetElmtId());
3141 (*m_exp)[n]->GetTracePhysVals(
p,elmtToTrace[n][
p],
3142 inarray + phys_offset,
3143 t_tmp = outarray +offset);
3173 int n,offset, t_offset;
3183 int e_ncoeffs = (*m_exp)[n]->GetNcoeffs();
3188 if ((*
m_exp)[n]->GetBasis(0)->GetBasisType() !=
3191 t_offset =
GetTrace()->GetCoeff_Offset
3192 (elmtToTrace[n][0]->GetElmtId());
3193 if(negatedFluxNormal[2*n])
3195 outarray[offset] -= Fn[t_offset];
3199 outarray[offset] += Fn[t_offset];
3202 t_offset =
GetTrace()->GetCoeff_Offset
3203 (elmtToTrace[n][1]->GetElmtId());
3205 if(negatedFluxNormal[2*n+1])
3207 outarray[offset+(*m_exp)[n]->GetVertexMap(1)] -=
3212 outarray[offset+(*m_exp)[n]->GetVertexMap(1)] +=
3221 static int sav_ncoeffs = 0;
3222 if(!m_Ixm.get() || e_ncoeffs != sav_ncoeffs)
3235 m_Ixm = BASE->GetI(coords);
3238 m_Ixp = BASE->GetI(coords);
3240 sav_ncoeffs = e_ncoeffs;
3243 t_offset =
GetTrace()->GetCoeff_Offset
3244 (elmtToTrace[n][0]->GetElmtId());
3246 if(negatedFluxNormal[2*n])
3248 for (j = 0; j < e_ncoeffs; j++)
3250 outarray[offset + j] -=
3251 (m_Ixm->GetPtr())[j] * Fn[t_offset];
3256 for (j = 0; j < e_ncoeffs; j++)
3258 outarray[offset + j] +=
3259 (m_Ixm->GetPtr())[j] * Fn[t_offset];
3263 t_offset =
GetTrace()->GetCoeff_Offset
3264 (elmtToTrace[n][1]->GetElmtId());
3266 if (negatedFluxNormal[2*n+1])
3268 for (j = 0; j < e_ncoeffs; j++)
3270 outarray[offset + j] -=
3271 (m_Ixp->GetPtr())[j] * Fn[t_offset];
3276 for (j = 0; j < e_ncoeffs; j++)
3278 outarray[offset + j] +=
3279 (m_Ixp->GetPtr())[j] * Fn[t_offset];
3293 m_trace->IProductWRTBase(Fn, Fcoeffs);
3300 int e, n, offset, t_offset;
3310 for(e = 0; e < (*m_exp)[n]->GetNtraces(); ++e)
3312 t_offset =
GetTrace()->GetPhys_Offset
3313 (elmtToTrace[n][e]->GetElmtId());
3314 (*m_exp)[n]->AddEdgeNormBoundaryInt
3315 (e, elmtToTrace[n][e],
3317 e_outarray = outarray+offset);
3326 for(e = 0; e < (*m_exp)[n]->GetNtraces(); ++e)
3328 t_offset =
GetTrace()->GetPhys_Offset
3329 (elmtToTrace[n][e]->GetElmtId());
3330 (*m_exp)[n]->AddFaceNormBoundaryInt
3331 (e, elmtToTrace[n][e],
3333 e_outarray = outarray+offset);
3369 "tested for 1D expansion");
3373 m_trace->IProductWRTBase(Fwd,Coeffs);
3375 m_trace->IProductWRTBase(Bwd,Coeffs);
3386 const bool PhysSpaceForcing)
3388 boost::ignore_unused(varfactors,dirForcing);
3399 if(PhysSpaceForcing)
3412 int GloBndDofs =
m_traceMap->GetNumGlobalBndCoeffs();
3413 int NumDirBCs =
m_traceMap->GetNumLocalDirBndCoeffs();
3423 int LocBndCoeffs =
m_traceMap->GetNumLocalBndCoeffs();
3433 for (cnt = n = 0; n < nexp; ++n)
3435 nbndry = (*m_exp)[n]->NumDGBndryCoeffs();
3437 e_ncoeffs = (*m_exp)[n]->GetNcoeffs();
3444 Floc =
Transpose(*(HDGLamToU->GetBlock(n,n)))*ElmtFce;
3450 m_traceMap->GetBndCondCoeffsToLocalTraceMap();
3468 locid = bndCondMap[cnt + j];
3469 loclambda[locid] = Sign[locid]*bndcoeffs[j];
3480 locid = bndCondMap[cnt + j];
3481 bndrhs[locid] += Sign[locid]*bndcoeffs[j];
3492 if(GloBndDofs - NumDirBCs > 0)
3517 out = (*InvHDGHelm)*F + (*HDGLamToU)*LocLambda;
3557 const std::string varName,
3573 npoints = locExpList->GetNpoints();
3578 locExpList->GetCoords(x0, x1, x2);
3601 (0,(std::static_pointer_cast<SpatialDomains
3602 ::DirichletBoundaryCondition>
3604 ->m_dirichletCondition).Evaluate
3605 (x0[0],x1[0],x2[0],time));
3613 (0,(std::static_pointer_cast<SpatialDomains
3614 ::NeumannBoundaryCondition>
3616 ->m_neumannCondition).Evaluate
3617 (x0[0],x1[0],x2[0],time));
3623 (0,(std::static_pointer_cast<SpatialDomains
3624 ::RobinBoundaryCondition>
3626 ->m_robinFunction).Evaluate
3627 (x0[0],x1[0],x2[0],time));
3642 "This type of BC not implemented yet");
3651 = std::static_pointer_cast<
3656 valuesExp(npoints, 1.0);
3658 string filebcs = bcPtr->m_filename;
3659 string exprbcs = bcPtr->m_expr;
3664 (filebcs, bcPtr->GetComm(), varName, locExpList);
3665 valuesFile = locExpList->GetPhys();
3671 std::static_pointer_cast<
3675 condition.
Evaluate(x0, x1, x2, time, valuesExp);
3679 locExpList->UpdatePhys(), 1);
3681 locExpList->FwdTrans_BndConstrained
3682 (locExpList->GetPhys(),
3683 locExpList->UpdateCoeffs());
3689 bcPtr = std::static_pointer_cast<
3696 (filebcs, bcPtr->GetComm(), varName, locExpList);
3701 std::static_pointer_cast<
3704 condition.
Evaluate(x0, x1, x2, time,
3705 locExpList->UpdatePhys());
3708 locExpList->IProductWRTBase(locExpList->GetPhys(),
3709 locExpList->UpdateCoeffs());
3715 bcPtr = std::static_pointer_cast<
3724 (filebcs, bcPtr->GetComm(), varName,
3730 std::static_pointer_cast<
3733 condition.
Evaluate(x0, x1, x2, time,
3734 locExpList->UpdatePhys());
3737 locExpList->IProductWRTBase
3738 (locExpList->GetPhys(),
3739 locExpList->UpdateCoeffs());
3749 "This type of BC not implemented yet");
3779 GetExp(e)->GetTotPoints();
3781 GetBndCondIDToGlobalTraceID(cnt+e));
3783 &weightave[id2], 1);
3798 GetExp(e)->GetTotPoints();
3800 GetBndCondIDToGlobalTraceID(cnt+e));
3803 &weightave[id2], 1);
3813 "Method not set up for this boundary condition.");
3832 map<int, int> VertGID;
3846 GetGeom()->GetVertex(0)->GetVid();
3847 VertGID[Vid] = cnt++;
3855 for(i = 0; i < exp->GetNverts(); ++i)
3857 id = exp->GetGeom()->GetVid(i);
3859 if (VertGID.count(
id) > 0)
3861 bid = VertGID.find(
id)->second;
3863 "Edge already set");
3871 "Failed to visit all boundary condtiions");
3876 map<int, int> globalIdMap;
3885 globalIdMap[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
3906 as<LocalRegions::Expansion1D>();
3910 m_graph->GetElementsFromEdge(exp1d->GetGeom1D());
3913 (*tmp)[0].first->GetGlobalID()];
3921 map<int,int> globalIdMap;
3931 globalIdMap[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
3950 as<LocalRegions::Expansion2D>();
3953 m_graph->GetElementsFromFace(exp2d->GetGeom2D());
3955 [tmp->at(0).first->GetGlobalID()];
3962 ASSERTL1(
false,
"Not setup for this expansion");
3972 std::shared_ptr<ExpList> &result,
3973 const bool DeclareCoeffPhysArrays)
3976 int offsetOld, offsetNew;
3977 std::vector<unsigned int> eIDs;
3983 for (cnt = n = 0; n < i; ++n)
3991 eIDs.push_back(ElmtID[cnt+n]);
3997 (*
this, eIDs, DeclareCoeffPhysArrays);
4000 if( DeclareCoeffPhysArrays)
4003 for (n = 0; n < result->GetExpSize(); ++n)
4005 nq =
GetExp(ElmtID[cnt+n])->GetTotPoints();
4007 offsetNew = result->GetPhys_Offset(n);
4009 tmp2 = result->UpdatePhys()+ offsetNew, 1);
4011 nq =
GetExp(ElmtID[cnt+n])->GetNcoeffs();
4013 offsetNew = result->GetCoeff_Offset(n);
4015 tmp2 = result->UpdateCoeffs()+ offsetNew, 1);
4051 map<int, RobinBCInfoSharedPtr> returnval;
4067 int npoints = locExpList->GetNpoints();
4073 locExpList->GetCoords(x0, x1, x2);
4076 std::static_pointer_cast<
4081 coeffeqn.
Evaluate(x0, x1, x2, 0.0, coeffphys);
4083 for(e = 0; e < locExpList->GetExpSize(); ++e)
4089 Array_tmp = coeffphys +
4090 locExpList->GetPhys_Offset(e));
4092 elmtid = ElmtID[cnt+e];
4094 if(returnval.count(elmtid) != 0)
4096 rInfo->next = returnval.find(elmtid)->second;
4098 returnval[elmtid] = rInfo;
4121 int i,e,ncoeff_edge;
4131 int LocBndCoeffs =
m_traceMap->GetNumLocalBndCoeffs();
4137 edge_lambda = loc_lambda;
4145 int nEdges = (*m_exp)[i]->GetGeom()->GetNumEdges();
4148 for(e = 0; e < nEdges; ++e)
4150 edgedir = (*m_exp)[i]->GetTraceOrient(e);
4151 ncoeff_edge = elmtToTrace[i][e]->GetNcoeffs();
4153 Vmath::Vcopy(ncoeff_edge, edge_lambda, 1, edgeCoeffs[e], 1);
4154 elmtToTrace[i][e]->SetCoeffsToOrientation(
4155 edgedir, edgeCoeffs[e], edgeCoeffs[e]);
4156 edge_lambda = edge_lambda + ncoeff_edge;
4159 (*m_exp)[i]->DGDeriv(dir,
4163 out_tmp = out_d+cnt);
4164 cnt += (*m_exp)[i]->GetNcoeffs();
4195 int i,cnt,e,ncoeff_trace;
4202 int nq_elmt, nm_elmt;
4203 int LocBndCoeffs =
m_traceMap->GetNumLocalBndCoeffs();
4208 trace_lambda = loc_lambda;
4212 int num_points[] = {0,0,0};
4213 int num_modes [] = {0,0,0};
4218 nq_elmt = (*m_exp)[i]->GetTotPoints();
4219 nm_elmt = (*m_exp)[i]->GetNcoeffs();
4223 out_tmp = force + nm_elmt;
4226 for(
int j= 0; j < dim; ++j)
4228 num_points[j] = (*m_exp)[i]->GetBasis(j)->GetNumPoints();
4229 num_modes[j] = (*m_exp)[i]->GetBasis(j)->GetNumModes();
4235 int nTraces = (*m_exp)[i]->GetNtraces();
4238 for(e = 0; e < (*m_exp)[i]->GetNtraces(); ++e)
4240 edgedir = (*m_exp)[i]->GetTraceOrient(e);
4241 ncoeff_trace = elmtToTrace[i][e]->GetNcoeffs();
4243 Vmath::Vcopy(ncoeff_trace, trace_lambda, 1, traceCoeffs[e], 1);
4246 elmtToTrace[i][e]->SetCoeffsToOrientation(edgedir,
4247 traceCoeffs[e], traceCoeffs[e]);
4252 SetFaceToGeomOrientation(e,traceCoeffs[e]);
4255 trace_lambda = trace_lambda + ncoeff_trace;
4273 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>
4274 ((*
m_exp)[i]->GetGeom());
4276 (BkeyQ1, BkeyQ2, qGeom);
4292 (BkeyT1, BkeyT2, tGeom);
4304 num_modes[0], PkeyH1);
4306 num_modes[1], PkeyH2);
4308 num_modes[2], PkeyH3);
4310 std::dynamic_pointer_cast<SpatialDomains::HexGeom>
4311 ((*
m_exp)[i]->GetGeom());
4313 (BkeyH1, BkeyH2, BkeyH3, hGeom);
4325 num_modes[0], PkeyT1);
4327 num_modes[1], PkeyT2);
4329 num_modes[2], PkeyT3);
4331 std::dynamic_pointer_cast<SpatialDomains::TetGeom>
4332 ((*
m_exp)[i]->GetGeom());
4334 (BkeyT1, BkeyT2, BkeyT3, tGeom);
4339 "Wrong shape type, HDG postprocessing is not "
4346 (*m_exp)[i]->DGDeriv(
4348 elmtToTrace[i], traceCoeffs, out_tmp);
4349 (*m_exp)[i]->BwdTrans(out_tmp,qrhs);
4350 ppExp->IProductWRTDerivBase(0,qrhs,force);
4353 (*m_exp)[i]->DGDeriv(
4355 elmtToTrace[i], traceCoeffs, out_tmp);
4357 (*m_exp)[i]->BwdTrans(out_tmp,qrhs);
4358 ppExp->IProductWRTDerivBase(1,qrhs,out_tmp);
4363 (*m_exp)[i]->BwdTrans(
4365 force[0] = (*m_exp)[i]->Integral(qrhs);
4370 ppExp->DetShapeType(), *ppExp);
4380 ppExp->BwdTrans(out.
GetPtr(), work);
4381 (*m_exp)[i]->FwdTrans(work, tmp_coeffs = outarray +
m_coeff_offset[i]);
4397 1, Bwd, locTraceBwd);
4401 1, Bwd, locTraceBwd);
4405 "GetLocTraceFromTracePts not defined");
4415 0, Fwd, locTraceFwd);
4419 0, Fwd, locTraceFwd);
4423 "GetLocTraceFromTracePts not defined");
4435 m_trace->IProductWRTBase(FwdFlux,FCoeffs);
4438 m_trace->IProductWRTBase(BwdFlux,FCoeffs);
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
#define sign(a, b)
return the sign(b)*a
Describes the specification for a Basis.
NekDouble Evaluate() const
Interpreter class for the evaluation of mathematical expressions.
int DefineFunction(const std::string &vlist, const std::string &expr)
Defines a function for the purposes of evaluation.
NekDouble Evaluate(const int id)
Evaluate a function which depends only on constants and/or parameters.
Defines a specification for a set of points.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
This class is the abstractio n of a global discontinuous two- dimensional spectral/hp element expansi...
std::vector< int > m_periodicBwdCopy
PeriodicMap m_periodicEdges
A map which identifies pairs of periodic edges.
PeriodicMap m_periodicFaces
A map which identifies pairs of periodic faces.
Array< OneD, SpatialDomains::BoundaryConditionShPtr > m_bndConditions
An array which contains the information about the boundary condition on the different boundary region...
std::set< int > m_boundaryTraces
A set storing the global IDs of any boundary Verts.
LocTraceToTraceMapSharedPtr m_locTraceToTraceMap
virtual ~DisContField()
Destructor.
std::vector< bool > m_negatedFluxNormal
SpatialDomains::BoundaryConditionsSharedPtr GetDomainBCs(const SpatialDomains::CompositeMap &domain, const SpatialDomains::BoundaryConditions &Allbcs, const std::string &variable)
AssemblyMapDGSharedPtr m_traceMap
Local to global DG mapping for trace space.
virtual void v_AddTraceIntegralToOffDiag(const Array< OneD, const NekDouble > &FwdFlux, const Array< OneD, const NekDouble > &BwdFlux, Array< OneD, NekDouble > &outarray)
Array< OneD, int > m_BCtoTraceMap
GlobalLinSysSharedPtr GetGlobalBndLinSys(const GlobalLinSysKey &mkey)
For a given key, returns the associated global linear system.
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo()
void EvaluateHDGPostProcessing(Array< OneD, NekDouble > &outarray)
Evaluate HDG post-processing to increase polynomial order of solution.
virtual void v_PeriodicBwdCopy(const Array< OneD, const NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
NekDouble L2_DGDeriv(const int dir, const Array< OneD, const NekDouble > &soln)
Calculate the error of the derivative using the consistent DG evaluation of .
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
Add trace contributions into elemental coefficient spaces.
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
void FindPeriodicTraces(const SpatialDomains::BoundaryConditions &bcs, const std::string variable)
Generate a associative map of periodic vertices in a mesh.
bool SameTypeOfBoundaryConditions(const DisContField &In)
Check to see if expansion has the same BCs as In.
virtual void v_GetLocTraceFromTracePts(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &locTraceFwd, Array< OneD, NekDouble > &locTraceBwd)
Array< OneD, NekDouble > m_bndCondBndWeight
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Add trace contributions into elemental coefficient spaces.
virtual void v_Reset()
Reset this field, so that geometry information can be updated.
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
virtual void v_FillBwdWithBwdWeight(Array< OneD, NekDouble > &weightave, Array< OneD, NekDouble > &weightjmp)
Fill the weight with m_bndCondBndWeight.
Array< OneD, MultiRegions::ExpListSharedPtr > m_bndCondExpansions
An object which contains the discretised boundary conditions.
GlobalLinSysMapShPtr m_globalBndMat
Global boundary matrix.
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
PeriodicMap m_periodicVerts
A map which identifies groups of periodic vertices.
virtual void v_AddTraceQuadPhysToField(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
ExpListSharedPtr m_trace
Trace space storage for points between elements.
virtual void v_EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="", const NekDouble x2_in=NekConstants::kNekUnsetDouble, const NekDouble x3_in=NekConstants::kNekUnsetDouble)
Evaluate all boundary conditions at a given time..
virtual void v_GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &TraceID)
std::vector< bool > & GetNegatedFluxNormal(void)
DisContField()
Default constructor.
void SetUpDG(const std::string="DefaultVar")
Set up all DG member variables and maps.
std::vector< int > m_periodicFwdCopy
A vector indicating degress of freedom which need to be copied from forwards to backwards space in ca...
bool IsLeftAdjacentTrace(const int n, const int e)
virtual void v_FillBwdWithBoundCond(const Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd, bool PutFwdInBwdOnBCs)
std::vector< bool > m_leftAdjacentTraces
Array< OneD, int > m_BCtoElmMap
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
Solve the Helmholtz equation.
void GenerateBoundaryConditionExpansion(const SpatialDomains::MeshGraphSharedPtr &graph1D, const SpatialDomains::BoundaryConditions &bcs, const std::string variable, const bool DeclareCoeffPhysArrays=true)
Discretises the boundary conditions.
Base class for all multi-elemental spectral/hp expansions.
virtual void v_Reset()
Reset geometry information, metrics, matrix managers and geometry information.
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
std::shared_ptr< ExpList > & GetTrace()
int GetNcoeffs(void) const
Returns the total number of local degrees of freedom .
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
static SpatialDomains::BoundaryConditionShPtr GetBoundaryCondition(const SpatialDomains::BoundaryConditionCollection &collection, unsigned int index, const std::string &variable)
const Array< OneD, const NekDouble > & GetCoeffs() const
This function returns (a reference to) the array (implemented as m_coeffs) containing all local expa...
const Array< OneD, const NekDouble > & GetPhys() const
This function returns (a reference to) the array (implemented as m_phys) containing the function ev...
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n.
int GetExpSize(void)
This function returns the number of elements in the expansion.
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
void ExtractFileBCs(const std::string &fileName, LibUtilities::CommSharedPtr comm, const std::string &varName, const std::shared_ptr< ExpList > locExpList)
std::shared_ptr< GlobalLinSys > GenGlobalBndLinSys(const GlobalLinSysKey &mkey, const AssemblyMapSharedPtr &locToGloMap)
Generate a GlobalLinSys from information provided by the key "mkey" and the mapping provided in LocTo...
NekDouble GetCoeff(int i)
Get the i th value (coefficient) of m_coeffs.
bool m_physState
The state of the array m_phys.
LibUtilities::CommSharedPtr m_comm
Communicator.
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
void EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="", const NekDouble=NekConstants::kNekUnsetDouble, const NekDouble=NekConstants::kNekUnsetDouble)
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
NekDouble L2(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
This function calculates the error with respect to soln of the global spectral/hp element approximat...
void ApplyGeomInfo()
Apply geometry information to each expansion.
LibUtilities::SessionReaderSharedPtr m_session
Session.
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n.
ExpansionType m_expType
Exapnsion type.
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Describe a linear system.
GlobalSysSolnType GetGlobalSysSolnType() const
Return the associated solution type.
Describes a matrix with ordering defined by a local to global map.
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
Array< OneD, DataType > & GetPtr()
const BoundaryConditionCollection & GetBoundaryConditions(void) const
const BoundaryRegionCollection & GetBoundaryRegions(void) const
void Rotate(PointGeom &a, int dir, NekDouble angle)
_this = rotation of a by angle 'angle' around axis dir
NekDouble dist(PointGeom &a)
return distance between this and input a
static StdRegions::Orientation GetFaceOrientation(const QuadGeom &face1, const QuadGeom &face2, bool doRot=false, int dir=0, NekDouble angle=0.0, NekDouble tol=1e-8)
Get the orientation of face1.
static StdRegions::Orientation GetFaceOrientation(const TriGeom &face1, const TriGeom &face2, bool doRot, int dir, NekDouble angle, NekDouble tol)
BasisManagerT & BasisManager(void)
std::shared_ptr< Basis > BasisSharedPtr
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ eGaussRadauMAlpha2Beta0
Gauss Radau pinned at x=-1, .
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
@ eGaussRadauMAlpha1Beta0
Gauss Radau pinned at x=-1, .
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points .
@ eOrtho_A
Principle Orthogonal Functions .
@ eOrtho_C
Principle Orthogonal Functions .
@ eOrtho_B
Principle Orthogonal Functions .
std::shared_ptr< Expansion > ExpansionSharedPtr
std::shared_ptr< Expansion2D > Expansion2DSharedPtr
std::shared_ptr< Expansion0D > Expansion0DSharedPtr
std::shared_ptr< Expansion1D > Expansion1DSharedPtr
std::shared_ptr< Expansion3D > Expansion3DSharedPtr
static AssemblyMapSharedPtr NullAssemblyMapSharedPtr
static ExpListSharedPtr NullExpListSharedPtr
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
std::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
static const NekDouble kNekUnsetDouble
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
std::map< int, std::vector< unsigned int > > CompositeOrdering
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
std::shared_ptr< BoundaryRegion > BoundaryRegionShPtr
std::shared_ptr< BoundaryConditions > BoundaryConditionsSharedPtr
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
std::shared_ptr< std::vector< std::pair< GeometrySharedPtr, int > > > GeometryLinkSharedPtr
std::map< int, std::vector< unsigned int > > BndRegionOrdering
std::shared_ptr< DirichletBoundaryCondition > DirichletBCShPtr
std::vector< PointGeomSharedPtr > PointGeomVector
std::map< int, CompositeSharedPtr > CompositeMap
std::map< int, BoundaryConditionMapShPtr > BoundaryConditionCollection
std::shared_ptr< SegGeom > SegGeomSharedPtr
std::shared_ptr< TetGeom > TetGeomSharedPtr
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::shared_ptr< NeumannBoundaryCondition > NeumannBCShPtr
std::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
std::shared_ptr< HexGeom > HexGeomSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::shared_ptr< TriGeom > TriGeomSharedPtr
std::shared_ptr< Composite > CompositeSharedPtr
std::shared_ptr< RobinBoundaryCondition > RobinBCShPtr
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
@ eInvLaplacianWithUnityMean
std::map< ConstFactorType, NekDouble > ConstFactorMap
@ eDir1BwdDir2_Dir2BwdDir1
@ eDir1FwdDir1_Dir2FwdDir2
@ eDir1BwdDir1_Dir2BwdDir2
@ eDir1BwdDir2_Dir2FwdDir1
@ eDir1FwdDir1_Dir2BwdDir2
@ eDir1BwdDir1_Dir2FwdDir2
@ eDir1FwdDir2_Dir2FwdDir1
@ eDir1FwdDir2_Dir2BwdDir1
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void Neg(int n, T *x, const int incx)
Negate x = -x.
T Vsum(int n, const T *x, const int incx)
Subtract return sum(x)
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Zero(int n, T *x, const int incx)
Zero vector.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
scalarT< T > sqrt(scalarT< T > in)
int id
Geometry ID of entity.
StdRegions::Orientation orient
Orientation of entity within higher dimensional entity.
bool isLocal
Flag specifying if this entity is local to this partition.
NekDouble m_tol
Tolerance to rotation is considered identical.
int m_dir
Axis of rotation. 0 = 'x', 1 = 'y', 2 = 'z'.
NekDouble m_angle
Angle of rotation in radians.