92 : m_expType(type), m_ncoeffs(0), m_npoints(0), m_physState(false),
108 :
std::enable_shared_from_this<
ExpList>(in), m_expType(in.m_expType),
110 m_comm(in.m_comm), m_session(in.m_session), m_graph(in.m_graph),
111 m_ncoeffs(in.m_ncoeffs), m_npoints(in.m_npoints), m_physState(false),
112 m_exp(in.m_exp), m_collections(in.m_collections),
113 m_collectionsDoInit(in.m_collectionsDoInit),
114 m_coeff_offset(in.m_coeff_offset), m_phys_offset(in.m_phys_offset),
115 m_blockMat(in.m_blockMat), m_WaveSpace(false),
116 m_elmtToExpId(in.m_elmtToExpId)
129 const bool DeclareCoeffPhysArrays,
131 : m_expType(in.m_expType), m_comm(in.m_comm), m_session(in.m_session),
132 m_graph(in.m_graph), m_physState(false),
137 for (
int i = 0; i < eIDs.size(); ++i)
139 (*m_exp).push_back((*(in.
m_exp))[eIDs[i]]);
170 const bool DeclareCoeffPhysArrays,
const std::string &var,
172 : m_comm(pSession->GetComm()), m_session(pSession), m_graph(graph),
180 graph->GetExpansionInfo(var);
212 const bool DeclareCoeffPhysArrays,
214 : m_comm(pSession->GetComm()), m_session(pSession), m_physState(false),
233 : m_expType(
e0D), m_ncoeffs(1), m_npoints(1), m_physState(false),
240 (*m_exp).push_back(
Point);
275 [[maybe_unused]]
const std::string variable,
277 : m_comm(comm), m_session(pSession), m_graph(graph), m_physState(false),
282 int i, j, id, elmtid = 0;
298 map<int, vector<SpatialDomains::ExpansionInfoShPtr>> ExpOrder;
301 bool DoOptOnCollection =
302 m_session->DefinesCmdLineArgument(
"no-exp-opt") ? false :
true;
304 for (i = 0; i < bndCond.size(); ++i)
306 if (bndCond[i]->GetBoundaryConditionType() ==
310 for (j = 0; j < bndConstraint[i]->GetExpSize(); ++j)
315 bndConstraint[i]->
GetExp(j)->GetGeom(), PtBvec);
318 std::dynamic_pointer_cast<LocalRegions::Expansion1D>(
319 bndConstraint[i]->
GetExp(j))))
322 exp1D->GetBasis(0)->GetBasisKey();
323 eInfo->m_basisKeyVector.push_back(bkey);
325 else if ((exp2D = std::dynamic_pointer_cast<
327 bndConstraint[i]->
GetExp(j))))
330 exp2D->GetBasis(0)->GetBasisKey();
332 exp2D->GetBasis(1)->GetBasisKey();
334 eInfo->m_basisKeyVector.push_back(bkey0);
335 eInfo->m_basisKeyVector.push_back(bkey1);
342 if (DoOptOnCollection && IsNot0D)
345 for (i = 0; i < cnt; ++i)
347 if ((eInfo->m_basisKeyVector ==
348 ExpOrder[i][0]->m_basisKeyVector) &&
349 (eInfo->m_geomShPtr->GetGeomFactors()->GetGtype() ==
351 ->m_geomShPtr->GetGeomFactors()
354 ExpOrder[i].push_back(eInfo);
361 ExpOrder[cnt++].push_back(eInfo);
366 ExpOrder[0].push_back(eInfo);
373 for (
auto &ordIt : ExpOrder)
375 for (
auto &eit : ordIt.second)
379 std::dynamic_pointer_cast<SpatialDomains::PointGeom>(
386 tracesDone.insert(PointGeom->GetVid());
389 std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
395 eit->m_basisKeyVector[0], segGeom);
396 tracesDone.insert(segGeom->GetGlobalID());
399 std::dynamic_pointer_cast<SpatialDomains::TriGeom>(
405 eit->m_basisKeyVector[0], eit->m_basisKeyVector[1],
408 tracesDone.insert(TriGeom->GetGlobalID());
411 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
416 eit->m_basisKeyVector[0], eit->m_basisKeyVector[1],
419 tracesDone.insert(QuadGeom->GetGlobalID());
423 exp->SetElmtId(elmtid++);
426 (*m_exp).push_back(exp);
430 map<int, pair<SpatialDomains::Geometry1DSharedPtr, LibUtilities::BasisKey>>
434 pair<LibUtilities::BasisKey, LibUtilities::BasisKey>>>
437 for (i = 0; i < locexp.size(); ++i)
439 if ((exp1D = std::dynamic_pointer_cast<LocalRegions::Expansion1D>(
444 for (j = 0; j < 2; ++j)
446 PointGeom = (exp1D->GetGeom1D())->GetVertex(j);
447 id = PointGeom->GetVid();
450 if (tracesDone.count(
id) != 0)
457 tracesDone.insert(
id);
458 exp->SetElmtId(elmtid++);
459 (*m_exp).push_back(exp);
462 else if ((exp2D = std::dynamic_pointer_cast<LocalRegions::Expansion2D>(
466 for (j = 0; j < locexp[i]->GetNtraces(); ++j)
468 segGeom = exp2D->GetGeom2D()->GetEdge(j);
469 id = segGeom->GetGlobalID();
471 if (tracesDone.count(
id) != 0)
476 auto it = edgeOrders.find(
id);
478 if (it == edgeOrders.end())
480 edgeOrders.insert(std::make_pair(
481 id, std::make_pair(segGeom,
482 locexp[i]->GetTraceBasisKey(j))));
486 LibUtilities::BasisKey edge =
487 locexp[i]->GetTraceBasisKey(j);
488 LibUtilities::BasisKey existing = it->second.second;
490 int np1 = edge.GetNumPoints();
491 int np2 = existing.GetNumPoints();
492 int nm1 = edge.GetNumModes();
493 int nm2 = existing.GetNumModes();
501 if (np2 >= np1 && nm2 >= nm1)
505 else if (np2 <= np1 && nm2 <= nm1)
507 it->second.second = edge;
512 "inappropriate number of points/modes (max"
513 "num of points is not set with max order)");
518 else if ((exp3D = dynamic_pointer_cast<LocalRegions::Expansion3D>(
522 for (j = 0; j < exp3D->GetNtraces(); ++j)
524 FaceGeom = exp3D->GetGeom3D()->GetFace(j);
525 id = FaceGeom->GetGlobalID();
527 if (tracesDone.count(
id) != 0)
531 auto it = faceOrders.find(
id);
533 if (it == faceOrders.end())
537 LibUtilities::BasisKey face_dir0 =
538 locexp[i]->GetTraceBasisKey(j, 0);
539 LibUtilities::BasisKey face_dir1 =
540 locexp[i]->GetTraceBasisKey(j, 1);
545 if (locexp[i]->GetTraceOrient(j) >= 9)
547 std::swap(face_dir0, face_dir1);
550 faceOrders.insert(std::make_pair(
552 std::make_pair(FaceGeom,
553 std::make_pair(face_dir0, face_dir1))));
557 LibUtilities::BasisKey face0 =
558 locexp[i]->GetTraceBasisKey(j, 0);
559 LibUtilities::BasisKey face1 =
560 locexp[i]->GetTraceBasisKey(j, 1);
561 LibUtilities::BasisKey existing0 = it->second.second.first;
562 LibUtilities::BasisKey existing1 = it->second.second.second;
566 int np11 = face0.GetNumPoints();
567 int np12 = face1.GetNumPoints();
568 int np21 = existing0.GetNumPoints();
569 int np22 = existing1.GetNumPoints();
570 int nm11 = face0.GetNumModes();
571 int nm12 = face1.GetNumModes();
572 int nm21 = existing0.GetNumModes();
573 int nm22 = existing1.GetNumModes();
582 if (locexp[i]->GetTraceOrient(j) >= 9)
584 std::swap(np11, np12);
585 std::swap(nm11, nm12);
586 std::swap(face0, face1);
592 if (existing1.GetPointsType() ==
593 LibUtilities::eGaussRadauMAlpha1Beta0)
595 if (face1.GetPointsType() ==
603 if (face1.GetPointsType() ==
604 LibUtilities::eGaussRadauMAlpha1Beta0)
610 if (existing0.GetPointsType() ==
611 LibUtilities::eGaussRadauMAlpha1Beta0)
613 if (face0.GetPointsType() ==
621 if (face0.GetPointsType() ==
622 LibUtilities::eGaussRadauMAlpha1Beta0)
631 if (np22 >= np12 && nm22 >= nm12)
635 else if (np22 <= np12 && nm22 <= nm12)
639 LibUtilities::BasisKey newbkey(
640 existing1.GetBasisType(), nm12,
641 LibUtilities::PointsKey(np12,
642 existing1.GetPointsType()));
643 it->second.second.second = newbkey;
648 "inappropriate number of points/modes (max"
649 "num of points is not set with max order)");
652 if (np21 >= np11 && nm21 >= nm11)
656 else if (np21 <= np11 && nm21 <= nm11)
660 LibUtilities::PointsKey newpkey(
661 np11, existing0.GetPointsType());
662 LibUtilities::BasisKey newbkey(existing0.GetBasisType(),
664 it->second.second.first = newbkey;
669 "inappropriate number of points/modes (max"
670 "num of points is not set with max order)");
677 int nproc =
m_comm->GetRowComm()->GetSize();
678 int tracepr =
m_comm->GetRowComm()->GetRank();
685 for (i = 0; i < locexp.size(); ++i)
687 tCnt += locexp[i]->GetNtraces();
692 Array<OneD, int> tracesCnt(nproc, 0);
693 tracesCnt[tracepr] = tCnt;
697 int totTraceCnt =
Vmath::Vsum(nproc, tracesCnt, 1);
698 Array<OneD, int> tTotOffsets(nproc, 0);
700 for (i = 1; i < nproc; ++i)
702 tTotOffsets[i] = tTotOffsets[i - 1] + tracesCnt[i - 1];
707 Array<OneD, int> TracesTotID(totTraceCnt, 0);
708 Array<OneD, int> TracesTotNm0(totTraceCnt, 0);
709 Array<OneD, int> TracesTotNm1(totTraceCnt, 0);
710 Array<OneD, int> TracesTotPnts0(totTraceCnt, 0);
711 Array<OneD, int> TracesTotPnts1(totTraceCnt, 0);
712 Array<OneD, int> TracesPointsType0(totTraceCnt, 0);
713 Array<OneD, int> TracesPointsType1(totTraceCnt, 0);
724 int cntr = tTotOffsets[tracepr];
726 for (i = 0; i < locexp.size(); ++i)
728 if ((exp2D = locexp[i]->as<LocalRegions::Expansion2D>()))
730 int nedges = locexp[i]->GetNtraces();
732 for (j = 0; j < nedges; ++j, ++cntr)
734 LibUtilities::BasisKey bkeyEdge =
735 locexp[i]->GetTraceBasisKey(j);
736 TracesTotID[cntr] = exp2D->GetGeom2D()->GetEid(j);
737 TracesTotNm0[cntr] = bkeyEdge.GetNumModes();
738 TracesTotPnts0[cntr] = bkeyEdge.GetNumPoints();
739 TracesPointsType0[cntr] =
740 static_cast<int>(bkeyEdge.GetPointsType());
745 else if ((exp3D = locexp[i]->as<LocalRegions::Expansion3D>()))
747 int nfaces = locexp[i]->GetNtraces();
749 for (j = 0; j < nfaces; ++j, ++cntr)
751 LibUtilities::BasisKey face_dir0 =
752 locexp[i]->GetTraceBasisKey(j, 0);
753 LibUtilities::BasisKey face_dir1 =
754 locexp[i]->GetTraceBasisKey(j, 1);
759 if (locexp[i]->GetTraceOrient(j) >= 9)
761 std::swap(face_dir0, face_dir1);
764 TracesTotID[cntr] = exp3D->GetGeom3D()->GetFid(j);
765 TracesTotNm0[cntr] = face_dir0.GetNumModes();
766 TracesTotNm1[cntr] = face_dir1.GetNumModes();
767 TracesTotPnts0[cntr] = face_dir0.GetNumPoints();
768 TracesTotPnts1[cntr] = face_dir1.GetNumPoints();
769 TracesPointsType0[cntr] =
770 static_cast<int>(face_dir0.GetPointsType());
771 TracesPointsType1[cntr] =
772 static_cast<int>(face_dir1.GetPointsType());
779 m_comm->GetRowComm()->AllReduce(TracesTotPnts0,
781 m_comm->GetRowComm()->AllReduce(TracesPointsType0,
785 m_comm->GetRowComm()->AllReduce(TracesTotNm1,
787 m_comm->GetRowComm()->AllReduce(TracesTotPnts1,
789 m_comm->GetRowComm()->AllReduce(TracesPointsType1,
797 if (edgeOrders.size())
799 for (i = 0; i < totTraceCnt; ++i)
801 auto it = edgeOrders.find(TracesTotID[i]);
803 if (it == edgeOrders.end())
808 LibUtilities::BasisKey existing = it->second.second;
810 int np1 = TracesTotPnts0[i];
811 int np2 = existing.GetNumPoints();
812 int nm1 = TracesTotNm0[i];
813 int nm2 = existing.GetNumModes();
817 if (np2 >= np1 && nm2 >= nm1)
821 else if (np2 <= np1 && nm2 <= nm1)
825 LibUtilities::BasisKey newbkey(
826 existing.GetBasisType(), nm1,
827 LibUtilities::PointsKey(np1, existing.GetPointsType()));
828 it->second.second = newbkey;
833 "inappropriate number of points/modes (max "
834 "num of points is not set with max order)");
838 else if (faceOrders.size())
840 for (i = 0; i < totTraceCnt; ++i)
842 auto it = faceOrders.find(TracesTotID[i]);
844 if (it == faceOrders.end())
849 LibUtilities::BasisKey existing0 = it->second.second.first;
850 LibUtilities::BasisKey existing1 = it->second.second.second;
854 int np11 = TracesTotPnts0[i];
855 int np12 = TracesTotPnts1[i];
856 int np21 = existing0.GetNumPoints();
857 int np22 = existing1.GetNumPoints();
858 int nm11 = TracesTotNm0[i];
859 int nm12 = TracesTotNm1[i];
860 int nm21 = existing0.GetNumModes();
861 int nm22 = existing1.GetNumModes();
866 if (existing1.GetPointsType() ==
867 LibUtilities::eGaussRadauMAlpha1Beta0)
870 TracesPointsType1[i]) ==
879 TracesPointsType1[i]) ==
880 LibUtilities::eGaussRadauMAlpha1Beta0)
886 if (existing0.GetPointsType() ==
887 LibUtilities::eGaussRadauMAlpha1Beta0)
890 TracesPointsType0[i]) ==
899 TracesPointsType0[i]) ==
900 LibUtilities::eGaussRadauMAlpha1Beta0)
909 if (np22 >= np12 && nm22 >= nm12)
913 else if (np22 <= np12 && nm22 <= nm12)
915 LibUtilities::BasisKey newbkey(
916 existing1.GetBasisType(), nm12,
917 LibUtilities::PointsKey(np12,
918 existing1.GetPointsType()));
919 it->second.second.second = newbkey;
924 "inappropriate number of points/modes (max "
925 "num of points is not set with max order)");
928 if (np21 >= np11 && nm21 >= nm11)
932 else if (np21 <= np11 && nm21 <= nm11)
934 LibUtilities::BasisKey newbkey(
935 existing0.GetBasisType(), nm11,
936 LibUtilities::PointsKey(np11,
937 existing0.GetPointsType()));
938 it->second.second.first = newbkey;
943 "inappropriate number of points/modes (max"
944 "num of points is not set with max order)");
950 if (edgeOrders.size())
952 map<int, vector<int>> opt;
955 if (DoOptOnCollection)
957 for (
auto &it : edgeOrders)
960 for (i = 0; i < cnt; ++i)
962 auto it1 = edgeOrders.find(opt[i][0]);
964 if ((it.second.second == it1->second.second) &&
965 (it.second.first->GetGeomFactors()->GetGtype() ==
966 it1->second.first->GetGeomFactors()->GetGtype()))
968 opt[i].push_back(it.first);
975 opt[cnt++].push_back(it.first);
981 for (
auto &it : edgeOrders)
983 opt[0].push_back(it.first);
987 for (
int i = 0; i < opt.size(); ++i)
990 for (
int j = 0; j < opt[i].size(); ++j)
992 auto it = edgeOrders.find(opt[i][j]);
995 it->second.second, it->second.first);
997 exp->SetElmtId(elmtid++);
998 (*m_exp).push_back(exp);
1004 map<int, vector<int>> opt;
1007 if (DoOptOnCollection)
1009 for (
auto &it : faceOrders)
1012 for (i = 0; i < cnt; ++i)
1014 auto it1 = faceOrders.find(opt[i][0]);
1016 if ((it.second.second.first == it1->second.second.first) &&
1017 (it.second.second.second ==
1018 it1->second.second.second) &&
1019 (it.second.first->GetGeomFactors()->GetGtype() ==
1020 it1->second.first->GetGeomFactors()->GetGtype()))
1022 opt[i].push_back(it.first);
1029 opt[cnt++].push_back(it.first);
1035 for (
auto &it : faceOrders)
1037 opt[0].push_back(it.first);
1041 for (
int i = 0; i < opt.size(); ++i)
1044 for (
int j = 0; j < opt[i].size(); ++j)
1046 auto it = faceOrders.find(opt[i][j]);
1048 FaceGeom = it->second.first;
1051 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1056 it->second.second.first, it->second.second.second,
1059 else if ((TriGeom = std::dynamic_pointer_cast<
1060 SpatialDomains::TriGeom>(FaceGeom)))
1064 it->second.second.first, it->second.second.second,
1067 exp->SetElmtId(elmtid++);
1068 (*m_exp).push_back(exp);
1086 for (
int i = (*m_exp).size() - 1; i >= 0; --i)
1108 const bool DeclareCoeffPhysArrays,
1109 [[maybe_unused]]
const std::string variable,
1111 : m_comm(pSession->GetComm()), m_session(pSession), m_graph(graph),
1117 int i, j, elmtid = 0;
1132 for (i = 0; i < locexp.size(); ++i)
1134 if ((exp1D = std::dynamic_pointer_cast<LocalRegions::Expansion1D>(
1139 for (j = 0; j < 2; ++j)
1141 PointGeom = (exp1D->GetGeom1D())->GetVertex(j);
1145 exp->SetElmtId(elmtid++);
1146 (*m_exp).push_back(exp);
1149 else if ((exp2D = std::dynamic_pointer_cast<LocalRegions::Expansion2D>(
1154 locexp[i]->GetBasis(0)->GetBasisKey();
1156 for (j = 0; j < locexp[i]->GetNtraces(); ++j)
1158 segGeom = exp2D->GetGeom2D()->GetEdge(j);
1160 int dir = exp2D->GetGeom2D()->GetDir(j);
1162 if (locexp[i]->GetNtraces() == 3)
1165 locexp[i]->GetBasis(dir)->GetBasisKey();
1179 locexp[i]->GetBasis(dir)->GetBasisKey(), segGeom);
1182 exp->SetElmtId(elmtid++);
1183 (*m_exp).push_back(exp);
1186 else if ((exp3D = dynamic_pointer_cast<LocalRegions::Expansion3D>(
1192 locexp[i]->GetBasis(0)->GetBasisKey();
1194 locexp[i]->GetBasis(1)->GetBasisKey();
1196 for (j = 0; j < exp3D->GetNtraces(); ++j)
1198 FaceGeom = exp3D->GetGeom3D()->GetFace(j);
1200 int dir0 = exp3D->GetGeom3D()->GetDir(j, 0);
1201 int dir1 = exp3D->GetGeom3D()->GetDir(j, 1);
1204 locexp[i]->GetBasis(dir0)->GetBasisKey();
1206 locexp[i]->GetBasis(dir1)->GetBasisKey();
1209 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1214 face_dir0, face_dir1, QuadGeom);
1216 else if ((TriGeom = std::dynamic_pointer_cast<
1227 nface_dir0, nface_dir1, TriGeom);
1229 exp->SetElmtId(elmtid++);
1230 (*m_exp).push_back(exp);
1273 const bool DeclareCoeffPhysArrays,
const std::string variable,
1274 bool SetToOneSpaceDimension,
1277 : m_comm(comm), m_session(pSession), m_graph(graph), m_physState(false),
1292 int meshdim = graph->GetMeshDimension();
1296 graph->GetExpansionInfo(variable);
1297 map<int, vector<SpatialDomains::ExpansionInfoShPtr>> ExpOrder;
1300 bool UseGLLOnTri =
false;
1302 pSession->MatchSolverInfo(
"Projection",
"Continuous", UseGLLOnTri,
false);
1304 bool DoOptOnCollection =
1305 m_session->DefinesCmdLineArgument(
"no-exp-opt") ? false :
true;
1307 for (
auto &compIt : domain)
1309 bool IsNot0D =
true;
1311 for (j = 0; j < compIt.second->m_geomVec.size(); ++j)
1316 compIt.second->m_geomVec[j], PtBvec);
1318 if ((SegGeom = std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1319 compIt.second->m_geomVec[j])))
1323 auto expInfo = expansions.find(SegGeom->GetGlobalID());
1324 eInfo = expInfo->second;
1330 graph->GetElementsFromEdge(SegGeom);
1336 int edge_id = elmts->at(0).second;
1338 graph->GetExpansionInfo(geom, variable);
1348 else if (geom->GetShapeType() ==
1357 "Fail to cast geom to a known 2D shape.");
1361 eInfo->m_basisKeyVector.push_back(
1362 elmtStdExp->GetTraceBasisKey(edge_id));
1366 std::dynamic_pointer_cast<SpatialDomains::TriGeom>(
1367 compIt.second->m_geomVec[j])))
1371 graph->GetElementsFromFace(TriGeom);
1376 int face_id = elmts->at(0).second;
1377 auto expInfo = expansions.find(geom->GetGlobalID());
1378 ASSERTL0(expInfo != expansions.end(),
1379 "Failed to find expansion info");
1381 expInfo->second->m_basisKeyVector[0];
1383 expInfo->second->m_basisKeyVector[1];
1385 expInfo->second->m_basisKeyVector[2];
1408 "Fail to cast geom to a known 3D shape.");
1413 elmtStdExp->GetTraceBasisKey(face_id, 0, UseGLLOnTri);
1415 elmtStdExp->GetTraceBasisKey(face_id, 1, UseGLLOnTri);
1417 if (geom->GetForient(face_id) >= 9)
1419 std::swap(TriBa, TriBb);
1422 eInfo->m_basisKeyVector.push_back(TriBa);
1423 eInfo->m_basisKeyVector.push_back(TriBb);
1425 else if ((QuadGeom =
1426 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1427 compIt.second->m_geomVec[j])))
1431 graph->GetElementsFromFace(QuadGeom);
1436 int face_id = elmts->at(0).second;
1437 auto expInfo = expansions.find(geom->GetGlobalID());
1438 ASSERTL0(expInfo != expansions.end(),
1439 "Failed to find expansion info");
1441 expInfo->second->m_basisKeyVector[0];
1443 expInfo->second->m_basisKeyVector[1];
1445 expInfo->second->m_basisKeyVector[2];
1468 "Fail to cast geom to a known 3D shape.");
1473 elmtStdExp->GetTraceBasisKey(face_id, 0);
1475 elmtStdExp->GetTraceBasisKey(face_id, 1);
1477 if (geom->GetForient(face_id) >= 9)
1479 std::swap(QuadBa, QuadBb);
1482 eInfo->m_basisKeyVector.push_back(QuadBa);
1483 eInfo->m_basisKeyVector.push_back(QuadBb);
1490 if (DoOptOnCollection && IsNot0D)
1493 for (i = 0; i < cnt; ++i)
1495 if ((eInfo->m_basisKeyVector ==
1496 ExpOrder[i][0]->m_basisKeyVector) &&
1497 (eInfo->m_geomShPtr->GetGeomFactors()->GetGtype() ==
1499 ->m_geomShPtr->GetGeomFactors()
1502 ExpOrder[i].push_back(eInfo);
1509 ExpOrder[cnt++].push_back(eInfo);
1514 ExpOrder[0].push_back(eInfo);
1520 for (
auto &ordIt : ExpOrder)
1522 for (
auto &eit : ordIt.second)
1525 if ((PtGeom = std::dynamic_pointer_cast<SpatialDomains::PointGeom>(
1534 std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1539 if (SetToOneSpaceDimension)
1542 SegGeom->GenerateOneSpaceDimGeom();
1546 eit->m_basisKeyVector[0], OneDSegmentGeom);
1552 eit->m_basisKeyVector[0], SegGeom);
1556 std::dynamic_pointer_cast<SpatialDomains::TriGeom>(
1561 if (eit->m_basisKeyVector[0].GetBasisType() ==
1568 eit->m_basisKeyVector[1], TriNb,
1575 eit->m_basisKeyVector[0], eit->m_basisKeyVector[1],
1579 else if ((QuadGeom =
1580 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1586 eit->m_basisKeyVector[0], eit->m_basisKeyVector[1],
1592 "dynamic cast to a Geom (possibly 3D) failed");
1595 exp->SetElmtId(elmtid++);
1596 (*m_exp).push_back(exp);
1631 for (i = 0; i <
m_exp->size(); ++i)
1636 m_npoints += (*m_exp)[i]->GetTotPoints();
1640 if (DeclareCoeffPhysArrays)
1648 for (
int i = 0; i <
m_exp->size(); ++i)
1652 int loccoeffs = (*m_exp)[i]->GetNcoeffs();
1654 for (
int j = 0; j < loccoeffs; ++j)
1690 bool DoOptOnCollection =
1691 m_session->DefinesCmdLineArgument(
"no-exp-opt") ? false :
true;
1692 map<int, vector<int>> ExpOrder;
1693 if (DoOptOnCollection)
1695 auto expIt = expmap.begin();
1698 ExpOrder[cnt++].push_back(expIt->first);
1702 for (; expIt != expmap.end(); ++expIt)
1705 for (i = 0; i < cnt; ++i)
1708 expmap.find(ExpOrder[i][0])->second;
1710 if ((expIt->second->m_basisKeyVector ==
1711 expInfo->m_basisKeyVector) &&
1712 (expIt->second->m_geomShPtr->GetGeomFactors()->GetGtype() ==
1713 expInfo->m_geomShPtr->GetGeomFactors()->GetGtype()))
1715 ExpOrder[i].push_back(expIt->first);
1722 ExpOrder[cnt++].push_back(expIt->first);
1728 for (
auto &expIt : expmap)
1730 ExpOrder[0].push_back(expIt.first);
1737 for (
auto &it : ExpOrder)
1739 for (
int c = 0; c < it.second.size(); ++c)
1741 auto expIt = expmap.find(it.second[c]);
1745 switch (expInfo->m_basisKeyVector.size())
1750 "Cannot mix expansion dimensions in one vector");
1754 std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1755 expInfo->m_geomShPtr)))
1759 expInfo->m_basisKeyVector[0];
1767 "dynamic cast to a 1D Geom failed");
1774 "Cannot mix expansion dimensions in one vector");
1780 if ((TriangleGeom = std::dynamic_pointer_cast<
1781 SpatialDomains ::TriGeom>(expInfo->m_geomShPtr)))
1802 else if ((QuadrilateralGeom = std::dynamic_pointer_cast<
1804 expInfo->m_geomShPtr)))
1812 "dynamic cast to a 2D Geom failed");
1819 "Cannot mix expansion dimensions in one vector");
1827 std::dynamic_pointer_cast<SpatialDomains::TetGeom>(
1828 expInfo->m_geomShPtr)))
1835 "LocalRegions::NodalTetExp is not implemented "
1844 else if ((PrismGeom = std::dynamic_pointer_cast<
1845 SpatialDomains ::PrismGeom>(
1846 expInfo->m_geomShPtr)))
1851 else if ((PyrGeom = std::dynamic_pointer_cast<
1853 expInfo->m_geomShPtr)))
1859 else if ((HexGeom = std::dynamic_pointer_cast<
1861 expInfo->m_geomShPtr)))
1870 "dynamic cast to a Geom failed");
1876 "Dimension of basis key is greater than 3");
1881 exp->SetElmtId(
id++);
1884 (*m_exp).push_back(exp);
1915 int nrows = blockmat->GetRows();
1916 int ncols = blockmat->GetColumns();
1923 out = (*blockmat) * in;
1935 for (
int i = 0; i < (*m_exp).size(); ++i)
1937 (*m_exp)[i]->MultiplyByQuadratureMetric(inarray +
m_phys_offset[i],
1938 e_outarray = outarray +
1952 for (
int i = 0; i < (*m_exp).size(); ++i)
1954 (*m_exp)[i]->DivideByQuadratureMetric(inarray +
m_phys_offset[i],
1980 for (i = 0; i < (*m_exp).size(); ++i)
1982 (*m_exp)[i]->IProductWRTDerivBase(dir, inarray +
m_phys_offset[i],
1998 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
1999 int nq = direction.size() / coordim;
2006 for (
int i = 0; i < (*m_exp).size(); ++i)
2008 npts_e = (*m_exp)[i]->GetTotPoints();
2011 for (
int k = 0; k < coordim; ++k)
2014 &locdir[k * npts_e], 1);
2017 (*m_exp)[i]->IProductWRTDirectionalDerivBase(
2042 ASSERTL1(inarray.size() >= dim,
"inarray is not of sufficient dimension");
2055 int input_offset{0};
2056 int output_offset{0};
2067 inarray[0] + input_offset, tmp0 = outarray + output_offset);
2079 inarray[0] + input_offset, tmp0 = inarray[1] + input_offset,
2080 tmp1 = outarray + output_offset);
2092 inarray[0] + input_offset, tmp0 = inarray[1] + input_offset,
2093 tmp1 = inarray[2] + input_offset,
2094 tmp2 = outarray + output_offset);
2170 e_out_d0 = out_d0 + offset;
2171 e_out_d1 = out_d1 + offset;
2172 e_out_d2 = out_d2 + offset;
2174 inarray + offset, e_out_d0, e_out_d1,
2199 for (i = 0; i < (*m_exp).size(); ++i)
2202 (*m_exp)[i]->PhysDeriv_s(inarray +
m_phys_offset[i], e_out_ds);
2208 for (i = 0; i < (*m_exp).size(); i++)
2211 (*m_exp)[i]->PhysDeriv_n(inarray +
m_phys_offset[i], e_out_dn);
2227 int intdir = (int)edir;
2232 e_out_d = out_d + offset;
2234 inarray + offset, e_out_d);
2280 ASSERTL0(0,
"Dimension not supported by ExpList::Curl");
2301 bool halfMode =
false;
2304 m_session->MatchSolverInfo(
"ModeType",
"HalfMode", halfMode,
false);
2356 ASSERTL0(0,
"Dimension not supported");
2367 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
2368 int nq = direction.size() / coordim;
2374 for (
int i = 0; i < (*m_exp).size(); ++i)
2376 npts_e = (*m_exp)[i]->GetTotPoints();
2379 for (
int k = 0; k < coordim; ++k)
2382 &locdir[k * npts_e], 1);
2385 (*m_exp)[i]->PhysDirectionalDeriv(inarray +
m_phys_offset[i], locdir,
2397 for (
int i = 0; i < (*m_exp).size(); ++i)
2399 (*m_exp)[i]->ExponentialFilter(e_array = array +
m_phys_offset[i],
2400 alpha, exponent, cutoff);
2420 if (inarray.data() == outarray.data())
2423 out = (*InvMass) * in;
2428 out = (*InvMass) * in;
2467 for (i = 0; i < (*m_exp).size(); ++i)
2469 (*m_exp)[i]->FwdTransBndConstrained(inarray +
m_phys_offset[i],
2496 "Smoothing is currently not allowed unless you are using "
2497 "a nodal base for efficiency reasons. The implemented "
2498 "smoothing technique requires the mass matrix inversion "
2499 "which is trivial just for GLL_LAGRANGE_SEM and "
2500 "GAUSS_LAGRANGE_SEMexpansions.");
2528 map<int, int> elmt_id;
2533 for (i = 0; i < (*m_exp).size(); ++i)
2537 elmt_id[n_exp++] = i;
2543 n_exp = (*m_exp).size();
2544 for (i = 0; i < n_exp; ++i)
2558 for (i = 0; i < n_exp; ++i)
2560 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
2561 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2568 for (i = 0; i < n_exp; ++i)
2570 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2571 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
2582 for (i = 0; i < n_exp; ++i)
2584 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2585 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2593 for (i = 0; i < n_exp; ++i)
2595 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2597 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2604 for (i = 0; i < n_exp; ++i)
2607 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2609 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2616 "Global Matrix creation not defined for this "
2629 for (i = cnt1 = 0; i < n_exp; ++i)
2640 (*
m_exp)[i]->GetTotPoints());
2647 loc_mat = std::dynamic_pointer_cast<LocalRegions::Expansion>(
2648 (*
m_exp)[elmt_id.find(i)->second])
2649 ->GetLocMatrix(matkey);
2650 BlkMatrix->SetBlock(i, i, loc_mat);
2667 return matrixIter->second;
2744 int input_offset{0};
2745 int output_offset{0};
2750 m_collections[i].ApplyOperator(opType, inarray + input_offset,
2751 tmp = outarray + output_offset);
2759 for (
int i = 0; i < (*m_exp).size(); ++i)
2769 (*
m_exp)[i]->GetTotPoints());
2776 (*m_exp)[i]->GeneralMatrixOp(
2793 int i, j, n, gid1, gid2, cntdim1, cntdim2;
2797 unsigned int glob_rows = 0;
2798 unsigned int glob_cols = 0;
2799 unsigned int loc_rows = 0;
2800 unsigned int loc_cols = 0;
2802 bool assembleFirstDim =
false;
2803 bool assembleSecondDim =
false;
2810 glob_cols = locToGloMap->GetNumGlobalCoeffs();
2812 assembleFirstDim =
false;
2813 assembleSecondDim =
true;
2818 glob_rows = locToGloMap->GetNumGlobalCoeffs();
2821 assembleFirstDim =
true;
2822 assembleSecondDim =
false;
2830 glob_rows = locToGloMap->GetNumGlobalCoeffs();
2831 glob_cols = locToGloMap->GetNumGlobalCoeffs();
2833 assembleFirstDim =
true;
2834 assembleSecondDim =
true;
2840 "Global Matrix creation not defined for this "
2852 for (n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
2863 (*
m_exp)[eid]->GetTotPoints());
2871 std::dynamic_pointer_cast<LocalRegions::Expansion>((*
m_exp)[n])
2872 ->GetLocMatrix(matkey);
2874 loc_rows = loc_mat->GetRows();
2875 loc_cols = loc_mat->GetColumns();
2877 for (i = 0; i < loc_rows; ++i)
2879 if (assembleFirstDim)
2881 gid1 = locToGloMap->GetLocalToGlobalMap(cntdim1 + i);
2882 sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
2890 for (j = 0; j < loc_cols; ++j)
2892 if (assembleSecondDim)
2894 gid2 = locToGloMap->GetLocalToGlobalMap(cntdim2 + j);
2895 sign2 = locToGloMap->GetLocalToGlobalSign(cntdim2 + j);
2904 coord = make_pair(gid1, gid2);
2905 if (spcoomat.count(coord) == 0)
2907 spcoomat[coord] = sign1 * sign2 * (*loc_mat)(i, j);
2911 spcoomat[coord] += sign1 * sign2 * (*loc_mat)(i, j);
2915 cntdim1 += loc_rows;
2916 cntdim2 += loc_cols;
2920 glob_cols, spcoomat);
2926 int i, j, n, gid1, gid2, loc_lda, eid;
2930 int totDofs = locToGloMap->GetNumGlobalCoeffs();
2931 int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
2933 unsigned int rows = totDofs - NumDirBCs;
2934 unsigned int cols = totDofs - NumDirBCs;
2938 int bwidth = locToGloMap->GetFullSystemBandWidth();
2950 if ((2 * (bwidth + 1)) < rows)
2954 rows, cols, zero, matStorage, bwidth, bwidth);
2960 rows, cols, zero, matStorage);
2969 rows, cols, zero, matStorage);
2974 for (n = 0; n < (*m_exp).size(); ++n)
2985 (*
m_exp)[eid]->GetTotPoints());
2993 std::dynamic_pointer_cast<LocalRegions::Expansion>((*
m_exp)[n])
2994 ->GetLocMatrix(matkey);
3001 int rows = loc_mat->GetRows();
3002 int cols = loc_mat->GetColumns();
3003 const NekDouble *dat = loc_mat->GetRawPtr();
3006 Blas::Dscal(rows * cols, loc_mat->Scale(), new_mat->GetRawPtr(), 1);
3011 (*m_exp)[n]->AddRobinMassMatrix(
3012 rBC->m_robinID, rBC->m_robinPrimitiveCoeffs, new_mat);
3021 loc_lda = loc_mat->GetColumns();
3023 for (i = 0; i < loc_lda; ++i)
3027 sign1 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + i);
3030 for (j = 0; j < loc_lda; ++j)
3035 sign2 = locToGloMap->GetLocalToGlobalSign(
3043 if ((matStorage ==
eFULL) || (gid2 >= gid1))
3045 value = Gmat->GetValue(gid1, gid2) +
3046 sign1 * sign2 * (*loc_mat)(i, j);
3047 Gmat->SetValue(gid1, gid2, value);
3097 const map<int, RobinBCInfoSharedPtr> vRobinBCInfo =
GetRobinBCInfo();
3154 int input_offset{0};
3155 int output_offset{0};
3159 inarray + input_offset,
3160 tmp = outarray + output_offset);
3186 NekDouble tol,
bool returnNearestElmt,
int cachedId,
3191 return GetExpIndex(gloCoord, Lcoords, tol, returnNearestElmt, cachedId,
3197 bool returnNearestElmt,
int cachedId,
3210 for (
int i = (*m_exp).size() - 1; i >= 0; --i)
3221 if (cachedId >= 0 && cachedId < (*m_exp).size())
3224 if ((*
m_exp)[cachedId]->GetGeom()->ContainsPoint(gloCoords, locCoords,
3229 else if (returnNearestElmt && (nearpt < nearpt_min))
3234 nearpt_min = nearpt;
3235 Vmath::Vcopy(locCoords.size(), locCoords, 1, savLocCoords, 1);
3239 NekDouble x = (gloCoords.size() > 0 ? gloCoords[0] : 0.0);
3240 NekDouble y = (gloCoords.size() > 1 ? gloCoords[1] : 0.0);
3241 NekDouble z = (gloCoords.size() > 2 ? gloCoords[2] : 0.0);
3248 std::vector<int> elmts =
m_graph->GetElementsContainingPoint(
p);
3251 for (
int i = 0; i < elmts.size(); ++i)
3258 if ((*
m_exp)[
id]->GetGeom()->ContainsPoint(gloCoords, locCoords, tol,
3263 else if (returnNearestElmt && (nearpt < nearpt_min))
3268 nearpt_min = nearpt;
3269 Vmath::Vcopy(locCoords.size(), locCoords, 1, savLocCoords, 1);
3275 if (returnNearestElmt && nearpt_min <= maxDistance)
3277 Vmath::Vcopy(locCoords.size(), savLocCoords, 1, locCoords, 1);
3278 std::string
msg =
"Failed to find point within a tolerance of " +
3279 boost::lexical_cast<std::string>(tol) +
3280 ", using local point (";
3281 for (
size_t j = 0; j < locCoords.size(); ++j)
3283 msg += boost::lexical_cast<std::string>(savLocCoords[j]);
3284 if (j < locCoords.size())
3289 msg +=
") in element: " + std::to_string(min_id) +
3290 " with a distance of " + std::to_string(nearpt_min);
3308 ASSERTL0(dim == coords.size(),
"Invalid coordinate dimension.");
3313 ASSERTL0(elmtIdx > 0,
"Unable to find element containing point.");
3319 return (*
m_exp)[elmtIdx]->StdPhysEvaluate(xi, elmtPhys);
3351 for (
int i = 0; i <
m_exp->size(); ++i)
3353 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
3358 for (
int i = 0; i <
m_exp->size(); ++i)
3360 (*m_exp)[i]->Reset();
3391 int coordim =
GetExp(0)->GetCoordim();
3392 char vars[3] = {
'x',
'y',
'z'};
3403 outfile <<
"Variables = x";
3404 for (
int i = 1; i < coordim; ++i)
3406 outfile <<
", " << vars[i];
3411 outfile <<
", " << var;
3414 outfile << std::endl << std::endl;
3427 int nBases = (*m_exp)[0]->GetNumBases();
3432 if (expansion == -1)
3440 GetCoords(coords[0], coords[1], coords[2]);
3442 for (i = 0; i <
m_exp->size(); ++i)
3446 for (j = 0; j < nBases; ++j)
3448 numInt *= (*m_exp)[i]->GetNumPoints(j) - 1;
3451 numBlocks += numInt;
3456 nPoints = (*m_exp)[expansion]->GetTotPoints();
3462 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
3465 for (j = 0; j < nBases; ++j)
3467 numBlocks *= (*m_exp)[expansion]->GetNumPoints(j) - 1;
3475 int nPlanes =
GetZIDs().size();
3476 NekDouble tmp = numBlocks * (nPlanes - 1.0) / nPlanes;
3477 numBlocks = (int)tmp;
3485 outfile <<
"Zone, N=" << nPoints <<
", E=" << numBlocks <<
", F=FEBlock";
3490 outfile <<
", ET=QUADRILATERAL" << std::endl;
3493 outfile <<
", ET=BRICK" << std::endl;
3501 for (j = 0; j < coordim; ++j)
3503 for (i = 0; i < nPoints; ++i)
3505 outfile << coords[j][i] <<
" ";
3506 if (i % 1000 == 0 && i)
3508 outfile << std::endl;
3511 outfile << std::endl;
3518 int nbase = (*m_exp)[0]->GetNumBases();
3521 std::shared_ptr<LocalRegions::ExpansionVector> exp =
m_exp;
3523 if (expansion != -1)
3525 exp = std::shared_ptr<LocalRegions::ExpansionVector>(
3527 (*exp)[0] = (*m_exp)[expansion];
3532 for (i = 0; i < (*exp).size(); ++i)
3534 const int np0 = (*exp)[i]->GetNumPoints(0);
3535 const int np1 = (*exp)[i]->GetNumPoints(1);
3537 for (j = 1; j < np1; ++j)
3539 for (k = 1; k < np0; ++k)
3541 outfile << cnt + (j - 1) * np0 + k <<
" ";
3542 outfile << cnt + (j - 1) * np0 + k + 1 <<
" ";
3543 outfile << cnt + j * np0 + k + 1 <<
" ";
3544 outfile << cnt + j * np0 + k << endl;
3551 else if (nbase == 3)
3553 for (i = 0; i < (*exp).size(); ++i)
3555 const int np0 = (*exp)[i]->GetNumPoints(0);
3556 const int np1 = (*exp)[i]->GetNumPoints(1);
3557 const int np2 = (*exp)[i]->GetNumPoints(2);
3558 const int np01 = np0 * np1;
3560 for (j = 1; j < np2; ++j)
3562 for (k = 1; k < np1; ++k)
3564 for (l = 1; l < np0; ++l)
3566 outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l
3568 outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l + 1
3570 outfile << cnt + (j - 1) * np01 + k * np0 + l + 1
3572 outfile << cnt + (j - 1) * np01 + k * np0 + l <<
" ";
3573 outfile << cnt + j * np01 + (k - 1) * np0 + l <<
" ";
3574 outfile << cnt + j * np01 + (k - 1) * np0 + l + 1
3576 outfile << cnt + j * np01 + k * np0 + l + 1 <<
" ";
3577 outfile << cnt + j * np01 + k * np0 + l << endl;
3581 cnt += np0 * np1 * np2;
3597 if (expansion == -1)
3605 for (
int i = 0; i < totpoints; ++i)
3607 outfile <<
m_phys[i] <<
" ";
3608 if (i % 1000 == 0 && i)
3610 outfile << std::endl;
3613 outfile << std::endl;
3617 int nPoints = (*m_exp)[expansion]->GetTotPoints();
3619 for (
int i = 0; i < nPoints; ++i)
3624 outfile << std::endl;
3630 outfile <<
"<?xml version=\"1.0\"?>" << endl;
3631 outfile << R
"(<VTKFile type="UnstructuredGrid" version="0.1" )"
3632 << "byte_order=\"LittleEndian\">" << endl;
3633 outfile <<
" <UnstructuredGrid>" << endl;
3638 outfile <<
" </UnstructuredGrid>" << endl;
3639 outfile <<
"</VTKFile>" << endl;
3643 [[maybe_unused]]
int istrip)
3646 int nbase = (*m_exp)[expansion]->GetNumBases();
3647 int ntot = (*m_exp)[expansion]->GetTotPoints();
3651 for (i = 0; i < nbase; ++i)
3653 nquad[i] = (*m_exp)[expansion]->GetNumPoints(i);
3654 ntotminus *= (nquad[i] - 1);
3661 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
3663 outfile <<
" <Piece NumberOfPoints=\"" << ntot <<
"\" NumberOfCells=\""
3664 << ntotminus <<
"\">" << endl;
3665 outfile <<
" <Points>" << endl;
3666 outfile <<
" <DataArray type=\"Float64\" "
3667 << R
"(NumberOfComponents="3" format="ascii">)" << endl;
3669 for (i = 0; i < ntot; ++i)
3671 for (j = 0; j < 3; ++j)
3673 outfile << setprecision(8) << scientific << (float)coords[j][i]
3679 outfile <<
" </DataArray>" << endl;
3680 outfile <<
" </Points>" << endl;
3681 outfile <<
" <Cells>" << endl;
3682 outfile <<
" <DataArray type=\"Int32\" "
3683 << R
"(Name="connectivity" format="ascii">)" << endl;
3693 for (i = 0; i < nquad[0] - 1; ++i)
3695 outfile << i <<
" " << i + 1 << endl;
3703 for (i = 0; i < nquad[0] - 1; ++i)
3705 for (j = 0; j < nquad[1] - 1; ++j)
3707 outfile << j * nquad[0] + i <<
" " << j * nquad[0] + i + 1
3708 <<
" " << (j + 1) * nquad[0] + i + 1 <<
" "
3709 << (j + 1) * nquad[0] + i << endl;
3718 for (i = 0; i < nquad[0] - 1; ++i)
3720 for (j = 0; j < nquad[1] - 1; ++j)
3722 for (k = 0; k < nquad[2] - 1; ++k)
3725 << k * nquad[0] * nquad[1] + j * nquad[0] + i <<
" "
3726 << k * nquad[0] * nquad[1] + j * nquad[0] + i + 1
3728 << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] +
3731 << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] + i
3733 << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] + i
3735 << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] +
3738 << (k + 1) * nquad[0] * nquad[1] +
3739 (j + 1) * nquad[0] + i + 1
3741 << (k + 1) * nquad[0] * nquad[1] +
3742 (j + 1) * nquad[0] + i
3754 outfile <<
" </DataArray>" << endl;
3755 outfile <<
" <DataArray type=\"Int32\" "
3756 << R
"(Name="offsets" format="ascii">)" << endl;
3757 for (i = 0; i < ntotminus; ++i)
3759 outfile << i * ns + ns <<
" ";
3762 outfile <<
" </DataArray>" << endl;
3763 outfile <<
" <DataArray type=\"UInt8\" "
3764 << R
"(Name="types" format="ascii">)" << endl;
3765 for (i = 0; i < ntotminus; ++i)
3770 outfile <<
" </DataArray>" << endl;
3771 outfile <<
" </Cells>" << endl;
3772 outfile <<
" <PointData>" << endl;
3776 [[maybe_unused]]
int expansion)
3778 outfile <<
" </PointData>" << endl;
3779 outfile <<
" </Piece>" << endl;
3786 int nq = (*m_exp)[expansion]->GetTotPoints();
3789 outfile << R
"( <DataArray type="Float64" Name=")" << var << "\">"
3795 for (i = 0; i < nq; ++i)
3801 outfile <<
" </DataArray>" << endl;
3835 err = max(err,
abs(inarray[i] - soln[i]));
3868 for (i = 0; i < (*m_exp).size(); ++i)
3871 err += errl2 * errl2;
3876 for (i = 0; i < (*m_exp).size(); ++i)
3880 err += errl2 * errl2;
3910 for (i = 0; i < (*m_exp).size(); ++i)
3926 for (i = 0; i < (*m_exp).size(); ++i)
3929 for (j = 0; j < inarray.size(); ++j)
3933 flux += (*m_exp)[i]->VectorFlux(tmp);
3942 "This method is not defined or valid for this class type");
3950 "This method is not defined or valid for this class type");
3958 "This method is not defined or valid for this class type");
3966 "This method is not defined or valid for this class type");
3972 "This method is not defined or valid for this class type");
3980 "This method is not defined or valid for this class type");
3988 "ClearGlobalLinSysManager not implemented for ExpList.");
3998 [[maybe_unused]]
bool clearLocalMatrices)
4001 "UnsetGlobalLinSys not implemented for ExpList.");
4008 "GetGlobalLinSysManager not implemented for ExpList.");
4014 const std::string &varName,
4017 string varString = fileName.substr(0, fileName.find_last_of(
"."));
4018 int j, k, len = varString.length();
4019 varString = varString.substr(len - 1, len);
4021 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
4022 std::vector<std::vector<NekDouble>> FieldData;
4027 ft, comm,
m_session->GetSharedFilesystem());
4029 f->Import(fileName, FieldDef, FieldData);
4032 for (j = 0; j < FieldDef.size(); ++j)
4034 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
4036 if (FieldDef[j]->m_fields[k] == varName)
4040 FieldDef[j]->m_fields[k], coeffs);
4046 ASSERTL0(found,
"Could not find variable '" + varName +
4047 "' in file boundary condition " + fileName);
4073 for (i = 0; i < (*m_exp).size(); ++i)
4077 err += errh1 * errh1;
4086 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef,
4088 std::vector<NekDouble> &HomoLen,
bool homoStrips,
4089 std::vector<unsigned int> &HomoSIDs, std::vector<unsigned int> &HomoZIDs,
4090 std::vector<unsigned int> &HomoYIDs)
4097 ASSERTL1(NumHomoDir == HomoBasis.size(),
4098 "Homogeneous basis is not the same length as NumHomoDir");
4099 ASSERTL1(NumHomoDir == HomoLen.size(),
4100 "Homogeneous length vector is not the same length as NumHomDir");
4119 for (s = startenum; s <= endenum; ++s)
4121 std::vector<unsigned int> elementIDs;
4122 std::vector<LibUtilities::BasisType> basis;
4123 std::vector<unsigned int> numModes;
4124 std::vector<std::string> fields;
4127 bool UniOrder =
true;
4132 for (
int i = 0; i < (*m_exp).size(); ++i)
4134 if ((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
4136 elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
4139 for (
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
4142 (*
m_exp)[i]->GetBasis(j)->GetBasisType());
4144 (*
m_exp)[i]->GetBasis(j)->GetNumModes());
4148 for (n = 0; n < NumHomoDir; ++n)
4150 basis.push_back(HomoBasis[n]->GetBasisType());
4151 numModes.push_back(HomoBasis[n]->GetNumModes());
4159 (*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
4160 "Routine is not set up for multiple bases definitions");
4162 for (
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
4165 (*
m_exp)[i]->GetBasis(j)->GetNumModes());
4167 (*
m_exp)[i]->GetBasis(j)->GetNumModes())
4173 for (n = 0; n < NumHomoDir; ++n)
4175 numModes.push_back(HomoBasis[n]->GetNumModes());
4181 if (elementIDs.size() > 0)
4186 numModes, fields, NumHomoDir, HomoLen,
4187 homoStrips, HomoSIDs, HomoZIDs, HomoYIDs);
4188 fielddef.push_back(fdef);
4196std::vector<LibUtilities::FieldDefinitionsSharedPtr>
ExpList::
4199 std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
4205 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef)
4214 std::vector<NekDouble> &fielddata)
4228 map<int, int> ElmtID_to_ExpID;
4229 for (i = 0; i < (*m_exp).size(); ++i)
4231 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
4234 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
4236 int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
4237 int datalen = (*m_exp)[eid]->GetNcoeffs();
4238 if ((*
m_exp)[eid]->IsNodalNonTensorialExp())
4244 fielddata.insert(fielddata.end(), &orthocoeffs[0],
4245 &orthocoeffs[0] + datalen);
4258 std::vector<NekDouble> &fielddata, std::string &
field,
4265 const std::shared_ptr<ExpList> &fromExpList,
4282 std::vector<NekDouble> &fielddata, std::string &
field,
4284 [[maybe_unused]] std::unordered_map<int, int> zIdToPlane)
4288 int modes_offset = 0;
4289 int datalen = fielddata.size() / fielddef->m_fields.size();
4292 for (i = 0; i < fielddef->m_fields.size(); ++i)
4294 if (fielddef->m_fields[i] ==
field)
4301 ASSERTL0(i != fielddef->m_fields.size(),
4302 "Field (" +
field +
") not found in file.");
4309 for (i = (*m_exp).size() - 1; i >= 0; --i)
4315 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
4319 if (fielddef->m_uniOrder ==
true)
4325 fielddef->m_shapeType, fielddef->m_numModes, modes_offset);
4327 const int elmtId = fielddef->m_elementIDs[i];
4333 modes_offset += (*m_exp)[0]->GetNumBases();
4337 expId = eIt->second;
4339 bool sameBasis =
true;
4340 for (
int j = 0; j < fielddef->m_basis.size(); ++j)
4342 if (fielddef->m_basis[j] != (*
m_exp)[expId]->GetBasisType(j))
4356 (*m_exp)[expId]->ExtractDataToCoeffs(
4357 &fielddata[offset], fielddef->m_numModes, modes_offset,
4362 modes_offset += (*m_exp)[0]->GetNumBases();
4369 const std::shared_ptr<ExpList> &fromExpList,
4376 map<int, int> GidToEid;
4378 for (i = 0; i < (*m_exp).size(); ++i)
4380 GidToEid[fromExpList->GetExp(i)->GetGeom()->GetGlobalID()] = i;
4383 for (i = 0; i < (*m_exp).size(); ++i)
4385 std::vector<unsigned int> nummodes;
4386 vector<LibUtilities::BasisType> basisTypes;
4388 int eid = GidToEid[(*m_exp)[i]->GetGeom()->GetGlobalID()];
4389 for (
int j = 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
4391 nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
4392 basisTypes.push_back(fromExpList->GetExp(eid)->GetBasisType(j));
4395 offset = fromExpList->GetCoeff_Offset(eid);
4396 (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes, 0,
4408 size_t nTracePts = weightAver.size();
4410 for (
int i = 0; i < nTracePts; ++i)
4412 weightAver[i] = 0.5;
4413 weightJump[i] = 1.0;
4425 int nq = outarray[0].size() / MFdim;
4428 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
4432 for (
int i = 0; i <
m_exp->size(); ++i)
4434 npts = (*m_exp)[i]->GetTotPoints();
4436 for (
int j = 0; j < MFdim * coordim; ++j)
4442 (*m_exp)[i]->GetMetricInfo()->GetMovingFrames(
4443 (*
m_exp)[i]->GetPointsKeys(), MMFdir, CircCentre, MFloc);
4446 for (
int j = 0; j < MFdim; ++j)
4448 for (
int k = 0; k < coordim; ++k)
4472 for (
int i = 0; i < (*m_exp).size(); ++i)
4474 npoints_e = (*m_exp)[i]->GetTotPoints();
4495 "This method is not defined or valid for this class type");
4501 [[maybe_unused]]
int i)
4504 "This method is not defined or valid for this class type");
4505 static std::shared_ptr<ExpList> result;
4528 int i, j, k, e_npoints, offset;
4536 "Input vector does not have sufficient dimensions to "
4540 for (i = 0; i <
m_exp->size(); ++i)
4543 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4544 normals = (*m_exp)[i]->GetPhysNormals();
4550 for (j = 0; j < e_npoints; ++j)
4554 for (k = 0; k < coordim; ++k)
4556 Vn += Vec[k][offset + j] * normals[k * e_npoints + j];
4562 Upwind[offset + j] = Fwd[offset + j];
4566 Upwind[offset + j] = Bwd[offset + j];
4574 "This method is not defined or valid for this class type");
4620 "This method is not defined or valid for this class type");
4621 static std::shared_ptr<ExpList> returnVal;
4628 "This method is not defined or valid for this class type");
4629 static std::shared_ptr<AssemblyMapDG> result;
4636 "This method is not defined or valid for this class type");
4637 static std::shared_ptr<InterfaceMapDG> result;
4643 return GetTraceMap()->GetBndCondIDToGlobalTraceID();
4649 "This method is not defined or valid for this class type");
4650 static std::vector<bool> result;
4667 for (
int i = 0; i < nquad2; ++i)
4669 for (
int j = 0; j < nquad1; ++j)
4671 out[i * nquad1 + j] = in[j * nquad2 + i];
4677 for (
int i = 0; i < nquad2; ++i)
4679 for (
int j = 0; j < nquad1; ++j)
4681 out[i * nquad1 + j] = in[i * nquad1 + j];
4692 for (
int i = 0; i < nquad2; ++i)
4694 for (
int j = 0; j < nquad1 / 2; ++j)
4696 swap(out[i * nquad1 + j], out[i * nquad1 + nquad1 - j - 1]);
4707 for (
int j = 0; j < nquad1; ++j)
4709 for (
int i = 0; i < nquad2 / 2; ++i)
4711 swap(out[i * nquad1 + j], out[(nquad2 - i - 1) * nquad1 + j]);
4728 int i, j, k, e_npoints, offset;
4734 ASSERTL1(normals.size() >= coordim,
4735 "Output vector does not have sufficient dimensions to "
4743 for (i = 0; i <
m_exp->size(); ++i)
4748 loc_exp->GetLeftAdjacentElementExp();
4752 locnormals = loc_elmt->GetTraceNormal(
4753 loc_exp->GetLeftAdjacentElementTrace());
4759 for (j = 0; j < e_npoints; ++j)
4763 for (k = 0; k < coordim; ++k)
4765 normals[k][offset] = locnormals[k][0];
4774 for (i = 0; i <
m_exp->size(); ++i)
4782 traceExp->GetLeftAdjacentElementExp();
4783 int edgeId = traceExp->GetLeftAdjacentElementTrace();
4785 exp2D->GetTraceBasisKey(edgeId).GetPointsKey();
4787 traceExp->GetBasis(0)->GetPointsKey();
4794 bool useRight =
false;
4795 if (traceExp->GetRightAdjacentElementTrace() >= 0)
4798 traceExp->GetRightAdjacentElementExp();
4799 int RedgeId = traceExp->GetRightAdjacentElementTrace();
4801 Rexp2D->GetTraceBasisKey(RedgeId).GetPointsKey();
4807 edgePoints = RedgePoints;
4813 exp2D->GetTraceNormal(edgeId);
4818 for (
int d = 0;
d < coordim; ++
d)
4822 normals[
d].data() + offset);
4828 &normals[
d][offset], 1);
4839 for (i = 0; i <
m_exp->size(); ++i)
4860 traceExp->GetLeftAdjacentElementExp();
4861 int faceId = traceExp->GetLeftAdjacentElementTrace();
4863 exp3D->GetTraceNormal(faceId);
4869 int fromid0, fromid1;
4883 exp3D->GetTraceBasisKey(faceId, fromid0);
4885 exp3D->GetTraceBasisKey(faceId, fromid1);
4887 traceExp->GetBasis(0)->GetBasisKey();
4889 traceExp->GetBasis(1)->GetBasisKey();
4898 exp3D->ReOrientTracePhysMap(orient, map, faceNq0, faceNq1);
4902 for (j = 0; j < coordim; ++j)
4910 traceBasis1.
GetPointsKey(), tmp = normals[j] + offset);
4918 "This method is not defined or valid for this class type");
4945 lengLR[0] = lengthsFwd;
4946 lengLR[1] = lengthsBwd;
4950 int e_npoints0 = -1;
4953 for (
int i = 0; i <
m_exp->size(); ++i)
4955 loc_exp = (*m_exp)[i];
4958 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4959 if (e_npoints0 < e_npoints)
4961 for (
int nlr = 0; nlr < 2; nlr++)
4965 e_npoints0 = e_npoints;
4968 LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
4969 LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
4971 LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
4972 LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
4973 for (
int nlr = 0; nlr < 2; ++nlr)
4976 lengAdd[nlr] = lengintp[nlr];
4977 int bndNumber = LRbndnumbs[nlr];
4978 loc_elmt = LRelmts[nlr];
4981 locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
4984 loc_exp->GetBasis(0)->GetPointsKey();
4986 loc_elmt->GetTraceBasisKey(bndNumber).GetPointsKey();
4995 lengAdd[nlr] = lengintp[nlr];
4998 for (
int j = 0; j < e_npoints; ++j)
5000 lengLR[nlr][offset + j] = lengAdd[nlr][j];
5007 for (
int i = 0; i <
m_exp->size(); ++i)
5009 loc_exp = (*m_exp)[i];
5013 loc_exp->GetBasis(0)->GetBasisKey();
5015 loc_exp->GetBasis(1)->GetBasisKey();
5018 e_npoints = TraceNq0 * TraceNq1;
5019 if (e_npoints0 < e_npoints)
5021 for (
int nlr = 0; nlr < 2; nlr++)
5025 e_npoints0 = e_npoints;
5028 LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
5029 LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
5031 LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
5032 LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
5033 for (
int nlr = 0; nlr < 2; ++nlr)
5036 int bndNumber = LRbndnumbs[nlr];
5037 loc_elmt = LRelmts[nlr];
5040 locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
5044 loc_elmt->GetTraceOrient(bndNumber);
5046 int fromid0, fromid1;
5059 loc_elmt->GetTraceBasisKey(bndNumber, fromid0);
5061 loc_elmt->GetTraceBasisKey(bndNumber, fromid1);
5066 AlignFace(orient, faceNq0, faceNq1, locLeng, alignedLeng);
5073 for (
int j = 0; j < e_npoints; ++j)
5075 lengLR[nlr][offset + j] = lengintp[nlr][j];
5087 "This method is not defined or valid for this class type");
5096 "This method is not defined or valid for this class type");
5103 "This method is not defined or valid for this class type");
5110 [[maybe_unused]]
bool PutFwdInBwdOnBCs, [[maybe_unused]]
bool DoExchange)
5113 "This method is not defined or valid for this class type");
5119 [[maybe_unused]]
bool PutFwdInBwdOnBCs)
5122 "This method is not defined or valid for this class type");
5131 "v_AddTraceQuadPhysToField is not defined for this class type");
5140 "v_AddTraceQuadPhysToOffDiag is not defined for this class");
5150 "v_GetLocTraceFromTracePts is not defined for this class");
5156 "v_GetBndCondBwdWeight is not defined for this class type");
5165 "v_setBndCondBwdWeight is not defined for this class type");
5171 "This method is not defined or valid for this class type");
5172 static vector<bool> tmp;
5180 "This method is not defined or valid for this class type");
5188 "This method is not defined or valid for this class type");
5196 "This method is not defined or valid for this class type");
5206 [[maybe_unused]]
const bool PhysSpaceForcing)
5219 [[maybe_unused]]
const bool PhysSpaceForcing)
5222 "LinearAdvectionDiffusionReactionSolve not implemented.");
5230 [[maybe_unused]]
const NekDouble lambda,
5234 "This method is not defined or valid for this class type");
5238 [[maybe_unused]]
const int npts,
5241 [[maybe_unused]]
bool Shuff, [[maybe_unused]]
bool UnShuff)
5244 "This method is not defined or valid for this class type");
5248 [[maybe_unused]]
const int npts,
5251 [[maybe_unused]]
bool Shuff, [[maybe_unused]]
bool UnShuff)
5254 "This method is not defined or valid for this class type");
5258 [[maybe_unused]]
const int npts,
5264 "This method is not defined or valid for this class type");
5268 [[maybe_unused]]
const int npts,
5274 "This method is not defined or valid for this class type");
5280 [[maybe_unused]]
int BndID)
5283 "This method is not defined or valid for this class type");
5290 [[maybe_unused]]
int BndID)
5293 "This method is not defined or valid for this class type");
5306 (*m_exp)[i]->NormVectorIProductWRTBase(
5316 (*m_exp)[i]->NormVectorIProductWRTBase(
5326 (*m_exp)[i]->NormVectorIProductWRTBase(
5343 "This method is not defined or valid for this class type");
5352 "This method is not defined or valid for this class type");
5358 [[maybe_unused]]
const int nreg,
5362 "This method is not defined or valid for this class type");
5368 "This method is not defined or valid for this class type");
5374 [[maybe_unused]]
bool useComm)
5377 "This method is not defined or valid for this class type");
5383 "This method is not defined or valid for this class type");
5391 "This method is not defined or valid for this class type");
5427 int input_offset{0};
5428 int output_offset{0};
5432 inarray + input_offset,
5433 tmp = outarray + output_offset);
5472 for (i = 0; i < (*m_exp).size(); ++i)
5475 (*m_exp)[i]->GetCoords(e_coord_0);
5479 ASSERTL0(coord_1.size() != 0,
"output coord_1 is not defined");
5481 for (i = 0; i < (*m_exp).size(); ++i)
5485 (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1);
5489 ASSERTL0(coord_1.size() != 0,
"output coord_1 is not defined");
5490 ASSERTL0(coord_2.size() != 0,
"output coord_2 is not defined");
5492 for (i = 0; i < (*m_exp).size(); ++i)
5497 (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1, e_coord_2);
5507 (*m_exp)[eid]->GetCoords(xc0, xc1, xc2);
5517 for (
int i = 0; i <
m_exp->size(); ++i)
5519 for (
int j = 0; j < (*m_exp)[i]->GetNtraces(); ++j)
5521 (*m_exp)[i]->ComputeTraceNormal(j);
5529 [[maybe_unused]]
int i, [[maybe_unused]] std::shared_ptr<ExpList> &result,
5530 [[maybe_unused]]
const bool DeclareCoeffPhysArrays)
5533 "This method is not defined or valid for this class type");
5554 for (cnt = n = 0; n < i; ++n)
5565 elmt =
GetExp(ElmtID[cnt + n]);
5566 elmt->GetTracePhysVals(
5568 tmp1 = element + offsetElmt, tmp2 = boundary + offsetBnd);
5570 offsetElmt += elmt->GetTotPoints();
5586 for (cnt = n = 0; n < i; ++n)
5595 npoints +=
GetExp(ElmtID[cnt + n])->GetTotPoints();
5606 nq =
GetExp(ElmtID[cnt + n])->GetTotPoints();
5608 Vmath::Vcopy(nq, &phys[offsetPhys], 1, &bndElmt[offsetElmt], 1);
5631 for (cnt = n = 0; n < i; ++n)
5643 elmt =
GetExp(ElmtID[cnt + n]);
5644 elmt->GetTracePhysVals(EdgeID[cnt + n],
5646 phys + offsetPhys, tmp1 = bnd + offsetBnd);
5665 for (j = 0; j < coordim; ++j)
5672 for (cnt = n = 0; n < i; ++n)
5682 elmt =
GetExp(ElmtID[cnt + n]);
5684 elmt->GetTraceNormal(EdgeID[cnt + n]);
5687 for (j = 0; j < coordim; ++j)
5690 elmt, normalsElmt[j], tmp = normals[j] + offset);
5701 "This method is not defined or valid for this class type");
5724 "This method is not defined or valid for this class type");
5735 "This method is not defined or valid for this class type");
5744 [[maybe_unused]]
const std::string varName,
5749 "This method is not defined or valid for this class type");
5757 "This method is not defined or valid for this class type");
5758 static map<int, RobinBCInfoSharedPtr> result;
5769 "This method is not defined or valid for this class type");
5774 unsigned int regionId,
const std::string &variable)
5776 auto collectionIter = collection.find(regionId);
5777 ASSERTL1(collectionIter != collection.end(),
5778 "Unable to locate collection " + std::to_string(regionId));
5781 (*collectionIter).second;
5782 auto conditionMapIter = bndCondMap->find(variable);
5783 ASSERTL1(conditionMapIter != bndCondMap->end(),
5784 "Unable to locate condition map.");
5787 (*conditionMapIter).second;
5789 return boundaryCondition;
5795 "This method is not defined or valid for this class type");
5827 if (
m_graph->GetMeshDimension() == (*
m_exp)[0]->GetShapeDimension())
5833 bool verbose = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
5848 : 2 *
m_exp->size());
5850 vector<StdRegions::StdExpansionSharedPtr> collExp;
5855 collExp.push_back(exp);
5859 std::vector<LibUtilities::BasisKey> thisbasisKeys(
5861 std::vector<LibUtilities::BasisKey> prevbasisKeys(
5864 for (
int d = 0;
d < exp->GetNumBases();
d++)
5866 prevbasisKeys[
d] = exp->GetBasis(
d)->GetBasisKey();
5874 int mincol = (*m_exp).size();
5878 for (
int i = 1; i < (*m_exp).size(); i++)
5883 for (
int d = 0;
d < exp->GetNumBases();
d++)
5885 thisbasisKeys[
d] = exp->GetBasis(
d)->GetBasisKey();
5893 if (thisbasisKeys != prevbasisKeys || prevDef != Deformed ||
5903 if (collExp.size() > collsize)
5907 collsize = collExp.size();
5915 mincol = min(mincol, (
int)collExp.size());
5916 maxcol = max(maxcol, (
int)collExp.size());
5917 meancol += collExp.size();
5930 collExp.push_back(exp);
5933 prevbasisKeys = thisbasisKeys;
5940 if (collExp.size() > collsize)
5943 collsize = collExp.size();
5950 mincol = min(mincol, (
int)collExp.size());
5951 maxcol = max(maxcol, (
int)collExp.size());
5952 meancol += collExp.size();
5955 <<
"; mean len = " << meancol <<
" (min = " << mincol
5956 <<
", max = " << maxcol <<
")" << endl;
6034 int input_offset{0};
6035 int output_offset{0};
6039 inarray + input_offset,
6040 tmp = outarray + output_offset);
6062 int nTotElmt = (*m_exp).size();
6063 int nElmtPnt = (*m_exp)[0]->GetTotPoints();
6064 int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
6069 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6071 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6072 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6074 if (tmpPhys.size() != nElmtPnt || tmpCoef.size() != nElmtCoef)
6080 for (
int ncl = 0; ncl < nElmtPnt; ncl++)
6082 tmpPhys[ncl] = inarray[nelmt][ncl];
6084 (*m_exp)[nelmt]->IProductWRTDerivBase(nDirctn, tmpPhys, tmpCoef);
6086 for (
int nrw = 0; nrw < nElmtCoef; nrw++)
6088 (*mtxPerVar[nelmt])(nrw, ncl) = tmpCoef[nrw];
6099 int nTotElmt = (*m_exp).size();
6101 int nspacedim =
m_graph->GetSpaceDimension();
6110 int nElmtPntPrevious = 0;
6111 int nElmtCoefPrevious = 0;
6113 int nElmtPnt, nElmtCoef;
6114 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6116 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6117 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6120 if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
6121 (ElmtTypeNow != ElmtTypePrevious))
6123 if (nElmtPntPrevious != nElmtPnt)
6125 for (
int ndir = 0; ndir < nspacedim; ndir++)
6132 stdExp = (*m_exp)[nelmt]->GetStdExp();
6134 stdExp->DetShapeType(), *stdExp);
6136 ArrayStdMat[0] = stdExp->GetStdMatrix(matkey);
6137 ArrayStdMat_data[0] = ArrayStdMat[0]->GetPtr();
6144 ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
6145 ArrayStdMat_data[1] = ArrayStdMat[1]->GetPtr();
6150 stdExp->DetShapeType(),
6153 ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
6154 ArrayStdMat_data[2] = ArrayStdMat[2]->GetPtr();
6158 ElmtTypePrevious = ElmtTypeNow;
6159 nElmtPntPrevious = nElmtPnt;
6160 nElmtCoefPrevious = nElmtCoef;
6164 for (
int ndir = 0; ndir < nspacedim; ndir++)
6170 for (
int ndir = 0; ndir < nspacedim; ndir++)
6172 (*m_exp)[nelmt]->AlignVectorToCollapsedDir(
6173 ndir, inarray[ndir][nelmt], tmppnts);
6174 for (
int n = 0; n < nspacedim; n++)
6176 Vmath::Vadd(nElmtPnt, tmppnts[n], 1, projectedpnts[n], 1,
6177 projectedpnts[n], 1);
6181 for (
int ndir = 0; ndir < nspacedim; ndir++)
6184 (*m_exp)[nelmt]->MultiplyByQuadratureMetric(projectedpnts[ndir],
6185 projectedpnts[ndir]);
6188 for (
int np = 0; np < nElmtPnt; np++)
6190 NekDouble factor = projectedpnts[ndir][np];
6191 clmnArray = MatDataArray + np * nElmtCoef;
6192 clmnStdMatArray = ArrayStdMat_data[ndir] + np * nElmtCoef;
6193 Vmath::Svtvp(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray,
6206 int nElmtPntPrevious = 0;
6207 int nElmtCoefPrevious = 0;
6208 int nTotElmt = (*m_exp).size();
6209 int nElmtPnt = (*m_exp)[0]->GetTotPoints();
6210 int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
6216 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6218 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6219 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6222 if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
6223 (ElmtTypeNow != ElmtTypePrevious))
6226 stdExp = (*m_exp)[nelmt]->GetStdExp();
6228 stdExp->DetShapeType(), *stdExp);
6231 stdMat_data = BwdMat->GetPtr();
6233 if (nElmtPntPrevious != nElmtPnt)
6238 ElmtTypePrevious = ElmtTypeNow;
6239 nElmtPntPrevious = nElmtPnt;
6240 nElmtCoefPrevious = nElmtCoef;
6243 (*m_exp)[nelmt]->MultiplyByQuadratureMetric(
6249 for (
int np = 0; np < nElmtPnt; np++)
6252 clmnArray = MatDataArray + np * nElmtCoef;
6253 clmnStdMatArray = stdMat_data + np * nElmtCoef;
6254 Vmath::Smul(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray, 1);
6278 std::shared_ptr<LocalRegions::ExpansionVector> traceExp =
6279 tracelist->GetExp();
6280 int ntotTrace = (*traceExp).size();
6281 int nTracePnt, nTraceCoef;
6283 std::shared_ptr<LocalRegions::ExpansionVector> fieldExp =
GetExp();
6289 locTraceToTraceMap->GetLeftRightAdjacentExpId();
6291 locTraceToTraceMap->GetLeftRightAdjacentExpFlag();
6294 locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffMap();
6296 locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffSign();
6301 int MatIndex, nPnts;
6304 int nTracePntsTtl = tracelist->GetTotPoints();
6305 int nlocTracePts = locTraceToTraceMap->GetNLocTracePts();
6306 int nlocTracePtsFwd = locTraceToTraceMap->GetNFwdLocTracePts();
6307 int nlocTracePtsBwd = nlocTracePts - nlocTracePtsFwd;
6310 nlocTracePtsLR[0] = nlocTracePtsFwd;
6311 nlocTracePtsLR[1] = nlocTracePtsBwd;
6313 size_t nFwdBwdNonZero = 0;
6315 for (
int i = 0; i < 2; ++i)
6317 if (nlocTracePtsLR[i] > 0)
6319 tmpIndex[nFwdBwdNonZero] = i;
6325 for (
int i = 0; i < nFwdBwdNonZero; ++i)
6327 nlocTracePtsNonZeroIndex[i] = tmpIndex[i];
6333 for (
int k = 0; k < 2; ++k)
6338 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6340 size_t i = nlocTracePtsNonZeroIndex[k];
6344 int nNumbElmt = fieldMat.size();
6347 for (
int i = 0; i < nNumbElmt; i++)
6349 ElmtMatDataArray[i] = fieldMat[i]->GetPtr();
6353 int nTraceCoefMax = 0;
6354 int nTraceCoefMin = std::numeric_limits<int>::max();
6360 for (
int nt = 0; nt < ntotTrace; nt++)
6362 nTraceCoef = (*traceExp)[nt]->GetNcoeffs();
6363 nTracePnt = tracelist->GetTotPoints(nt);
6364 int noffset = tracelist->GetPhys_Offset(nt);
6365 TraceCoefArray[nt] = nTraceCoef;
6366 TracePntArray[nt] = nTracePnt;
6367 TraceOffArray[nt] = noffset;
6368 FwdMatData[nt] = FwdMat[nt]->GetPtr();
6369 BwdMatData[nt] = BwdMat[nt]->GetPtr();
6370 if (nTraceCoef > nTraceCoefMax)
6372 nTraceCoefMax = nTraceCoef;
6374 if (nTraceCoef < nTraceCoefMin)
6376 nTraceCoefMin = nTraceCoef;
6379 WARNINGL1(nTraceCoefMax == nTraceCoefMin,
6380 "nTraceCoefMax!=nTraceCoefMin: Effeciency may be low ");
6382 int traceID, nfieldPnts, ElmtId, noffset;
6384 locTraceToTraceMap->GetLocTracephysToTraceIDMap();
6386 locTraceToTraceMap->GetLocTraceToFieldMap();
6389 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6391 size_t i = nlocTracePtsNonZeroIndex[k];
6393 Vmath::Vcopy(nlocTracePtsLR[i], &fieldToLocTraceMap[0] + noffset, 1,
6394 &fieldToLocTraceMapLR[i][0], 1);
6395 noffset += nlocTracePtsLR[i];
6399 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6401 size_t nlr = nlocTracePtsNonZeroIndex[k];
6403 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6405 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6406 nTraceCoef = TraceCoefArray[traceID];
6407 ElmtId = LRAdjExpid[nlr][traceID];
6409 nElmtCoef = ElmtCoefArray[ElmtId];
6410 nfieldPnts = fieldToLocTraceMapLR[nlr][nloc];
6411 nPnts = nfieldPnts - noffset;
6413 MatIndexArray[nlr][nloc] = nPnts * nElmtCoef;
6417 for (
int nc = 0; nc < nTraceCoefMin; nc++)
6419 for (
int nt = 0; nt < ntotTrace; nt++)
6421 nTraceCoef = TraceCoefArray[nt];
6422 nTracePnt = TracePntArray[nt];
6423 noffset = TraceOffArray[nt];
6424 Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
6425 &TraceFwdPhy[noffset], 1);
6426 Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
6427 &TraceBwdPhy[noffset], 1);
6430 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6432 size_t i = nlocTracePtsNonZeroIndex[k];
6433 Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
6439 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6441 size_t nlr = nlocTracePtsNonZeroIndex[k];
6442 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6444 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6445 nTraceCoef = TraceCoefArray[traceID];
6446 ElmtId = LRAdjExpid[nlr][traceID];
6447 nrwAdjExp = elmtLRMap[nlr][traceID][nc];
6448 sign = elmtLRSign[nlr][traceID][nc];
6449 MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
6451 ElmtMatDataArray[ElmtId][MatIndex] -=
6452 sign * tmplocTrace[nlr][nloc];
6457 for (
int nc = nTraceCoefMin; nc < nTraceCoefMax; nc++)
6459 for (
int nt = 0; nt < ntotTrace; nt++)
6461 nTraceCoef = TraceCoefArray[nt];
6462 nTracePnt = TracePntArray[nt];
6463 noffset = TraceOffArray[nt];
6464 if (nc < nTraceCoef)
6466 Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
6467 &TraceFwdPhy[noffset], 1);
6468 Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
6469 &TraceBwdPhy[noffset], 1);
6478 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6480 size_t i = nlocTracePtsNonZeroIndex[k];
6481 Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
6486 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6488 size_t nlr = nlocTracePtsNonZeroIndex[k];
6489 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6491 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6492 nTraceCoef = TraceCoefArray[traceID];
6493 if (nc < nTraceCoef)
6495 ElmtId = LRAdjExpid[nlr][traceID];
6496 nrwAdjExp = elmtLRMap[nlr][traceID][nc];
6497 sign = -elmtLRSign[nlr][traceID][nc];
6498 MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
6500 ElmtMatDataArray[ElmtId][MatIndex] +=
6501 sign * tmplocTrace[nlr][nloc];
6513 int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
6526 nelmtcoef0 = nelmtcoef;
6527 nelmtpnts0 = nelmtpnts;
6529 for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
6534 tmpMatQ = ElmtJacQuad[nelmt];
6535 tmpMatC = ElmtJacCoef[nelmt];
6537 MatQ_data = tmpMatQ->GetPtr();
6538 MatC_data = tmpMatC->GetPtr();
6540 if (nelmtcoef != nelmtcoef0)
6543 nelmtcoef0 = nelmtcoef;
6546 if (nelmtpnts != nelmtpnts0)
6549 nelmtpnts0 = nelmtpnts;
6552 for (
int np = 0; np < nelmtcoef; np++)
6554 Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
6556 (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
6557 (*m_exp)[nelmt]->IProductWRTDerivBase(dir, innarray, outarray);
6559 Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
6560 nelmtcoef, &MatC_data[0] + np, nelmtcoef);
6570 int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
6583 nelmtcoef0 = nelmtcoef;
6584 nelmtpnts0 = nelmtpnts;
6586 for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
6591 tmpMatQ = ElmtJacQuad[nelmt];
6592 tmpMatC = ElmtJacCoef[nelmt];
6594 MatQ_data = tmpMatQ->GetPtr();
6595 MatC_data = tmpMatC->GetPtr();
6597 if (nelmtcoef != nelmtcoef0)
6600 nelmtcoef0 = nelmtcoef;
6603 if (nelmtpnts != nelmtpnts0)
6606 nelmtpnts0 = nelmtpnts;
6609 for (
int np = 0; np < nelmtcoef; np++)
6611 Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
6613 (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
6614 (*m_exp)[nelmt]->IProductWRTBase(innarray, outarray);
6616 Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
6617 nelmtcoef, &MatC_data[0] + np, nelmtcoef);
6637 int pt0 = (*m_exp)[i]->GetNumPoints(0);
6638 int pt1 = (*m_exp)[i]->GetNumPoints(1);
6639 int npt0 = (int)pt0 * scale;
6640 int npt1 = (int)pt1 * scale;
6643 npt0, (*
m_exp)[i]->GetPointsType(0));
6645 npt1, (*
m_exp)[i]->GetPointsType(1));
6649 newPointsKey0, newPointsKey1, &inarray[cnt],
6650 (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
6651 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(), &outarray[cnt1]);
6663 int pt0 = (*m_exp)[i]->GetNumPoints(0);
6664 int pt1 = (*m_exp)[i]->GetNumPoints(1);
6665 int pt2 = (*m_exp)[i]->GetNumPoints(2);
6666 int npt0 = (int)pt0 * scale;
6667 int npt1 = (int)pt1 * scale;
6668 int npt2 = (int)pt2 * scale;
6671 npt0, (*
m_exp)[i]->GetPointsType(0));
6673 npt1, (*
m_exp)[i]->GetPointsType(1));
6675 npt2, (*
m_exp)[i]->GetPointsType(2));
6679 newPointsKey0, newPointsKey1, newPointsKey2, &inarray[cnt],
6680 (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
6681 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(),
6682 (*
m_exp)[i]->GetBasis(2)->GetPointsKey(), &outarray[cnt1]);
6684 cnt += npt0 * npt1 * npt2;
6685 cnt1 += pt0 * pt1 * pt2;
#define WARNINGL1(condition, msg)
#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 LIKWID_MARKER_START(regionTag)
#define LIKWID_MARKER_STOP(regionTag)
#define sign(a, b)
return the sign(b)*a
COLLECTIONS_EXPORT OperatorImpMap SetWithTimings(std::vector< StdRegions::StdExpansionSharedPtr > pGeom, OperatorImpMap &impTypes, bool verbose=true)
COLLECTIONS_EXPORT void UpdateOptFile(std::string sessName, LibUtilities::CommSharedPtr &comm)
COLLECTIONS_EXPORT OperatorImpMap GetOperatorImpMap(StdRegions::StdExpansionSharedPtr pExp)
Get Operator Implementation Map from XMl or using default;.
size_t GetMaxCollectionSize()
Describes the specification for a Basis.
int GetNumPoints() const
Return points order at which basis is defined.
BasisType GetBasisType() const
Return type of expansion basis.
PointsKey GetPointsKey() const
Return distribution of points.
int GetNumModes() const
Returns the order of the basis.
static const std::string GetFileType(const std::string &filename, CommSharedPtr comm)
Determine file type of given input file.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Defines a specification for a set of points.
size_t GetNumPoints() const
void AccumulateRegion(std::string, int iolevel=0)
Accumulate elapsed time for a region.
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.
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 AddTraceJacToElmtJac(const Array< OneD, const DNekMatSharedPtr > &FwdMat, const Array< OneD, const DNekMatSharedPtr > &BwdMat, Array< OneD, DNekMatSharedPtr > &fieldMat)
inverse process of v_GetFwdBwdTracePhys. Given Trace integration of Fwd and Bwd Jacobian,...
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function calculates the inner product of a function with respect to all local expansion modes .
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions()
std::shared_ptr< ExpList > & GetTrace()
int GetNcoeffs(void) const
Returns the total number of local degrees of freedom .
virtual void v_ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > & GetGlobalLinSysManager(void)
ExpList(const ExpansionType Type=eNoType)
The default constructor using a type.
void CreateCollections(Collections::ImplementationType ImpType=Collections::eNoImpType)
Construct collections of elements containing a single element type and polynomial order from the list...
virtual void v_GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
void ExponentialFilter(Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
std::shared_ptr< GlobalMatrix > GenGlobalMatrix(const GlobalMatrixKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
Generates a global matrix from the given key and map.
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void AddRightIPTPhysDerivBase(const int dir, const Array< OneD, const DNekMatSharedPtr > ElmtJacQuad, Array< OneD, DNekMatSharedPtr > ElmtJacCoef)
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false, int cachedId=-1, NekDouble maxDistance=1e6)
This function returns the index of the local elemental expansion containing the arbitrary point given...
virtual GlobalLinSysKey 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)
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
BlockMatrixMapShPtr m_blockMat
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
multiply the metric jacobi and quadrature weights
virtual void v_LinearAdvectionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
void WriteVtkPieceFooter(std::ostream &outfile, int expansion)
virtual void v_ExtractPhysToBnd(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
void GetBwdWeight(Array< OneD, NekDouble > &weightAver, Array< OneD, NekDouble > &weightJump)
Get the weight value for boundary conditions for boundary average and jump calculations.
virtual void v_AddTraceIntegralToOffDiag(const Array< OneD, const NekDouble > &FwdFlux, const Array< OneD, const NekDouble > &BwdFlux, Array< OneD, NekDouble > &outarray)
virtual std::vector< bool > & v_GetLeftAdjacentTraces(void)
void InitialiseExpVector(const SpatialDomains::ExpansionInfoMap &expmap)
Define a list of elements using the geometry and basis key information in expmap;.
void SetupCoeffPhys(bool DeclareCoeffPhysArrays=true, bool SetupOffsets=true)
Definition of the total number of degrees of freedom and quadrature points and offsets to access data...
static SpatialDomains::BoundaryConditionShPtr GetBoundaryCondition(const SpatialDomains::BoundaryConditionCollection &collection, unsigned int index, const std::string &variable)
virtual void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
virtual void v_GetLocTraceFromTracePts(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &locTraceFwd, Array< OneD, NekDouble > &locTraceBwd)
virtual void v_WriteTecplotHeader(std::ostream &outfile, std::string var="")
virtual std::shared_ptr< ExpList > & v_GetPlane(int n)
int GetCoeff_Offset(int n) const
Get the start offset position for a local contiguous list of coeffs correspoinding to element n.
int GetExpSize(void)
This function returns the number of elements in the expansion.
virtual void v_AddTraceQuadPhysToOffDiag(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
virtual void v_ClearGlobalLinSysManager(void)
virtual void v_UnsetGlobalLinSys(GlobalLinSysKey, bool)
void GeneralGetFieldDefinitions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, int NumHomoDir=0, Array< OneD, LibUtilities::BasisSharedPtr > &HomoBasis=LibUtilities::NullBasisSharedPtr1DArray, std::vector< NekDouble > &HomoLen=LibUtilities::NullNekDoubleVector, bool homoStrips=false, std::vector< unsigned int > &HomoSIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoZIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoYIDs=LibUtilities::NullUnsignedIntVector)
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
virtual void v_CurlCurl(Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
virtual void v_LocalToGlobal(bool UseComm)
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
virtual LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > & v_GetGlobalLinSysManager(void)
virtual void v_DealiasedDotProd(const int num_dofs, const Array< OneD, Array< OneD, NekDouble > > &inarray1, const Array< OneD, Array< OneD, NekDouble > > &inarray2, Array< OneD, Array< OneD, NekDouble > > &outarray)
virtual ~ExpList()
The default destructor.
virtual void v_FwdTransLocalElmt(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int GetPoolCount(std::string)
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Array< OneD, const unsigned int > GetZIDs(void)
This function returns a vector containing the wave numbers in z-direction associated with the 3D homo...
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)
void ClearGlobalLinSysManager(void)
virtual const std::vector< bool > & v_GetLeftAdjacentFaces(void) const
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
std::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
virtual void v_GetMovingFrames(const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &outarray)
size_t GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
virtual std::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Array< OneD, std::pair< int, int > > m_coeffsToElmt
m_coeffs to elemental value map
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
NekDouble PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &phys)
virtual GlobalLinSysKey v_LinearAdvectionDiffusionReactionSolve(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)
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
virtual void v_ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs, std::unordered_map< int, int > zIdToPlane)
Extract data from raw field data into expansion list.
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
virtual const Array< OneD, const int > & v_GetTraceBndMap()
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
virtual NekDouble v_GetHomoLen(void)
const LocTraceToTraceMapSharedPtr & GetLocTraceToTraceMap() const
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
void ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Extract the data from fromField using fromExpList the coeffs using the basic ExpList Elemental expans...
void GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
This function calculates the coordinates of all the elemental quadrature points .
void ResetMatrices()
Reset matrices.
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...
virtual void v_SetBndCondBwdWeight(const int index, const NekDouble value)
void UnsetGlobalLinSys(GlobalLinSysKey, bool)
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
std::vector< bool > m_collectionsDoInit
Vector of bools to act as an initialise on first call flag.
bool m_physState
The state of the array m_phys.
virtual void v_HomogeneousFwdTrans(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool Shuff=true, bool UnShuff=true)
void ExtractCoeffsFromFile(const std::string &fileName, LibUtilities::CommSharedPtr comm, const std::string &varName, Array< OneD, NekDouble > &coeffs)
virtual void v_DealiasedProd(const int num_dofs, const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray)
void AddRightIPTBaseMatrix(const Array< OneD, const DNekMatSharedPtr > ElmtJacQuad, Array< OneD, DNekMatSharedPtr > ElmtJacCoef)
void GetLocTraceFromTracePts(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &locTraceFwd, Array< OneD, NekDouble > &locTraceBwd)
virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, std::string var)
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
std::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
int GetShapeDimension()
This function returns the dimension of the shape of the element eid.
NekDouble H1(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Calculates the error of the global spectral/hp element approximation.
LibUtilities::CommSharedPtr m_comm
Communicator.
std::shared_ptr< GlobalLinSys > GenGlobalLinSys(const GlobalLinSysKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
This operation constructs the global linear system of type mkey.
void WriteVtkHeader(std::ostream &outfile)
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 GenerateElementVector(const int ElementID, const NekDouble scalar1, const NekDouble scalar2, Array< OneD, NekDouble > &outarray)
Generate vector v such that v[i] = scalar1 if i is in the element < ElementID. Otherwise,...
std::shared_ptr< DNekMat > GenGlobalMatrixFull(const GlobalLinSysKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
virtual void v_ExtractElmtToBndPhys(const int i, const Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
virtual void v_ExtractPhysToBndElmt(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
virtual std::shared_ptr< InterfaceMapDG > & v_GetInterfaceMap()
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
virtual void v_Upwind(const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
virtual void v_FillBwdWithBwdWeight(Array< OneD, NekDouble > &weightave, Array< OneD, NekDouble > &weightjmp)
virtual void v_Curl(Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function calculates the result of the multiplication of a matrix of type specified by mkey with ...
virtual void v_SetUpPhysNormals()
: Set up a normal along the trace elements between two elements at elemental level
virtual void v_GlobalToLocal(void)
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition(void)
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.
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_AddTraceQuadPhysToField(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
virtual const Array< OneD, const NekDouble > & v_GetBndCondBwdWeight()
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
void WriteVtkFooter(std::ostream &outfile)
void MultiplyByBlockMatrix(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual std::shared_ptr< ExpList > & v_GetTrace()
void GetElmtNormalLength(Array< OneD, NekDouble > &lengthsFwd, Array< OneD, NekDouble > &lengthsBwd)
Get the length of elements in boundary normal direction.
virtual NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &inarray)
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
void IProductWRTDirectionalDerivBase(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Directional derivative along a given direction.
void FillBwdWithBwdWeight(Array< OneD, NekDouble > &weightave, Array< OneD, NekDouble > &weightjmp)
Fill Bwd with boundary conditions.
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
void GetMatIpwrtDeriveBase(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const int nDirctn, Array< OneD, DNekMatSharedPtr > &mtxPerVar)
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
virtual void v_WriteTecplotField(std::ostream &outfile, int expansion)
virtual void v_FillBndCondFromField(const Array< OneD, NekDouble > coeffs)
Collections::CollectionVector m_collections
virtual int v_GetPoolCount(std::string)
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_HomogeneousBwdTrans(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool Shuff=true, bool UnShuff=true)
void ApplyGeomInfo()
Apply geometry information to each expansion.
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
virtual void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
std::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
LibUtilities::SessionReaderSharedPtr m_session
Session.
virtual void v_PeriodicBwdCopy(const Array< OneD, const NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
virtual void v_FillBwdWithBoundCond(const Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd, bool PutFwdInBwdOnBCs)
void DivideByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Divided by the metric jacobi and quadrature weights.
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
virtual void v_SetHomoLen(const NekDouble lhom)
void Upwind(const Array< OneD, const NekDouble > &Vn, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Populate normals with the normals of all expansions.
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
void PhysDeriv(Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
void MultiplyByElmtInvMass(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function elementally mulplies the coefficient space of Sin my the elemental inverse of the mass ...
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function elementally evaluates the backward transformation of the global spectral/hp element exp...
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual std::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
int GetPhys_Offset(int n) const
Get the start offset position for a local contiguous list of quadrature points in a full array corres...
virtual const std::shared_ptr< LocTraceToTraceMap > & v_GetLocTraceToTraceMap(void) const
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs, std::unordered_map< int, int > zIdToPlane=std::unordered_map< int, int >())
Extract the data in fielddata into the coeffs.
ExpansionType m_expType
Expansion type.
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
ExpansionType GetExpType(void)
Returns the type of the expansion.
NekDouble Linf(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
This function calculates the error of the global spectral/hp element approximation.
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
void GetDiagMatIpwrtBase(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, DNekMatSharedPtr > &mtxPerVar)
Describe a linear system.
GlobalSysSolnType GetGlobalSysSolnType() const
Return the associated solution type.
Describes a matrix with ordering defined by a local to global map.
const StdRegions::ConstFactorMap & GetConstFactors() const
Returns all the constants.
int GetNVarCoeffs() const
LibUtilities::ShapeType GetShapeType() const
Return the expansion type associated with key.
const StdRegions::VarCoeffMap & GetVarCoeffs() const
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
Class representing a prismatic element in reference space.
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
std::map< OperatorType, ImplementationType > OperatorImpMap
@ eLinearAdvectionDiffusionReaction
void PhysGalerkinProject3D(const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
std::vector< BasisKey > BasisKeyVector
Name for a vector of BasisKeys.
std::shared_ptr< FieldIO > FieldIOSharedPtr
static const BasisKey NullBasisKey(eNoBasisType, 0, NullPointsKey)
Defines a null basis with no type or points.
void Interp1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
this function interpolates a 1D function evaluated at the quadrature points of the basis fbasis0 to ...
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis,...
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset=0)
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
std::shared_ptr< Transposition > TranspositionSharedPtr
@ eNodalTriElec
2D Nodal Electrostatic Points on a Triangle
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
void PhysGalerkinProject2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
@ eOrtho_A
Principle Orthogonal Functions .
@ eGLL_Lagrange
Lagrange for SEM basis .
std::shared_ptr< PointExp > PointExpSharedPtr
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
std::vector< ExpansionSharedPtr > ExpansionVector
MultiRegions::Direction const DirCartesianMap[]
@ eSIZE_GlobalSysSolnType
void AlignFace(const StdRegions::Orientation orient, const int nquad1, const int nquad2, const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out)
Helper function to re-align face to a given orientation.
static ExpListSharedPtr NullExpListSharedPtr
std::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
const char *const GlobalSysSolnTypeMap[]
static LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > NullGlobalLinSysManager
std::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
std::shared_ptr< GlobalMatrix > GlobalMatrixSharedPtr
Shared pointer to a GlobalMatrix object.
GlobalLinSysFactory & GetGlobalLinSysFactory()
static LocTraceToTraceMapSharedPtr NullLocTraceToTraceMapSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
static GlobalLinSysKey NullGlobalLinSysKey(StdRegions::eNoMatrixType)
std::shared_ptr< LocTraceToTraceMap > LocTraceToTraceMapSharedPtr
std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
std::map< int, std::vector< PeriodicEntity > > PeriodicMap
std::map< GlobalMatrixKey, DNekScalBlkMatSharedPtr > BlockMatrixMap
A map between global matrix keys and their associated block matrices.
static const NekDouble kNekZeroTol
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
GeomMMF
Principle direction for MMF.
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
std::shared_ptr< PrismGeom > PrismGeomSharedPtr
std::shared_ptr< std::vector< std::pair< GeometrySharedPtr, int > > > GeometryLinkSharedPtr
std::map< int, BoundaryConditionMapShPtr > BoundaryConditionCollection
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< HexGeom > HexGeomSharedPtr
std::shared_ptr< SegGeom > SegGeomSharedPtr
std::shared_ptr< PyrGeom > PyrGeomSharedPtr
std::shared_ptr< ExpansionInfo > ExpansionInfoShPtr
std::shared_ptr< TetGeom > TetGeomSharedPtr
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::shared_ptr< Geometry > GeometrySharedPtr
std::shared_ptr< TriGeom > TriGeomSharedPtr
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
std::map< int, ExpansionInfoShPtr > ExpansionInfoMap
std::map< int, CompositeSharedPtr > CompositeMap
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
@ eLinearAdvectionDiffusionReaction
VarCoeffMap RestrictCoeffMap(const VarCoeffMap &m, size_t offset, size_t cnt)
std::map< ConstFactorType, NekDouble > ConstFactorMap
@ eDir1BwdDir2_Dir2BwdDir1
@ eDir1BwdDir1_Dir2BwdDir2
@ eDir1BwdDir2_Dir2FwdDir1
@ eDir1FwdDir1_Dir2BwdDir2
@ eDir1BwdDir1_Dir2FwdDir2
@ eDir1FwdDir2_Dir2FwdDir1
@ eDir1FwdDir2_Dir2BwdDir1
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
std::vector< double > z(NPUPPER)
std::vector< double > d(NPUPPER *NPUPPER)
StdRegions::ConstFactorMap factors
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::pair< IndexType, IndexType > CoordType
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
@ ePOSITIVE_DEFINITE_SYMMETRIC_BANDED
@ ePOSITIVE_DEFINITE_SYMMETRIC
std::map< CoordType, NekDouble > COOMatType
static Array< OneD, NekDouble > NullNekDouble1DArray
std::shared_ptr< DNekMat > DNekMatSharedPtr
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*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 Scatr(int n, const T *x, const int *y, T *z)
Scatter vector z[y[i]] = x[i].
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.
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
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 > abs(scalarT< T > in)
scalarT< T > sqrt(scalarT< T > in)
Used to lookup the create function in NekManager.
std::shared_ptr< RobinBCInfo > next