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 DoOptOnCollection =
1301 m_session->DefinesCmdLineArgument(
"no-exp-opt") ? false :
true;
1303 for (
auto &compIt : domain)
1305 bool IsNot0D =
true;
1307 for (j = 0; j < compIt.second->m_geomVec.size(); ++j)
1312 compIt.second->m_geomVec[j], PtBvec);
1314 if ((SegGeom = std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1315 compIt.second->m_geomVec[j])))
1319 auto expInfo = expansions.find(SegGeom->GetGlobalID());
1320 eInfo = expInfo->second;
1326 graph->GetElementsFromEdge(SegGeom);
1332 int edge_id = elmts->at(0).second;
1334 graph->GetExpansionInfo(geom, variable);
1344 else if (geom->GetShapeType() ==
1353 "Fail to cast geom to a known 2D shape.");
1357 eInfo->m_basisKeyVector.push_back(
1358 elmtStdExp->GetTraceBasisKey(edge_id));
1362 std::dynamic_pointer_cast<SpatialDomains::TriGeom>(
1363 compIt.second->m_geomVec[j])))
1367 graph->GetElementsFromFace(TriGeom);
1372 int face_id = elmts->at(0).second;
1373 auto expInfo = expansions.find(geom->GetGlobalID());
1374 ASSERTL0(expInfo != expansions.end(),
1375 "Failed to find expansion info");
1377 expInfo->second->m_basisKeyVector[0];
1379 expInfo->second->m_basisKeyVector[1];
1381 expInfo->second->m_basisKeyVector[2];
1404 "Fail to cast geom to a known 3D shape.");
1409 elmtStdExp->GetTraceBasisKey(face_id, 0);
1411 elmtStdExp->GetTraceBasisKey(face_id, 1);
1413 if (geom->GetForient(face_id) >= 9)
1415 std::swap(TriBa, TriBb);
1418 eInfo->m_basisKeyVector.push_back(TriBa);
1419 eInfo->m_basisKeyVector.push_back(TriBb);
1421 else if ((QuadGeom =
1422 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1423 compIt.second->m_geomVec[j])))
1427 graph->GetElementsFromFace(QuadGeom);
1432 int face_id = elmts->at(0).second;
1433 auto expInfo = expansions.find(geom->GetGlobalID());
1434 ASSERTL0(expInfo != expansions.end(),
1435 "Failed to find expansion info");
1437 expInfo->second->m_basisKeyVector[0];
1439 expInfo->second->m_basisKeyVector[1];
1441 expInfo->second->m_basisKeyVector[2];
1464 "Fail to cast geom to a known 3D shape.");
1469 elmtStdExp->GetTraceBasisKey(face_id, 0);
1471 elmtStdExp->GetTraceBasisKey(face_id, 1);
1473 if (geom->GetForient(face_id) >= 9)
1475 std::swap(QuadBa, QuadBb);
1478 eInfo->m_basisKeyVector.push_back(QuadBa);
1479 eInfo->m_basisKeyVector.push_back(QuadBb);
1486 if (DoOptOnCollection && IsNot0D)
1489 for (i = 0; i < cnt; ++i)
1491 if ((eInfo->m_basisKeyVector ==
1492 ExpOrder[i][0]->m_basisKeyVector) &&
1493 (eInfo->m_geomShPtr->GetGeomFactors()->GetGtype() ==
1495 ->m_geomShPtr->GetGeomFactors()
1498 ExpOrder[i].push_back(eInfo);
1505 ExpOrder[cnt++].push_back(eInfo);
1510 ExpOrder[0].push_back(eInfo);
1516 for (
auto &ordIt : ExpOrder)
1518 for (
auto &eit : ordIt.second)
1521 if ((PtGeom = std::dynamic_pointer_cast<SpatialDomains::PointGeom>(
1530 std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1535 if (SetToOneSpaceDimension)
1538 SegGeom->GenerateOneSpaceDimGeom();
1542 eit->m_basisKeyVector[0], OneDSegmentGeom);
1548 eit->m_basisKeyVector[0], SegGeom);
1552 std::dynamic_pointer_cast<SpatialDomains::TriGeom>(
1557 if (eit->m_basisKeyVector[0].GetBasisType() ==
1564 eit->m_basisKeyVector[1], TriNb,
1571 eit->m_basisKeyVector[0], eit->m_basisKeyVector[1],
1575 else if ((QuadGeom =
1576 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1582 eit->m_basisKeyVector[0], eit->m_basisKeyVector[1],
1588 "dynamic cast to a Geom (possibly 3D) failed");
1591 exp->SetElmtId(elmtid++);
1592 (*m_exp).push_back(exp);
1627 for (i = 0; i <
m_exp->size(); ++i)
1632 m_npoints += (*m_exp)[i]->GetTotPoints();
1636 if (DeclareCoeffPhysArrays)
1644 for (
int i = 0; i <
m_exp->size(); ++i)
1648 int loccoeffs = (*m_exp)[i]->GetNcoeffs();
1650 for (
int j = 0; j < loccoeffs; ++j)
1686 bool DoOptOnCollection =
1687 m_session->DefinesCmdLineArgument(
"no-exp-opt") ? false :
true;
1688 map<int, vector<int>> ExpOrder;
1689 if (DoOptOnCollection)
1691 auto expIt = expmap.begin();
1694 ExpOrder[cnt++].push_back(expIt->first);
1698 for (; expIt != expmap.end(); ++expIt)
1701 for (i = 0; i < cnt; ++i)
1704 expmap.find(ExpOrder[i][0])->second;
1706 if ((expIt->second->m_basisKeyVector ==
1707 expInfo->m_basisKeyVector) &&
1708 (expIt->second->m_geomShPtr->GetGeomFactors()->GetGtype() ==
1709 expInfo->m_geomShPtr->GetGeomFactors()->GetGtype()))
1711 ExpOrder[i].push_back(expIt->first);
1718 ExpOrder[cnt++].push_back(expIt->first);
1724 for (
auto &expIt : expmap)
1726 ExpOrder[0].push_back(expIt.first);
1733 for (
auto &it : ExpOrder)
1735 for (
int c = 0; c < it.second.size(); ++c)
1737 auto expIt = expmap.find(it.second[c]);
1741 switch (expInfo->m_basisKeyVector.size())
1746 "Cannot mix expansion dimensions in one vector");
1750 std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1751 expInfo->m_geomShPtr)))
1755 expInfo->m_basisKeyVector[0];
1763 "dynamic cast to a 1D Geom failed");
1770 "Cannot mix expansion dimensions in one vector");
1776 if ((TriangleGeom = std::dynamic_pointer_cast<
1777 SpatialDomains ::TriGeom>(expInfo->m_geomShPtr)))
1798 else if ((QuadrilateralGeom = std::dynamic_pointer_cast<
1800 expInfo->m_geomShPtr)))
1808 "dynamic cast to a 2D Geom failed");
1815 "Cannot mix expansion dimensions in one vector");
1823 std::dynamic_pointer_cast<SpatialDomains::TetGeom>(
1824 expInfo->m_geomShPtr)))
1831 "LocalRegions::NodalTetExp is not implemented "
1840 else if ((PrismGeom = std::dynamic_pointer_cast<
1841 SpatialDomains ::PrismGeom>(
1842 expInfo->m_geomShPtr)))
1847 else if ((PyrGeom = std::dynamic_pointer_cast<
1849 expInfo->m_geomShPtr)))
1855 else if ((HexGeom = std::dynamic_pointer_cast<
1857 expInfo->m_geomShPtr)))
1866 "dynamic cast to a Geom failed");
1872 "Dimension of basis key is greater than 3");
1877 exp->SetElmtId(
id++);
1880 (*m_exp).push_back(exp);
1911 int nrows = blockmat->GetRows();
1912 int ncols = blockmat->GetColumns();
1919 out = (*blockmat) * in;
1931 for (
int i = 0; i < (*m_exp).size(); ++i)
1933 (*m_exp)[i]->MultiplyByQuadratureMetric(inarray +
m_phys_offset[i],
1934 e_outarray = outarray +
1948 for (
int i = 0; i < (*m_exp).size(); ++i)
1950 (*m_exp)[i]->DivideByQuadratureMetric(inarray +
m_phys_offset[i],
1976 for (i = 0; i < (*m_exp).size(); ++i)
1978 (*m_exp)[i]->IProductWRTDerivBase(dir, inarray +
m_phys_offset[i],
1994 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
1995 int nq = direction.size() / coordim;
2002 for (
int i = 0; i < (*m_exp).size(); ++i)
2004 npts_e = (*m_exp)[i]->GetTotPoints();
2007 for (
int k = 0; k < coordim; ++k)
2010 &locdir[k * npts_e], 1);
2013 (*m_exp)[i]->IProductWRTDirectionalDerivBase(
2038 ASSERTL1(inarray.size() >= dim,
"inarray is not of sufficient dimension");
2051 int input_offset{0};
2052 int output_offset{0};
2063 inarray[0] + input_offset, tmp0 = outarray + output_offset);
2075 inarray[0] + input_offset, tmp0 = inarray[1] + input_offset,
2076 tmp1 = outarray + output_offset);
2088 inarray[0] + input_offset, tmp0 = inarray[1] + input_offset,
2089 tmp1 = inarray[2] + input_offset,
2090 tmp2 = outarray + output_offset);
2166 e_out_d0 = out_d0 + offset;
2167 e_out_d1 = out_d1 + offset;
2168 e_out_d2 = out_d2 + offset;
2170 inarray + offset, e_out_d0, e_out_d1,
2195 for (i = 0; i < (*m_exp).size(); ++i)
2198 (*m_exp)[i]->PhysDeriv_s(inarray +
m_phys_offset[i], e_out_ds);
2204 for (i = 0; i < (*m_exp).size(); i++)
2207 (*m_exp)[i]->PhysDeriv_n(inarray +
m_phys_offset[i], e_out_dn);
2223 int intdir = (int)edir;
2228 e_out_d = out_d + offset;
2230 inarray + offset, e_out_d);
2276 ASSERTL0(0,
"Dimension not supported by ExpList::Curl");
2297 bool halfMode =
false;
2300 m_session->MatchSolverInfo(
"ModeType",
"HalfMode", halfMode,
false);
2352 ASSERTL0(0,
"Dimension not supported");
2363 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
2364 int nq = direction.size() / coordim;
2370 for (
int i = 0; i < (*m_exp).size(); ++i)
2372 npts_e = (*m_exp)[i]->GetTotPoints();
2375 for (
int k = 0; k < coordim; ++k)
2378 &locdir[k * npts_e], 1);
2381 (*m_exp)[i]->PhysDirectionalDeriv(inarray +
m_phys_offset[i], locdir,
2393 for (
int i = 0; i < (*m_exp).size(); ++i)
2395 (*m_exp)[i]->ExponentialFilter(e_array = array +
m_phys_offset[i],
2396 alpha, exponent, cutoff);
2416 if (inarray.get() == outarray.get())
2419 out = (*InvMass) * in;
2424 out = (*InvMass) * in;
2463 for (i = 0; i < (*m_exp).size(); ++i)
2465 (*m_exp)[i]->FwdTransBndConstrained(inarray +
m_phys_offset[i],
2492 "Smoothing is currently not allowed unless you are using "
2493 "a nodal base for efficiency reasons. The implemented "
2494 "smoothing technique requires the mass matrix inversion "
2495 "which is trivial just for GLL_LAGRANGE_SEM and "
2496 "GAUSS_LAGRANGE_SEMexpansions.");
2524 map<int, int> elmt_id;
2529 for (i = 0; i < (*m_exp).size(); ++i)
2533 elmt_id[n_exp++] = i;
2539 n_exp = (*m_exp).size();
2540 for (i = 0; i < n_exp; ++i)
2554 for (i = 0; i < n_exp; ++i)
2556 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
2557 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2564 for (i = 0; i < n_exp; ++i)
2566 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2567 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
2578 for (i = 0; i < n_exp; ++i)
2580 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2581 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2589 for (i = 0; i < n_exp; ++i)
2591 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2593 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2600 for (i = 0; i < n_exp; ++i)
2603 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2605 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2612 "Global Matrix creation not defined for this "
2625 for (i = cnt1 = 0; i < n_exp; ++i)
2636 (*
m_exp)[i]->GetTotPoints());
2643 loc_mat = std::dynamic_pointer_cast<LocalRegions::Expansion>(
2644 (*
m_exp)[elmt_id.find(i)->second])
2645 ->GetLocMatrix(matkey);
2646 BlkMatrix->SetBlock(i, i, loc_mat);
2663 return matrixIter->second;
2740 int input_offset{0};
2741 int output_offset{0};
2746 m_collections[i].ApplyOperator(opType, inarray + input_offset,
2747 tmp = outarray + output_offset);
2755 for (
int i = 0; i < (*m_exp).size(); ++i)
2765 (*
m_exp)[i]->GetTotPoints());
2772 (*m_exp)[i]->GeneralMatrixOp(
2789 int i, j, n, gid1, gid2, cntdim1, cntdim2;
2793 unsigned int glob_rows = 0;
2794 unsigned int glob_cols = 0;
2795 unsigned int loc_rows = 0;
2796 unsigned int loc_cols = 0;
2798 bool assembleFirstDim =
false;
2799 bool assembleSecondDim =
false;
2806 glob_cols = locToGloMap->GetNumGlobalCoeffs();
2808 assembleFirstDim =
false;
2809 assembleSecondDim =
true;
2814 glob_rows = locToGloMap->GetNumGlobalCoeffs();
2817 assembleFirstDim =
true;
2818 assembleSecondDim =
false;
2826 glob_rows = locToGloMap->GetNumGlobalCoeffs();
2827 glob_cols = locToGloMap->GetNumGlobalCoeffs();
2829 assembleFirstDim =
true;
2830 assembleSecondDim =
true;
2836 "Global Matrix creation not defined for this "
2848 for (n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
2859 (*
m_exp)[eid]->GetTotPoints());
2867 std::dynamic_pointer_cast<LocalRegions::Expansion>((*
m_exp)[n])
2868 ->GetLocMatrix(matkey);
2870 loc_rows = loc_mat->GetRows();
2871 loc_cols = loc_mat->GetColumns();
2873 for (i = 0; i < loc_rows; ++i)
2875 if (assembleFirstDim)
2877 gid1 = locToGloMap->GetLocalToGlobalMap(cntdim1 + i);
2878 sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
2886 for (j = 0; j < loc_cols; ++j)
2888 if (assembleSecondDim)
2890 gid2 = locToGloMap->GetLocalToGlobalMap(cntdim2 + j);
2891 sign2 = locToGloMap->GetLocalToGlobalSign(cntdim2 + j);
2900 coord = make_pair(gid1, gid2);
2901 if (spcoomat.count(coord) == 0)
2903 spcoomat[coord] = sign1 * sign2 * (*loc_mat)(i, j);
2907 spcoomat[coord] += sign1 * sign2 * (*loc_mat)(i, j);
2911 cntdim1 += loc_rows;
2912 cntdim2 += loc_cols;
2916 glob_cols, spcoomat);
2922 int i, j, n, gid1, gid2, loc_lda, eid;
2926 int totDofs = locToGloMap->GetNumGlobalCoeffs();
2927 int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
2929 unsigned int rows = totDofs - NumDirBCs;
2930 unsigned int cols = totDofs - NumDirBCs;
2934 int bwidth = locToGloMap->GetFullSystemBandWidth();
2946 if ((2 * (bwidth + 1)) < rows)
2950 rows, cols, zero, matStorage, bwidth, bwidth);
2956 rows, cols, zero, matStorage);
2965 rows, cols, zero, matStorage);
2970 for (n = 0; n < (*m_exp).size(); ++n)
2981 (*
m_exp)[eid]->GetTotPoints());
2989 std::dynamic_pointer_cast<LocalRegions::Expansion>((*
m_exp)[n])
2990 ->GetLocMatrix(matkey);
2997 int rows = loc_mat->GetRows();
2998 int cols = loc_mat->GetColumns();
2999 const NekDouble *dat = loc_mat->GetRawPtr();
3002 Blas::Dscal(rows * cols, loc_mat->Scale(), new_mat->GetRawPtr(), 1);
3007 (*m_exp)[n]->AddRobinMassMatrix(
3008 rBC->m_robinID, rBC->m_robinPrimitiveCoeffs, new_mat);
3017 loc_lda = loc_mat->GetColumns();
3019 for (i = 0; i < loc_lda; ++i)
3023 sign1 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + i);
3026 for (j = 0; j < loc_lda; ++j)
3031 sign2 = locToGloMap->GetLocalToGlobalSign(
3039 if ((matStorage ==
eFULL) || (gid2 >= gid1))
3041 value = Gmat->GetValue(gid1, gid2) +
3042 sign1 * sign2 * (*loc_mat)(i, j);
3043 Gmat->SetValue(gid1, gid2, value);
3093 const map<int, RobinBCInfoSharedPtr> vRobinBCInfo =
GetRobinBCInfo();
3150 int input_offset{0};
3151 int output_offset{0};
3155 inarray + input_offset,
3156 tmp = outarray + output_offset);
3182 NekDouble tol,
bool returnNearestElmt,
int cachedId,
3187 return GetExpIndex(gloCoord, Lcoords, tol, returnNearestElmt, cachedId,
3193 bool returnNearestElmt,
int cachedId,
3206 for (
int i = (*m_exp).size() - 1; i >= 0; --i)
3217 if (cachedId >= 0 && cachedId < (*m_exp).size())
3220 if ((*
m_exp)[cachedId]->GetGeom()->ContainsPoint(gloCoords, locCoords,
3225 else if (returnNearestElmt && (nearpt < nearpt_min))
3230 nearpt_min = nearpt;
3231 Vmath::Vcopy(locCoords.size(), locCoords, 1, savLocCoords, 1);
3235 NekDouble x = (gloCoords.size() > 0 ? gloCoords[0] : 0.0);
3236 NekDouble y = (gloCoords.size() > 1 ? gloCoords[1] : 0.0);
3237 NekDouble z = (gloCoords.size() > 2 ? gloCoords[2] : 0.0);
3244 std::vector<int> elmts =
m_graph->GetElementsContainingPoint(
p);
3247 for (
int i = 0; i < elmts.size(); ++i)
3254 if ((*
m_exp)[
id]->GetGeom()->ContainsPoint(gloCoords, locCoords, tol,
3259 else if (returnNearestElmt && (nearpt < nearpt_min))
3264 nearpt_min = nearpt;
3265 Vmath::Vcopy(locCoords.size(), locCoords, 1, savLocCoords, 1);
3271 if (returnNearestElmt && nearpt_min <= maxDistance)
3273 Vmath::Vcopy(locCoords.size(), savLocCoords, 1, locCoords, 1);
3274 std::string
msg =
"Failed to find point within a tolerance of " +
3275 boost::lexical_cast<std::string>(tol) +
3276 ", using local point (";
3277 for (
size_t j = 0; j < locCoords.size(); ++j)
3279 msg += boost::lexical_cast<std::string>(savLocCoords[j]);
3280 if (j < locCoords.size())
3285 msg +=
") in element: " + std::to_string(min_id) +
3286 " with a distance of " + std::to_string(nearpt_min);
3304 ASSERTL0(dim == coords.size(),
"Invalid coordinate dimension.");
3309 ASSERTL0(elmtIdx > 0,
"Unable to find element containing point.");
3315 return (*
m_exp)[elmtIdx]->StdPhysEvaluate(xi, elmtPhys);
3347 for (
int i = 0; i <
m_exp->size(); ++i)
3349 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
3354 for (
int i = 0; i <
m_exp->size(); ++i)
3356 (*m_exp)[i]->Reset();
3387 int coordim =
GetExp(0)->GetCoordim();
3388 char vars[3] = {
'x',
'y',
'z'};
3399 outfile <<
"Variables = x";
3400 for (
int i = 1; i < coordim; ++i)
3402 outfile <<
", " << vars[i];
3407 outfile <<
", " << var;
3410 outfile << std::endl << std::endl;
3423 int nBases = (*m_exp)[0]->GetNumBases();
3428 if (expansion == -1)
3436 GetCoords(coords[0], coords[1], coords[2]);
3438 for (i = 0; i <
m_exp->size(); ++i)
3442 for (j = 0; j < nBases; ++j)
3444 numInt *= (*m_exp)[i]->GetNumPoints(j) - 1;
3447 numBlocks += numInt;
3452 nPoints = (*m_exp)[expansion]->GetTotPoints();
3458 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
3461 for (j = 0; j < nBases; ++j)
3463 numBlocks *= (*m_exp)[expansion]->GetNumPoints(j) - 1;
3471 int nPlanes =
GetZIDs().size();
3472 NekDouble tmp = numBlocks * (nPlanes - 1.0) / nPlanes;
3473 numBlocks = (int)tmp;
3481 outfile <<
"Zone, N=" << nPoints <<
", E=" << numBlocks <<
", F=FEBlock";
3486 outfile <<
", ET=QUADRILATERAL" << std::endl;
3489 outfile <<
", ET=BRICK" << std::endl;
3497 for (j = 0; j < coordim; ++j)
3499 for (i = 0; i < nPoints; ++i)
3501 outfile << coords[j][i] <<
" ";
3502 if (i % 1000 == 0 && i)
3504 outfile << std::endl;
3507 outfile << std::endl;
3514 int nbase = (*m_exp)[0]->GetNumBases();
3517 std::shared_ptr<LocalRegions::ExpansionVector> exp =
m_exp;
3519 if (expansion != -1)
3521 exp = std::shared_ptr<LocalRegions::ExpansionVector>(
3523 (*exp)[0] = (*m_exp)[expansion];
3528 for (i = 0; i < (*exp).size(); ++i)
3530 const int np0 = (*exp)[i]->GetNumPoints(0);
3531 const int np1 = (*exp)[i]->GetNumPoints(1);
3533 for (j = 1; j < np1; ++j)
3535 for (k = 1; k < np0; ++k)
3537 outfile << cnt + (j - 1) * np0 + k <<
" ";
3538 outfile << cnt + (j - 1) * np0 + k + 1 <<
" ";
3539 outfile << cnt + j * np0 + k + 1 <<
" ";
3540 outfile << cnt + j * np0 + k << endl;
3547 else if (nbase == 3)
3549 for (i = 0; i < (*exp).size(); ++i)
3551 const int np0 = (*exp)[i]->GetNumPoints(0);
3552 const int np1 = (*exp)[i]->GetNumPoints(1);
3553 const int np2 = (*exp)[i]->GetNumPoints(2);
3554 const int np01 = np0 * np1;
3556 for (j = 1; j < np2; ++j)
3558 for (k = 1; k < np1; ++k)
3560 for (l = 1; l < np0; ++l)
3562 outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l
3564 outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l + 1
3566 outfile << cnt + (j - 1) * np01 + k * np0 + l + 1
3568 outfile << cnt + (j - 1) * np01 + k * np0 + l <<
" ";
3569 outfile << cnt + j * np01 + (k - 1) * np0 + l <<
" ";
3570 outfile << cnt + j * np01 + (k - 1) * np0 + l + 1
3572 outfile << cnt + j * np01 + k * np0 + l + 1 <<
" ";
3573 outfile << cnt + j * np01 + k * np0 + l << endl;
3577 cnt += np0 * np1 * np2;
3593 if (expansion == -1)
3601 for (
int i = 0; i < totpoints; ++i)
3603 outfile <<
m_phys[i] <<
" ";
3604 if (i % 1000 == 0 && i)
3606 outfile << std::endl;
3609 outfile << std::endl;
3613 int nPoints = (*m_exp)[expansion]->GetTotPoints();
3615 for (
int i = 0; i < nPoints; ++i)
3620 outfile << std::endl;
3626 outfile <<
"<?xml version=\"1.0\"?>" << endl;
3627 outfile << R
"(<VTKFile type="UnstructuredGrid" version="0.1" )"
3628 << "byte_order=\"LittleEndian\">" << endl;
3629 outfile <<
" <UnstructuredGrid>" << endl;
3634 outfile <<
" </UnstructuredGrid>" << endl;
3635 outfile <<
"</VTKFile>" << endl;
3639 [[maybe_unused]]
int istrip)
3642 int nbase = (*m_exp)[expansion]->GetNumBases();
3643 int ntot = (*m_exp)[expansion]->GetTotPoints();
3647 for (i = 0; i < nbase; ++i)
3649 nquad[i] = (*m_exp)[expansion]->GetNumPoints(i);
3650 ntotminus *= (nquad[i] - 1);
3657 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
3659 outfile <<
" <Piece NumberOfPoints=\"" << ntot <<
"\" NumberOfCells=\""
3660 << ntotminus <<
"\">" << endl;
3661 outfile <<
" <Points>" << endl;
3662 outfile <<
" <DataArray type=\"Float64\" "
3663 << R
"(NumberOfComponents="3" format="ascii">)" << endl;
3665 for (i = 0; i < ntot; ++i)
3667 for (j = 0; j < 3; ++j)
3669 outfile << setprecision(8) << scientific << (float)coords[j][i]
3675 outfile <<
" </DataArray>" << endl;
3676 outfile <<
" </Points>" << endl;
3677 outfile <<
" <Cells>" << endl;
3678 outfile <<
" <DataArray type=\"Int32\" "
3679 << R
"(Name="connectivity" format="ascii">)" << endl;
3689 for (i = 0; i < nquad[0] - 1; ++i)
3691 outfile << i <<
" " << i + 1 << endl;
3699 for (i = 0; i < nquad[0] - 1; ++i)
3701 for (j = 0; j < nquad[1] - 1; ++j)
3703 outfile << j * nquad[0] + i <<
" " << j * nquad[0] + i + 1
3704 <<
" " << (j + 1) * nquad[0] + i + 1 <<
" "
3705 << (j + 1) * nquad[0] + i << endl;
3714 for (i = 0; i < nquad[0] - 1; ++i)
3716 for (j = 0; j < nquad[1] - 1; ++j)
3718 for (k = 0; k < nquad[2] - 1; ++k)
3721 << k * nquad[0] * nquad[1] + j * nquad[0] + i <<
" "
3722 << k * nquad[0] * nquad[1] + j * nquad[0] + i + 1
3724 << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] +
3727 << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] + i
3729 << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] + i
3731 << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] +
3734 << (k + 1) * nquad[0] * nquad[1] +
3735 (j + 1) * nquad[0] + i + 1
3737 << (k + 1) * nquad[0] * nquad[1] +
3738 (j + 1) * nquad[0] + i
3750 outfile <<
" </DataArray>" << endl;
3751 outfile <<
" <DataArray type=\"Int32\" "
3752 << R
"(Name="offsets" format="ascii">)" << endl;
3753 for (i = 0; i < ntotminus; ++i)
3755 outfile << i * ns + ns <<
" ";
3758 outfile <<
" </DataArray>" << endl;
3759 outfile <<
" <DataArray type=\"UInt8\" "
3760 << R
"(Name="types" format="ascii">)" << endl;
3761 for (i = 0; i < ntotminus; ++i)
3766 outfile <<
" </DataArray>" << endl;
3767 outfile <<
" </Cells>" << endl;
3768 outfile <<
" <PointData>" << endl;
3772 [[maybe_unused]]
int expansion)
3774 outfile <<
" </PointData>" << endl;
3775 outfile <<
" </Piece>" << endl;
3782 int nq = (*m_exp)[expansion]->GetTotPoints();
3785 outfile << R
"( <DataArray type="Float64" Name=")" << var << "\">"
3791 for (i = 0; i < nq; ++i)
3797 outfile <<
" </DataArray>" << endl;
3831 err = max(err,
abs(inarray[i] - soln[i]));
3864 for (i = 0; i < (*m_exp).size(); ++i)
3867 err += errl2 * errl2;
3872 for (i = 0; i < (*m_exp).size(); ++i)
3876 err += errl2 * errl2;
3906 for (i = 0; i < (*m_exp).size(); ++i)
3922 for (i = 0; i < (*m_exp).size(); ++i)
3925 for (j = 0; j < inarray.size(); ++j)
3929 flux += (*m_exp)[i]->VectorFlux(tmp);
3938 "This method is not defined or valid for this class type");
3946 "This method is not defined or valid for this class type");
3954 "This method is not defined or valid for this class type");
3962 "This method is not defined or valid for this class type");
3968 "This method is not defined or valid for this class type");
3976 "This method is not defined or valid for this class type");
3984 "ClearGlobalLinSysManager not implemented for ExpList.");
3994 [[maybe_unused]]
bool clearLocalMatrices)
3997 "UnsetGlobalLinSys not implemented for ExpList.");
4004 "GetGlobalLinSysManager not implemented for ExpList.");
4010 const std::string &varName,
4013 string varString = fileName.substr(0, fileName.find_last_of(
"."));
4014 int j, k, len = varString.length();
4015 varString = varString.substr(len - 1, len);
4017 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
4018 std::vector<std::vector<NekDouble>> FieldData;
4023 ft, comm,
m_session->GetSharedFilesystem());
4025 f->Import(fileName, FieldDef, FieldData);
4028 for (j = 0; j < FieldDef.size(); ++j)
4030 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
4032 if (FieldDef[j]->m_fields[k] == varName)
4036 FieldDef[j]->m_fields[k], coeffs);
4042 ASSERTL0(found,
"Could not find variable '" + varName +
4043 "' in file boundary condition " + fileName);
4069 for (i = 0; i < (*m_exp).size(); ++i)
4073 err += errh1 * errh1;
4082 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef,
4084 std::vector<NekDouble> &HomoLen,
bool homoStrips,
4085 std::vector<unsigned int> &HomoSIDs, std::vector<unsigned int> &HomoZIDs,
4086 std::vector<unsigned int> &HomoYIDs)
4093 ASSERTL1(NumHomoDir == HomoBasis.size(),
4094 "Homogeneous basis is not the same length as NumHomoDir");
4095 ASSERTL1(NumHomoDir == HomoLen.size(),
4096 "Homogeneous length vector is not the same length as NumHomDir");
4115 for (s = startenum; s <= endenum; ++s)
4117 std::vector<unsigned int> elementIDs;
4118 std::vector<LibUtilities::BasisType> basis;
4119 std::vector<unsigned int> numModes;
4120 std::vector<std::string> fields;
4123 bool UniOrder =
true;
4128 for (
int i = 0; i < (*m_exp).size(); ++i)
4130 if ((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
4132 elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
4135 for (
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
4138 (*
m_exp)[i]->GetBasis(j)->GetBasisType());
4140 (*
m_exp)[i]->GetBasis(j)->GetNumModes());
4144 for (n = 0; n < NumHomoDir; ++n)
4146 basis.push_back(HomoBasis[n]->GetBasisType());
4147 numModes.push_back(HomoBasis[n]->GetNumModes());
4155 (*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
4156 "Routine is not set up for multiple bases definitions");
4158 for (
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
4161 (*
m_exp)[i]->GetBasis(j)->GetNumModes());
4163 (*
m_exp)[i]->GetBasis(j)->GetNumModes())
4169 for (n = 0; n < NumHomoDir; ++n)
4171 numModes.push_back(HomoBasis[n]->GetNumModes());
4177 if (elementIDs.size() > 0)
4182 numModes, fields, NumHomoDir, HomoLen,
4183 homoStrips, HomoSIDs, HomoZIDs, HomoYIDs);
4184 fielddef.push_back(fdef);
4192std::vector<LibUtilities::FieldDefinitionsSharedPtr>
ExpList::
4195 std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
4201 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef)
4210 std::vector<NekDouble> &fielddata)
4224 map<int, int> ElmtID_to_ExpID;
4225 for (i = 0; i < (*m_exp).size(); ++i)
4227 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
4230 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
4232 int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
4233 int datalen = (*m_exp)[eid]->GetNcoeffs();
4242 std::vector<NekDouble> &fielddata, std::string &
field,
4249 const std::shared_ptr<ExpList> &fromExpList,
4266 std::vector<NekDouble> &fielddata, std::string &
field,
4268 [[maybe_unused]] std::unordered_map<int, int> zIdToPlane)
4272 int modes_offset = 0;
4273 int datalen = fielddata.size() / fielddef->m_fields.size();
4276 for (i = 0; i < fielddef->m_fields.size(); ++i)
4278 if (fielddef->m_fields[i] ==
field)
4285 ASSERTL0(i != fielddef->m_fields.size(),
4286 "Field (" +
field +
") not found in file.");
4293 for (i = (*m_exp).size() - 1; i >= 0; --i)
4299 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
4303 if (fielddef->m_uniOrder ==
true)
4309 fielddef->m_shapeType, fielddef->m_numModes, modes_offset);
4311 const int elmtId = fielddef->m_elementIDs[i];
4317 modes_offset += (*m_exp)[0]->GetNumBases();
4321 expId = eIt->second;
4323 bool sameBasis =
true;
4324 for (
int j = 0; j < fielddef->m_basis.size(); ++j)
4326 if (fielddef->m_basis[j] != (*
m_exp)[expId]->GetBasisType(j))
4340 (*m_exp)[expId]->ExtractDataToCoeffs(
4341 &fielddata[offset], fielddef->m_numModes, modes_offset,
4346 modes_offset += (*m_exp)[0]->GetNumBases();
4353 const std::shared_ptr<ExpList> &fromExpList,
4360 map<int, int> GidToEid;
4362 for (i = 0; i < (*m_exp).size(); ++i)
4364 GidToEid[fromExpList->GetExp(i)->GetGeom()->GetGlobalID()] = i;
4367 for (i = 0; i < (*m_exp).size(); ++i)
4369 std::vector<unsigned int> nummodes;
4370 vector<LibUtilities::BasisType> basisTypes;
4372 int eid = GidToEid[(*m_exp)[i]->GetGeom()->GetGlobalID()];
4373 for (
int j = 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
4375 nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
4376 basisTypes.push_back(fromExpList->GetExp(eid)->GetBasisType(j));
4379 offset = fromExpList->GetCoeff_Offset(eid);
4380 (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes, 0,
4392 size_t nTracePts = weightAver.size();
4394 for (
int i = 0; i < nTracePts; ++i)
4396 weightAver[i] = 0.5;
4397 weightJump[i] = 1.0;
4409 int nq = outarray[0].size() / MFdim;
4412 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
4416 for (
int i = 0; i <
m_exp->size(); ++i)
4418 npts = (*m_exp)[i]->GetTotPoints();
4420 for (
int j = 0; j < MFdim * coordim; ++j)
4426 (*m_exp)[i]->GetMetricInfo()->GetMovingFrames(
4427 (*
m_exp)[i]->GetPointsKeys(), MMFdir, CircCentre, MFloc);
4430 for (
int j = 0; j < MFdim; ++j)
4432 for (
int k = 0; k < coordim; ++k)
4456 for (
int i = 0; i < (*m_exp).size(); ++i)
4458 npoints_e = (*m_exp)[i]->GetTotPoints();
4479 "This method is not defined or valid for this class type");
4485 [[maybe_unused]]
int i)
4488 "This method is not defined or valid for this class type");
4489 static std::shared_ptr<ExpList> result;
4512 int i, j, k, e_npoints, offset;
4520 "Input vector does not have sufficient dimensions to "
4524 for (i = 0; i <
m_exp->size(); ++i)
4527 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4528 normals = (*m_exp)[i]->GetPhysNormals();
4534 for (j = 0; j < e_npoints; ++j)
4538 for (k = 0; k < coordim; ++k)
4540 Vn += Vec[k][offset + j] * normals[k * e_npoints + j];
4546 Upwind[offset + j] = Fwd[offset + j];
4550 Upwind[offset + j] = Bwd[offset + j];
4558 "This method is not defined or valid for this class type");
4604 "This method is not defined or valid for this class type");
4605 static std::shared_ptr<ExpList> returnVal;
4612 "This method is not defined or valid for this class type");
4613 static std::shared_ptr<AssemblyMapDG> result;
4620 "This method is not defined or valid for this class type");
4621 static std::shared_ptr<InterfaceMapDG> result;
4627 return GetTraceMap()->GetBndCondIDToGlobalTraceID();
4633 "This method is not defined or valid for this class type");
4634 static std::vector<bool> result;
4651 for (
int i = 0; i < nquad2; ++i)
4653 for (
int j = 0; j < nquad1; ++j)
4655 out[i * nquad1 + j] = in[j * nquad2 + i];
4661 for (
int i = 0; i < nquad2; ++i)
4663 for (
int j = 0; j < nquad1; ++j)
4665 out[i * nquad1 + j] = in[i * nquad1 + j];
4676 for (
int i = 0; i < nquad2; ++i)
4678 for (
int j = 0; j < nquad1 / 2; ++j)
4680 swap(out[i * nquad1 + j], out[i * nquad1 + nquad1 - j - 1]);
4691 for (
int j = 0; j < nquad1; ++j)
4693 for (
int i = 0; i < nquad2 / 2; ++i)
4695 swap(out[i * nquad1 + j], out[(nquad2 - i - 1) * nquad1 + j]);
4712 int i, j, k, e_npoints, offset;
4718 ASSERTL1(normals.size() >= coordim,
4719 "Output vector does not have sufficient dimensions to "
4727 for (i = 0; i <
m_exp->size(); ++i)
4732 loc_exp->GetLeftAdjacentElementExp();
4736 locnormals = loc_elmt->GetTraceNormal(
4737 loc_exp->GetLeftAdjacentElementTrace());
4743 for (j = 0; j < e_npoints; ++j)
4747 for (k = 0; k < coordim; ++k)
4749 normals[k][offset] = locnormals[k][0];
4758 for (i = 0; i <
m_exp->size(); ++i)
4766 traceExp->GetLeftAdjacentElementExp();
4767 int edgeId = traceExp->GetLeftAdjacentElementTrace();
4769 exp2D->GetTraceBasisKey(edgeId).GetPointsKey();
4771 traceExp->GetBasis(0)->GetPointsKey();
4778 bool useRight =
false;
4779 if (traceExp->GetRightAdjacentElementTrace() >= 0)
4782 traceExp->GetRightAdjacentElementExp();
4783 int RedgeId = traceExp->GetRightAdjacentElementTrace();
4785 Rexp2D->GetTraceBasisKey(RedgeId).GetPointsKey();
4791 edgePoints = RedgePoints;
4797 exp2D->GetTraceNormal(edgeId);
4802 for (
int d = 0;
d < coordim; ++
d)
4806 normals[
d].data() + offset);
4812 &normals[
d][offset], 1);
4823 for (i = 0; i <
m_exp->size(); ++i)
4844 traceExp->GetLeftAdjacentElementExp();
4845 int faceId = traceExp->GetLeftAdjacentElementTrace();
4847 exp3D->GetTraceNormal(faceId);
4853 int fromid0, fromid1;
4867 exp3D->GetTraceBasisKey(faceId, fromid0);
4869 exp3D->GetTraceBasisKey(faceId, fromid1);
4871 traceExp->GetBasis(0)->GetBasisKey();
4873 traceExp->GetBasis(1)->GetBasisKey();
4882 exp3D->ReOrientTracePhysMap(orient, map, faceNq0, faceNq1);
4886 for (j = 0; j < coordim; ++j)
4894 traceBasis1.
GetPointsKey(), tmp = normals[j] + offset);
4902 "This method is not defined or valid for this class type");
4929 lengLR[0] = lengthsFwd;
4930 lengLR[1] = lengthsBwd;
4934 int e_npoints0 = -1;
4937 for (
int i = 0; i <
m_exp->size(); ++i)
4939 loc_exp = (*m_exp)[i];
4942 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4943 if (e_npoints0 < e_npoints)
4945 for (
int nlr = 0; nlr < 2; nlr++)
4949 e_npoints0 = e_npoints;
4952 LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
4953 LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
4955 LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
4956 LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
4957 for (
int nlr = 0; nlr < 2; ++nlr)
4960 lengAdd[nlr] = lengintp[nlr];
4961 int bndNumber = LRbndnumbs[nlr];
4962 loc_elmt = LRelmts[nlr];
4965 locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
4968 loc_exp->GetBasis(0)->GetPointsKey();
4970 loc_elmt->GetTraceBasisKey(bndNumber).GetPointsKey();
4979 lengAdd[nlr] = lengintp[nlr];
4982 for (
int j = 0; j < e_npoints; ++j)
4984 lengLR[nlr][offset + j] = lengAdd[nlr][j];
4991 for (
int i = 0; i <
m_exp->size(); ++i)
4993 loc_exp = (*m_exp)[i];
4997 loc_exp->GetBasis(0)->GetBasisKey();
4999 loc_exp->GetBasis(1)->GetBasisKey();
5002 e_npoints = TraceNq0 * TraceNq1;
5003 if (e_npoints0 < e_npoints)
5005 for (
int nlr = 0; nlr < 2; nlr++)
5009 e_npoints0 = e_npoints;
5012 LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
5013 LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
5015 LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
5016 LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
5017 for (
int nlr = 0; nlr < 2; ++nlr)
5020 int bndNumber = LRbndnumbs[nlr];
5021 loc_elmt = LRelmts[nlr];
5024 locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
5028 loc_elmt->GetTraceOrient(bndNumber);
5030 int fromid0, fromid1;
5043 loc_elmt->GetTraceBasisKey(bndNumber, fromid0);
5045 loc_elmt->GetTraceBasisKey(bndNumber, fromid1);
5050 AlignFace(orient, faceNq0, faceNq1, locLeng, alignedLeng);
5057 for (
int j = 0; j < e_npoints; ++j)
5059 lengLR[nlr][offset + j] = lengintp[nlr][j];
5071 "This method is not defined or valid for this class type");
5080 "This method is not defined or valid for this class type");
5087 "This method is not defined or valid for this class type");
5094 [[maybe_unused]]
bool PutFwdInBwdOnBCs, [[maybe_unused]]
bool DoExchange)
5097 "This method is not defined or valid for this class type");
5103 [[maybe_unused]]
bool PutFwdInBwdOnBCs)
5106 "This method is not defined or valid for this class type");
5115 "v_AddTraceQuadPhysToField is not defined for this class type");
5124 "v_AddTraceQuadPhysToOffDiag is not defined for this class");
5134 "v_GetLocTraceFromTracePts is not defined for this class");
5140 "v_GetBndCondBwdWeight is not defined for this class type");
5149 "v_setBndCondBwdWeight is not defined for this class type");
5155 "This method is not defined or valid for this class type");
5156 static vector<bool> tmp;
5164 "This method is not defined or valid for this class type");
5172 "This method is not defined or valid for this class type");
5180 "This method is not defined or valid for this class type");
5190 [[maybe_unused]]
const bool PhysSpaceForcing)
5203 [[maybe_unused]]
const bool PhysSpaceForcing)
5206 "LinearAdvectionDiffusionReactionSolve not implemented.");
5214 [[maybe_unused]]
const NekDouble lambda,
5218 "This method is not defined or valid for this class type");
5222 [[maybe_unused]]
const int npts,
5225 [[maybe_unused]]
bool Shuff, [[maybe_unused]]
bool UnShuff)
5228 "This method is not defined or valid for this class type");
5232 [[maybe_unused]]
const int npts,
5235 [[maybe_unused]]
bool Shuff, [[maybe_unused]]
bool UnShuff)
5238 "This method is not defined or valid for this class type");
5242 [[maybe_unused]]
const int npts,
5248 "This method is not defined or valid for this class type");
5252 [[maybe_unused]]
const int npts,
5258 "This method is not defined or valid for this class type");
5264 [[maybe_unused]]
int BndID)
5267 "This method is not defined or valid for this class type");
5274 [[maybe_unused]]
int BndID)
5277 "This method is not defined or valid for this class type");
5290 (*m_exp)[i]->NormVectorIProductWRTBase(
5300 (*m_exp)[i]->NormVectorIProductWRTBase(
5310 (*m_exp)[i]->NormVectorIProductWRTBase(
5327 "This method is not defined or valid for this class type");
5336 "This method is not defined or valid for this class type");
5342 [[maybe_unused]]
const int nreg,
5346 "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]]
bool useComm)
5361 "This method is not defined or valid for this class type");
5367 "This method is not defined or valid for this class type");
5375 "This method is not defined or valid for this class type");
5411 int input_offset{0};
5412 int output_offset{0};
5416 inarray + input_offset,
5417 tmp = outarray + output_offset);
5456 for (i = 0; i < (*m_exp).size(); ++i)
5459 (*m_exp)[i]->GetCoords(e_coord_0);
5463 ASSERTL0(coord_1.size() != 0,
"output coord_1 is not defined");
5465 for (i = 0; i < (*m_exp).size(); ++i)
5469 (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1);
5473 ASSERTL0(coord_1.size() != 0,
"output coord_1 is not defined");
5474 ASSERTL0(coord_2.size() != 0,
"output coord_2 is not defined");
5476 for (i = 0; i < (*m_exp).size(); ++i)
5481 (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1, e_coord_2);
5491 (*m_exp)[eid]->GetCoords(xc0, xc1, xc2);
5501 for (
int i = 0; i <
m_exp->size(); ++i)
5503 for (
int j = 0; j < (*m_exp)[i]->GetNtraces(); ++j)
5505 (*m_exp)[i]->ComputeTraceNormal(j);
5513 [[maybe_unused]]
int i, [[maybe_unused]] std::shared_ptr<ExpList> &result,
5514 [[maybe_unused]]
const bool DeclareCoeffPhysArrays)
5517 "This method is not defined or valid for this class type");
5538 for (cnt = n = 0; n < i; ++n)
5549 elmt =
GetExp(ElmtID[cnt + n]);
5550 elmt->GetTracePhysVals(
5552 tmp1 = element + offsetElmt, tmp2 = boundary + offsetBnd);
5554 offsetElmt += elmt->GetTotPoints();
5570 for (cnt = n = 0; n < i; ++n)
5579 npoints +=
GetExp(ElmtID[cnt + n])->GetTotPoints();
5590 nq =
GetExp(ElmtID[cnt + n])->GetTotPoints();
5592 Vmath::Vcopy(nq, &phys[offsetPhys], 1, &bndElmt[offsetElmt], 1);
5615 for (cnt = n = 0; n < i; ++n)
5627 elmt =
GetExp(ElmtID[cnt + n]);
5628 elmt->GetTracePhysVals(EdgeID[cnt + n],
5630 phys + offsetPhys, tmp1 = bnd + offsetBnd);
5649 for (j = 0; j < coordim; ++j)
5656 for (cnt = n = 0; n < i; ++n)
5667 elmt =
GetExp(ElmtID[cnt + n]);
5669 elmt->GetTraceNormal(EdgeID[cnt + n]);
5671 for (j = 0; j < coordim; ++j)
5673 Vmath::Vcopy(nq, normalsElmt[j], 1, tmp = normals[j] + offset, 1);
5684 "This method is not defined or valid for this class type");
5707 "This method is not defined or valid for this class type");
5718 "This method is not defined or valid for this class type");
5727 [[maybe_unused]]
const std::string varName,
5732 "This method is not defined or valid for this class type");
5740 "This method is not defined or valid for this class type");
5741 static map<int, RobinBCInfoSharedPtr> result;
5752 "This method is not defined or valid for this class type");
5757 unsigned int regionId,
const std::string &variable)
5759 auto collectionIter = collection.find(regionId);
5760 ASSERTL1(collectionIter != collection.end(),
5761 "Unable to locate collection " +
5762 boost::lexical_cast<string>(regionId));
5765 (*collectionIter).second;
5766 auto conditionMapIter = bndCondMap->find(variable);
5767 ASSERTL1(conditionMapIter != bndCondMap->end(),
5768 "Unable to locate condition map.");
5771 (*conditionMapIter).second;
5773 return boundaryCondition;
5779 "This method is not defined or valid for this class type");
5811 if (
m_graph->GetMeshDimension() == (*
m_exp)[0]->GetShapeDimension())
5817 bool verbose = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
5832 : 2 *
m_exp->size());
5834 vector<StdRegions::StdExpansionSharedPtr> collExp;
5839 collExp.push_back(exp);
5843 std::vector<LibUtilities::BasisKey> thisbasisKeys(
5845 std::vector<LibUtilities::BasisKey> prevbasisKeys(
5848 for (
int d = 0;
d < exp->GetNumBases();
d++)
5850 prevbasisKeys[
d] = exp->GetBasis(
d)->GetBasisKey();
5858 int mincol = (*m_exp).size();
5862 for (
int i = 1; i < (*m_exp).size(); i++)
5867 for (
int d = 0;
d < exp->GetNumBases();
d++)
5869 thisbasisKeys[
d] = exp->GetBasis(
d)->GetBasisKey();
5877 if (thisbasisKeys != prevbasisKeys || prevDef != Deformed ||
5887 if (collExp.size() > collsize)
5891 collsize = collExp.size();
5899 mincol = min(mincol, (
int)collExp.size());
5900 maxcol = max(maxcol, (
int)collExp.size());
5901 meancol += collExp.size();
5914 collExp.push_back(exp);
5917 prevbasisKeys = thisbasisKeys;
5924 if (collExp.size() > collsize)
5927 collsize = collExp.size();
5934 mincol = min(mincol, (
int)collExp.size());
5935 maxcol = max(maxcol, (
int)collExp.size());
5936 meancol += collExp.size();
5939 <<
"; mean len = " << meancol <<
" (min = " << mincol
5940 <<
", max = " << maxcol <<
")" << endl;
6018 int input_offset{0};
6019 int output_offset{0};
6023 inarray + input_offset,
6024 tmp = outarray + output_offset);
6046 int nTotElmt = (*m_exp).size();
6047 int nElmtPnt = (*m_exp)[0]->GetTotPoints();
6048 int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
6053 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6055 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6056 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6058 if (tmpPhys.size() != nElmtPnt || tmpCoef.size() != nElmtCoef)
6064 for (
int ncl = 0; ncl < nElmtPnt; ncl++)
6066 tmpPhys[ncl] = inarray[nelmt][ncl];
6068 (*m_exp)[nelmt]->IProductWRTDerivBase(nDirctn, tmpPhys, tmpCoef);
6070 for (
int nrw = 0; nrw < nElmtCoef; nrw++)
6072 (*mtxPerVar[nelmt])(nrw, ncl) = tmpCoef[nrw];
6083 int nTotElmt = (*m_exp).size();
6085 int nspacedim =
m_graph->GetSpaceDimension();
6094 int nElmtPntPrevious = 0;
6095 int nElmtCoefPrevious = 0;
6097 int nElmtPnt, nElmtCoef;
6098 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6100 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6101 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6104 if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
6105 (ElmtTypeNow != ElmtTypePrevious))
6107 if (nElmtPntPrevious != nElmtPnt)
6109 for (
int ndir = 0; ndir < nspacedim; ndir++)
6116 stdExp = (*m_exp)[nelmt]->GetStdExp();
6118 stdExp->DetShapeType(), *stdExp);
6120 ArrayStdMat[0] = stdExp->GetStdMatrix(matkey);
6121 ArrayStdMat_data[0] = ArrayStdMat[0]->GetPtr();
6128 ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
6129 ArrayStdMat_data[1] = ArrayStdMat[1]->GetPtr();
6134 stdExp->DetShapeType(),
6137 ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
6138 ArrayStdMat_data[2] = ArrayStdMat[2]->GetPtr();
6142 ElmtTypePrevious = ElmtTypeNow;
6143 nElmtPntPrevious = nElmtPnt;
6144 nElmtCoefPrevious = nElmtCoef;
6148 for (
int ndir = 0; ndir < nspacedim; ndir++)
6154 for (
int ndir = 0; ndir < nspacedim; ndir++)
6156 (*m_exp)[nelmt]->AlignVectorToCollapsedDir(
6157 ndir, inarray[ndir][nelmt], tmppnts);
6158 for (
int n = 0; n < nspacedim; n++)
6160 Vmath::Vadd(nElmtPnt, tmppnts[n], 1, projectedpnts[n], 1,
6161 projectedpnts[n], 1);
6165 for (
int ndir = 0; ndir < nspacedim; ndir++)
6168 (*m_exp)[nelmt]->MultiplyByQuadratureMetric(projectedpnts[ndir],
6169 projectedpnts[ndir]);
6172 for (
int np = 0; np < nElmtPnt; np++)
6174 NekDouble factor = projectedpnts[ndir][np];
6175 clmnArray = MatDataArray + np * nElmtCoef;
6176 clmnStdMatArray = ArrayStdMat_data[ndir] + np * nElmtCoef;
6177 Vmath::Svtvp(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray,
6190 int nElmtPntPrevious = 0;
6191 int nElmtCoefPrevious = 0;
6192 int nTotElmt = (*m_exp).size();
6193 int nElmtPnt = (*m_exp)[0]->GetTotPoints();
6194 int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
6200 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6202 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6203 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6206 if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
6207 (ElmtTypeNow != ElmtTypePrevious))
6210 stdExp = (*m_exp)[nelmt]->GetStdExp();
6212 stdExp->DetShapeType(), *stdExp);
6215 stdMat_data = BwdMat->GetPtr();
6217 if (nElmtPntPrevious != nElmtPnt)
6222 ElmtTypePrevious = ElmtTypeNow;
6223 nElmtPntPrevious = nElmtPnt;
6224 nElmtCoefPrevious = nElmtCoef;
6227 (*m_exp)[nelmt]->MultiplyByQuadratureMetric(
6233 for (
int np = 0; np < nElmtPnt; np++)
6236 clmnArray = MatDataArray + np * nElmtCoef;
6237 clmnStdMatArray = stdMat_data + np * nElmtCoef;
6238 Vmath::Smul(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray, 1);
6262 std::shared_ptr<LocalRegions::ExpansionVector> traceExp =
6263 tracelist->GetExp();
6264 int ntotTrace = (*traceExp).size();
6265 int nTracePnt, nTraceCoef;
6267 std::shared_ptr<LocalRegions::ExpansionVector> fieldExp =
GetExp();
6273 locTraceToTraceMap->GetLeftRightAdjacentExpId();
6275 locTraceToTraceMap->GetLeftRightAdjacentExpFlag();
6278 locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffMap();
6280 locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffSign();
6285 int MatIndex, nPnts;
6288 int nTracePntsTtl = tracelist->GetTotPoints();
6289 int nlocTracePts = locTraceToTraceMap->GetNLocTracePts();
6290 int nlocTracePtsFwd = locTraceToTraceMap->GetNFwdLocTracePts();
6291 int nlocTracePtsBwd = nlocTracePts - nlocTracePtsFwd;
6294 nlocTracePtsLR[0] = nlocTracePtsFwd;
6295 nlocTracePtsLR[1] = nlocTracePtsBwd;
6297 size_t nFwdBwdNonZero = 0;
6299 for (
int i = 0; i < 2; ++i)
6301 if (nlocTracePtsLR[i] > 0)
6303 tmpIndex[nFwdBwdNonZero] = i;
6309 for (
int i = 0; i < nFwdBwdNonZero; ++i)
6311 nlocTracePtsNonZeroIndex[i] = tmpIndex[i];
6317 for (
int k = 0; k < 2; ++k)
6322 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6324 size_t i = nlocTracePtsNonZeroIndex[k];
6328 int nNumbElmt = fieldMat.size();
6331 for (
int i = 0; i < nNumbElmt; i++)
6333 ElmtMatDataArray[i] = fieldMat[i]->GetPtr();
6337 int nTraceCoefMax = 0;
6338 int nTraceCoefMin = std::numeric_limits<int>::max();
6344 for (
int nt = 0; nt < ntotTrace; nt++)
6346 nTraceCoef = (*traceExp)[nt]->GetNcoeffs();
6347 nTracePnt = tracelist->GetTotPoints(nt);
6348 int noffset = tracelist->GetPhys_Offset(nt);
6349 TraceCoefArray[nt] = nTraceCoef;
6350 TracePntArray[nt] = nTracePnt;
6351 TraceOffArray[nt] = noffset;
6352 FwdMatData[nt] = FwdMat[nt]->GetPtr();
6353 BwdMatData[nt] = BwdMat[nt]->GetPtr();
6354 if (nTraceCoef > nTraceCoefMax)
6356 nTraceCoefMax = nTraceCoef;
6358 if (nTraceCoef < nTraceCoefMin)
6360 nTraceCoefMin = nTraceCoef;
6363 WARNINGL1(nTraceCoefMax == nTraceCoefMin,
6364 "nTraceCoefMax!=nTraceCoefMin: Effeciency may be low ");
6366 int traceID, nfieldPnts, ElmtId, noffset;
6368 locTraceToTraceMap->GetLocTracephysToTraceIDMap();
6370 locTraceToTraceMap->GetLocTraceToFieldMap();
6373 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6375 size_t i = nlocTracePtsNonZeroIndex[k];
6377 Vmath::Vcopy(nlocTracePtsLR[i], &fieldToLocTraceMap[0] + noffset, 1,
6378 &fieldToLocTraceMapLR[i][0], 1);
6379 noffset += nlocTracePtsLR[i];
6383 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6385 size_t nlr = nlocTracePtsNonZeroIndex[k];
6387 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6389 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6390 nTraceCoef = TraceCoefArray[traceID];
6391 ElmtId = LRAdjExpid[nlr][traceID];
6393 nElmtCoef = ElmtCoefArray[ElmtId];
6394 nfieldPnts = fieldToLocTraceMapLR[nlr][nloc];
6395 nPnts = nfieldPnts - noffset;
6397 MatIndexArray[nlr][nloc] = nPnts * nElmtCoef;
6401 for (
int nc = 0; nc < nTraceCoefMin; nc++)
6403 for (
int nt = 0; nt < ntotTrace; nt++)
6405 nTraceCoef = TraceCoefArray[nt];
6406 nTracePnt = TracePntArray[nt];
6407 noffset = TraceOffArray[nt];
6408 Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
6409 &TraceFwdPhy[noffset], 1);
6410 Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
6411 &TraceBwdPhy[noffset], 1);
6414 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6416 size_t i = nlocTracePtsNonZeroIndex[k];
6417 Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
6423 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6425 size_t nlr = nlocTracePtsNonZeroIndex[k];
6426 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6428 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6429 nTraceCoef = TraceCoefArray[traceID];
6430 ElmtId = LRAdjExpid[nlr][traceID];
6431 nrwAdjExp = elmtLRMap[nlr][traceID][nc];
6432 sign = elmtLRSign[nlr][traceID][nc];
6433 MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
6435 ElmtMatDataArray[ElmtId][MatIndex] -=
6436 sign * tmplocTrace[nlr][nloc];
6441 for (
int nc = nTraceCoefMin; nc < nTraceCoefMax; nc++)
6443 for (
int nt = 0; nt < ntotTrace; nt++)
6445 nTraceCoef = TraceCoefArray[nt];
6446 nTracePnt = TracePntArray[nt];
6447 noffset = TraceOffArray[nt];
6448 if (nc < nTraceCoef)
6450 Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
6451 &TraceFwdPhy[noffset], 1);
6452 Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
6453 &TraceBwdPhy[noffset], 1);
6462 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6464 size_t i = nlocTracePtsNonZeroIndex[k];
6465 Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
6470 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6472 size_t nlr = nlocTracePtsNonZeroIndex[k];
6473 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6475 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6476 nTraceCoef = TraceCoefArray[traceID];
6477 if (nc < nTraceCoef)
6479 ElmtId = LRAdjExpid[nlr][traceID];
6480 nrwAdjExp = elmtLRMap[nlr][traceID][nc];
6481 sign = -elmtLRSign[nlr][traceID][nc];
6482 MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
6484 ElmtMatDataArray[ElmtId][MatIndex] +=
6485 sign * tmplocTrace[nlr][nloc];
6497 int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
6510 nelmtcoef0 = nelmtcoef;
6511 nelmtpnts0 = nelmtpnts;
6513 for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
6518 tmpMatQ = ElmtJacQuad[nelmt];
6519 tmpMatC = ElmtJacCoef[nelmt];
6521 MatQ_data = tmpMatQ->GetPtr();
6522 MatC_data = tmpMatC->GetPtr();
6524 if (nelmtcoef != nelmtcoef0)
6527 nelmtcoef0 = nelmtcoef;
6530 if (nelmtpnts != nelmtpnts0)
6533 nelmtpnts0 = nelmtpnts;
6536 for (
int np = 0; np < nelmtcoef; np++)
6538 Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
6540 (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
6541 (*m_exp)[nelmt]->IProductWRTDerivBase(dir, innarray, outarray);
6543 Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
6544 nelmtcoef, &MatC_data[0] + np, nelmtcoef);
6554 int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
6567 nelmtcoef0 = nelmtcoef;
6568 nelmtpnts0 = nelmtpnts;
6570 for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
6575 tmpMatQ = ElmtJacQuad[nelmt];
6576 tmpMatC = ElmtJacCoef[nelmt];
6578 MatQ_data = tmpMatQ->GetPtr();
6579 MatC_data = tmpMatC->GetPtr();
6581 if (nelmtcoef != nelmtcoef0)
6584 nelmtcoef0 = nelmtcoef;
6587 if (nelmtpnts != nelmtpnts0)
6590 nelmtpnts0 = nelmtpnts;
6593 for (
int np = 0; np < nelmtcoef; np++)
6595 Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
6597 (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
6598 (*m_exp)[nelmt]->IProductWRTBase(innarray, outarray);
6600 Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
6601 nelmtcoef, &MatC_data[0] + np, nelmtcoef);
6621 int pt0 = (*m_exp)[i]->GetNumPoints(0);
6622 int pt1 = (*m_exp)[i]->GetNumPoints(1);
6623 int npt0 = (int)pt0 * scale;
6624 int npt1 = (int)pt1 * scale;
6627 npt0, (*
m_exp)[i]->GetPointsType(0));
6629 npt1, (*
m_exp)[i]->GetPointsType(1));
6633 newPointsKey0, newPointsKey1, &inarray[cnt],
6634 (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
6635 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(), &outarray[cnt1]);
6647 int pt0 = (*m_exp)[i]->GetNumPoints(0);
6648 int pt1 = (*m_exp)[i]->GetNumPoints(1);
6649 int pt2 = (*m_exp)[i]->GetNumPoints(2);
6650 int npt0 = (int)pt0 * scale;
6651 int npt1 = (int)pt1 * scale;
6652 int npt2 = (int)pt2 * scale;
6655 npt0, (*
m_exp)[i]->GetPointsType(0));
6657 npt1, (*
m_exp)[i]->GetPointsType(1));
6659 npt2, (*
m_exp)[i]->GetPointsType(2));
6663 newPointsKey0, newPointsKey1, newPointsKey2, &inarray[cnt],
6664 (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
6665 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(),
6666 (*
m_exp)[i]->GetBasis(2)->GetPointsKey(), &outarray[cnt1]);
6668 cnt += npt0 * npt1 * npt2;
6669 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