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)
3274 std::string
msg =
"Failed to find point within element to "
3276 boost::lexical_cast<std::string>(tol) +
3277 " using local point (" +
3278 boost::lexical_cast<std::string>(locCoords[0]) +
"," +
3279 boost::lexical_cast<std::string>(locCoords[1]) +
"," +
3280 boost::lexical_cast<std::string>(locCoords[1]) +
3281 ") in element: " + std::to_string(min_id);
3284 Vmath::Vcopy(locCoords.size(), savLocCoords, 1, locCoords, 1);
3301 ASSERTL0(dim == coords.size(),
"Invalid coordinate dimension.");
3306 ASSERTL0(elmtIdx > 0,
"Unable to find element containing point.");
3312 return (*
m_exp)[elmtIdx]->StdPhysEvaluate(xi, elmtPhys);
3344 for (
int i = 0; i <
m_exp->size(); ++i)
3346 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
3351 for (
int i = 0; i <
m_exp->size(); ++i)
3353 (*m_exp)[i]->Reset();
3384 int coordim =
GetExp(0)->GetCoordim();
3385 char vars[3] = {
'x',
'y',
'z'};
3396 outfile <<
"Variables = x";
3397 for (
int i = 1; i < coordim; ++i)
3399 outfile <<
", " << vars[i];
3404 outfile <<
", " << var;
3407 outfile << std::endl << std::endl;
3420 int nBases = (*m_exp)[0]->GetNumBases();
3425 if (expansion == -1)
3433 GetCoords(coords[0], coords[1], coords[2]);
3435 for (i = 0; i <
m_exp->size(); ++i)
3439 for (j = 0; j < nBases; ++j)
3441 numInt *= (*m_exp)[i]->GetNumPoints(j) - 1;
3444 numBlocks += numInt;
3449 nPoints = (*m_exp)[expansion]->GetTotPoints();
3455 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
3458 for (j = 0; j < nBases; ++j)
3460 numBlocks *= (*m_exp)[expansion]->GetNumPoints(j) - 1;
3468 int nPlanes =
GetZIDs().size();
3469 NekDouble tmp = numBlocks * (nPlanes - 1.0) / nPlanes;
3470 numBlocks = (int)tmp;
3478 outfile <<
"Zone, N=" << nPoints <<
", E=" << numBlocks <<
", F=FEBlock";
3483 outfile <<
", ET=QUADRILATERAL" << std::endl;
3486 outfile <<
", ET=BRICK" << std::endl;
3494 for (j = 0; j < coordim; ++j)
3496 for (i = 0; i < nPoints; ++i)
3498 outfile << coords[j][i] <<
" ";
3499 if (i % 1000 == 0 && i)
3501 outfile << std::endl;
3504 outfile << std::endl;
3511 int nbase = (*m_exp)[0]->GetNumBases();
3514 std::shared_ptr<LocalRegions::ExpansionVector> exp =
m_exp;
3516 if (expansion != -1)
3518 exp = std::shared_ptr<LocalRegions::ExpansionVector>(
3520 (*exp)[0] = (*m_exp)[expansion];
3525 for (i = 0; i < (*exp).size(); ++i)
3527 const int np0 = (*exp)[i]->GetNumPoints(0);
3528 const int np1 = (*exp)[i]->GetNumPoints(1);
3530 for (j = 1; j < np1; ++j)
3532 for (k = 1; k < np0; ++k)
3534 outfile << cnt + (j - 1) * np0 + k <<
" ";
3535 outfile << cnt + (j - 1) * np0 + k + 1 <<
" ";
3536 outfile << cnt + j * np0 + k + 1 <<
" ";
3537 outfile << cnt + j * np0 + k << endl;
3544 else if (nbase == 3)
3546 for (i = 0; i < (*exp).size(); ++i)
3548 const int np0 = (*exp)[i]->GetNumPoints(0);
3549 const int np1 = (*exp)[i]->GetNumPoints(1);
3550 const int np2 = (*exp)[i]->GetNumPoints(2);
3551 const int np01 = np0 * np1;
3553 for (j = 1; j < np2; ++j)
3555 for (k = 1; k < np1; ++k)
3557 for (l = 1; l < np0; ++l)
3559 outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l
3561 outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l + 1
3563 outfile << cnt + (j - 1) * np01 + k * np0 + l + 1
3565 outfile << cnt + (j - 1) * np01 + k * np0 + l <<
" ";
3566 outfile << cnt + j * np01 + (k - 1) * np0 + l <<
" ";
3567 outfile << cnt + j * np01 + (k - 1) * np0 + l + 1
3569 outfile << cnt + j * np01 + k * np0 + l + 1 <<
" ";
3570 outfile << cnt + j * np01 + k * np0 + l << endl;
3574 cnt += np0 * np1 * np2;
3590 if (expansion == -1)
3598 for (
int i = 0; i < totpoints; ++i)
3600 outfile <<
m_phys[i] <<
" ";
3601 if (i % 1000 == 0 && i)
3603 outfile << std::endl;
3606 outfile << std::endl;
3610 int nPoints = (*m_exp)[expansion]->GetTotPoints();
3612 for (
int i = 0; i < nPoints; ++i)
3617 outfile << std::endl;
3623 outfile <<
"<?xml version=\"1.0\"?>" << endl;
3624 outfile << R
"(<VTKFile type="UnstructuredGrid" version="0.1" )"
3625 << "byte_order=\"LittleEndian\">" << endl;
3626 outfile <<
" <UnstructuredGrid>" << endl;
3631 outfile <<
" </UnstructuredGrid>" << endl;
3632 outfile <<
"</VTKFile>" << endl;
3636 [[maybe_unused]]
int istrip)
3639 int nbase = (*m_exp)[expansion]->GetNumBases();
3640 int ntot = (*m_exp)[expansion]->GetTotPoints();
3644 for (i = 0; i < nbase; ++i)
3646 nquad[i] = (*m_exp)[expansion]->GetNumPoints(i);
3647 ntotminus *= (nquad[i] - 1);
3654 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
3656 outfile <<
" <Piece NumberOfPoints=\"" << ntot <<
"\" NumberOfCells=\""
3657 << ntotminus <<
"\">" << endl;
3658 outfile <<
" <Points>" << endl;
3659 outfile <<
" <DataArray type=\"Float64\" "
3660 << R
"(NumberOfComponents="3" format="ascii">)" << endl;
3662 for (i = 0; i < ntot; ++i)
3664 for (j = 0; j < 3; ++j)
3666 outfile << setprecision(8) << scientific << (float)coords[j][i]
3672 outfile <<
" </DataArray>" << endl;
3673 outfile <<
" </Points>" << endl;
3674 outfile <<
" <Cells>" << endl;
3675 outfile <<
" <DataArray type=\"Int32\" "
3676 << R
"(Name="connectivity" format="ascii">)" << endl;
3686 for (i = 0; i < nquad[0] - 1; ++i)
3688 outfile << i <<
" " << i + 1 << endl;
3696 for (i = 0; i < nquad[0] - 1; ++i)
3698 for (j = 0; j < nquad[1] - 1; ++j)
3700 outfile << j * nquad[0] + i <<
" " << j * nquad[0] + i + 1
3701 <<
" " << (j + 1) * nquad[0] + i + 1 <<
" "
3702 << (j + 1) * nquad[0] + i << endl;
3711 for (i = 0; i < nquad[0] - 1; ++i)
3713 for (j = 0; j < nquad[1] - 1; ++j)
3715 for (k = 0; k < nquad[2] - 1; ++k)
3718 << k * nquad[0] * nquad[1] + j * nquad[0] + i <<
" "
3719 << k * nquad[0] * nquad[1] + j * nquad[0] + i + 1
3721 << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] +
3724 << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] + i
3726 << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] + i
3728 << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] +
3731 << (k + 1) * nquad[0] * nquad[1] +
3732 (j + 1) * nquad[0] + i + 1
3734 << (k + 1) * nquad[0] * nquad[1] +
3735 (j + 1) * nquad[0] + i
3747 outfile <<
" </DataArray>" << endl;
3748 outfile <<
" <DataArray type=\"Int32\" "
3749 << R
"(Name="offsets" format="ascii">)" << endl;
3750 for (i = 0; i < ntotminus; ++i)
3752 outfile << i * ns + ns <<
" ";
3755 outfile <<
" </DataArray>" << endl;
3756 outfile <<
" <DataArray type=\"UInt8\" "
3757 << R
"(Name="types" format="ascii">)" << endl;
3758 for (i = 0; i < ntotminus; ++i)
3763 outfile <<
" </DataArray>" << endl;
3764 outfile <<
" </Cells>" << endl;
3765 outfile <<
" <PointData>" << endl;
3769 [[maybe_unused]]
int expansion)
3771 outfile <<
" </PointData>" << endl;
3772 outfile <<
" </Piece>" << endl;
3779 int nq = (*m_exp)[expansion]->GetTotPoints();
3782 outfile << R
"( <DataArray type="Float64" Name=")" << var << "\">"
3788 for (i = 0; i < nq; ++i)
3794 outfile <<
" </DataArray>" << endl;
3828 err = max(err,
abs(inarray[i] - soln[i]));
3861 for (i = 0; i < (*m_exp).size(); ++i)
3864 err += errl2 * errl2;
3869 for (i = 0; i < (*m_exp).size(); ++i)
3873 err += errl2 * errl2;
3903 for (i = 0; i < (*m_exp).size(); ++i)
3919 for (i = 0; i < (*m_exp).size(); ++i)
3922 for (j = 0; j < inarray.size(); ++j)
3926 flux += (*m_exp)[i]->VectorFlux(tmp);
3935 "This method is not defined or valid for this class type");
3943 "This method is not defined or valid for this class type");
3951 "This method is not defined or valid for this class type");
3959 "This method is not defined or valid for this class type");
3965 "This method is not defined or valid for this class type");
3973 "This method is not defined or valid for this class type");
3981 "ClearGlobalLinSysManager not implemented for ExpList.");
3991 [[maybe_unused]]
bool clearLocalMatrices)
3994 "UnsetGlobalLinSys not implemented for ExpList.");
4001 "GetGlobalLinSysManager not implemented for ExpList.");
4007 const std::string &varName,
4010 string varString = fileName.substr(0, fileName.find_last_of(
"."));
4011 int j, k, len = varString.length();
4012 varString = varString.substr(len - 1, len);
4014 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
4015 std::vector<std::vector<NekDouble>> FieldData;
4020 ft, comm,
m_session->GetSharedFilesystem());
4022 f->Import(fileName, FieldDef, FieldData);
4025 for (j = 0; j < FieldDef.size(); ++j)
4027 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
4029 if (FieldDef[j]->m_fields[k] == varName)
4033 FieldDef[j]->m_fields[k], coeffs);
4039 ASSERTL0(found,
"Could not find variable '" + varName +
4040 "' in file boundary condition " + fileName);
4066 for (i = 0; i < (*m_exp).size(); ++i)
4070 err += errh1 * errh1;
4079 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef,
4081 std::vector<NekDouble> &HomoLen,
bool homoStrips,
4082 std::vector<unsigned int> &HomoSIDs, std::vector<unsigned int> &HomoZIDs,
4083 std::vector<unsigned int> &HomoYIDs)
4090 ASSERTL1(NumHomoDir == HomoBasis.size(),
4091 "Homogeneous basis is not the same length as NumHomoDir");
4092 ASSERTL1(NumHomoDir == HomoLen.size(),
4093 "Homogeneous length vector is not the same length as NumHomDir");
4112 for (s = startenum; s <= endenum; ++s)
4114 std::vector<unsigned int> elementIDs;
4115 std::vector<LibUtilities::BasisType> basis;
4116 std::vector<unsigned int> numModes;
4117 std::vector<std::string> fields;
4120 bool UniOrder =
true;
4125 for (
int i = 0; i < (*m_exp).size(); ++i)
4127 if ((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
4129 elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
4132 for (
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
4135 (*
m_exp)[i]->GetBasis(j)->GetBasisType());
4137 (*
m_exp)[i]->GetBasis(j)->GetNumModes());
4141 for (n = 0; n < NumHomoDir; ++n)
4143 basis.push_back(HomoBasis[n]->GetBasisType());
4144 numModes.push_back(HomoBasis[n]->GetNumModes());
4152 (*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
4153 "Routine is not set up for multiple bases definitions");
4155 for (
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
4158 (*
m_exp)[i]->GetBasis(j)->GetNumModes());
4160 (*
m_exp)[i]->GetBasis(j)->GetNumModes())
4166 for (n = 0; n < NumHomoDir; ++n)
4168 numModes.push_back(HomoBasis[n]->GetNumModes());
4174 if (elementIDs.size() > 0)
4179 numModes, fields, NumHomoDir, HomoLen,
4180 homoStrips, HomoSIDs, HomoZIDs, HomoYIDs);
4181 fielddef.push_back(fdef);
4189std::vector<LibUtilities::FieldDefinitionsSharedPtr>
ExpList::
4192 std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
4198 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef)
4207 std::vector<NekDouble> &fielddata)
4221 map<int, int> ElmtID_to_ExpID;
4222 for (i = 0; i < (*m_exp).size(); ++i)
4224 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
4227 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
4229 int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
4230 int datalen = (*m_exp)[eid]->GetNcoeffs();
4239 std::vector<NekDouble> &fielddata, std::string &
field,
4246 const std::shared_ptr<ExpList> &fromExpList,
4263 std::vector<NekDouble> &fielddata, std::string &
field,
4265 [[maybe_unused]] std::unordered_map<int, int> zIdToPlane)
4269 int modes_offset = 0;
4270 int datalen = fielddata.size() / fielddef->m_fields.size();
4273 for (i = 0; i < fielddef->m_fields.size(); ++i)
4275 if (fielddef->m_fields[i] ==
field)
4282 ASSERTL0(i != fielddef->m_fields.size(),
4283 "Field (" +
field +
") not found in file.");
4290 for (i = (*m_exp).size() - 1; i >= 0; --i)
4296 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
4300 if (fielddef->m_uniOrder ==
true)
4306 fielddef->m_shapeType, fielddef->m_numModes, modes_offset);
4308 const int elmtId = fielddef->m_elementIDs[i];
4314 modes_offset += (*m_exp)[0]->GetNumBases();
4318 expId = eIt->second;
4320 bool sameBasis =
true;
4321 for (
int j = 0; j < fielddef->m_basis.size(); ++j)
4323 if (fielddef->m_basis[j] != (*
m_exp)[expId]->GetBasisType(j))
4337 (*m_exp)[expId]->ExtractDataToCoeffs(
4338 &fielddata[offset], fielddef->m_numModes, modes_offset,
4343 modes_offset += (*m_exp)[0]->GetNumBases();
4350 const std::shared_ptr<ExpList> &fromExpList,
4357 map<int, int> GidToEid;
4359 for (i = 0; i < (*m_exp).size(); ++i)
4361 GidToEid[fromExpList->GetExp(i)->GetGeom()->GetGlobalID()] = i;
4364 for (i = 0; i < (*m_exp).size(); ++i)
4366 std::vector<unsigned int> nummodes;
4367 vector<LibUtilities::BasisType> basisTypes;
4369 int eid = GidToEid[(*m_exp)[i]->GetGeom()->GetGlobalID()];
4370 for (
int j = 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
4372 nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
4373 basisTypes.push_back(fromExpList->GetExp(eid)->GetBasisType(j));
4376 offset = fromExpList->GetCoeff_Offset(eid);
4377 (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes, 0,
4389 size_t nTracePts = weightAver.size();
4391 for (
int i = 0; i < nTracePts; ++i)
4393 weightAver[i] = 0.5;
4394 weightJump[i] = 1.0;
4406 int nq = outarray[0].size() / MFdim;
4409 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
4413 for (
int i = 0; i <
m_exp->size(); ++i)
4415 npts = (*m_exp)[i]->GetTotPoints();
4417 for (
int j = 0; j < MFdim * coordim; ++j)
4423 (*m_exp)[i]->GetMetricInfo()->GetMovingFrames(
4424 (*
m_exp)[i]->GetPointsKeys(), MMFdir, CircCentre, MFloc);
4427 for (
int j = 0; j < MFdim; ++j)
4429 for (
int k = 0; k < coordim; ++k)
4453 for (
int i = 0; i < (*m_exp).size(); ++i)
4455 npoints_e = (*m_exp)[i]->GetTotPoints();
4476 "This method is not defined or valid for this class type");
4482 [[maybe_unused]]
int i)
4485 "This method is not defined or valid for this class type");
4486 static std::shared_ptr<ExpList> result;
4509 int i, j, k, e_npoints, offset;
4517 "Input vector does not have sufficient dimensions to "
4521 for (i = 0; i <
m_exp->size(); ++i)
4524 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4525 normals = (*m_exp)[i]->GetPhysNormals();
4531 for (j = 0; j < e_npoints; ++j)
4535 for (k = 0; k < coordim; ++k)
4537 Vn += Vec[k][offset + j] * normals[k * e_npoints + j];
4543 Upwind[offset + j] = Fwd[offset + j];
4547 Upwind[offset + j] = Bwd[offset + j];
4555 "This method is not defined or valid for this class type");
4601 "This method is not defined or valid for this class type");
4602 static std::shared_ptr<ExpList> returnVal;
4609 "This method is not defined or valid for this class type");
4610 static std::shared_ptr<AssemblyMapDG> result;
4617 "This method is not defined or valid for this class type");
4618 static std::shared_ptr<InterfaceMapDG> result;
4624 return GetTraceMap()->GetBndCondIDToGlobalTraceID();
4630 "This method is not defined or valid for this class type");
4631 static std::vector<bool> result;
4648 for (
int i = 0; i < nquad2; ++i)
4650 for (
int j = 0; j < nquad1; ++j)
4652 out[i * nquad1 + j] = in[j * nquad2 + i];
4658 for (
int i = 0; i < nquad2; ++i)
4660 for (
int j = 0; j < nquad1; ++j)
4662 out[i * nquad1 + j] = in[i * nquad1 + j];
4673 for (
int i = 0; i < nquad2; ++i)
4675 for (
int j = 0; j < nquad1 / 2; ++j)
4677 swap(out[i * nquad1 + j], out[i * nquad1 + nquad1 - j - 1]);
4688 for (
int j = 0; j < nquad1; ++j)
4690 for (
int i = 0; i < nquad2 / 2; ++i)
4692 swap(out[i * nquad1 + j], out[(nquad2 - i - 1) * nquad1 + j]);
4709 int i, j, k, e_npoints, offset;
4715 ASSERTL1(normals.size() >= coordim,
4716 "Output vector does not have sufficient dimensions to "
4724 for (i = 0; i <
m_exp->size(); ++i)
4729 loc_exp->GetLeftAdjacentElementExp();
4733 locnormals = loc_elmt->GetTraceNormal(
4734 loc_exp->GetLeftAdjacentElementTrace());
4740 for (j = 0; j < e_npoints; ++j)
4744 for (k = 0; k < coordim; ++k)
4746 normals[k][offset] = locnormals[k][0];
4755 for (i = 0; i <
m_exp->size(); ++i)
4763 traceExp->GetLeftAdjacentElementExp();
4764 int edgeId = traceExp->GetLeftAdjacentElementTrace();
4766 exp2D->GetTraceBasisKey(edgeId).GetPointsKey();
4768 traceExp->GetBasis(0)->GetPointsKey();
4775 bool useRight =
false;
4776 if (traceExp->GetRightAdjacentElementTrace() >= 0)
4779 traceExp->GetRightAdjacentElementExp();
4780 int RedgeId = traceExp->GetRightAdjacentElementTrace();
4782 Rexp2D->GetTraceBasisKey(RedgeId).GetPointsKey();
4788 edgePoints = RedgePoints;
4794 exp2D->GetTraceNormal(edgeId);
4799 for (
int d = 0;
d < coordim; ++
d)
4803 normals[
d].data() + offset);
4809 &normals[
d][offset], 1);
4820 for (i = 0; i <
m_exp->size(); ++i)
4841 traceExp->GetLeftAdjacentElementExp();
4842 int faceId = traceExp->GetLeftAdjacentElementTrace();
4844 exp3D->GetTraceNormal(faceId);
4850 int fromid0, fromid1;
4864 exp3D->GetTraceBasisKey(faceId, fromid0);
4866 exp3D->GetTraceBasisKey(faceId, fromid1);
4868 traceExp->GetBasis(0)->GetBasisKey();
4870 traceExp->GetBasis(1)->GetBasisKey();
4879 exp3D->ReOrientTracePhysMap(orient, map, faceNq0, faceNq1);
4883 for (j = 0; j < coordim; ++j)
4891 traceBasis1.
GetPointsKey(), tmp = normals[j] + offset);
4899 "This method is not defined or valid for this class type");
4926 lengLR[0] = lengthsFwd;
4927 lengLR[1] = lengthsBwd;
4931 int e_npoints0 = -1;
4934 for (
int i = 0; i <
m_exp->size(); ++i)
4936 loc_exp = (*m_exp)[i];
4939 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4940 if (e_npoints0 < e_npoints)
4942 for (
int nlr = 0; nlr < 2; nlr++)
4946 e_npoints0 = e_npoints;
4949 LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
4950 LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
4952 LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
4953 LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
4954 for (
int nlr = 0; nlr < 2; ++nlr)
4957 lengAdd[nlr] = lengintp[nlr];
4958 int bndNumber = LRbndnumbs[nlr];
4959 loc_elmt = LRelmts[nlr];
4962 locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
4965 loc_exp->GetBasis(0)->GetPointsKey();
4967 loc_elmt->GetTraceBasisKey(bndNumber).GetPointsKey();
4976 lengAdd[nlr] = lengintp[nlr];
4979 for (
int j = 0; j < e_npoints; ++j)
4981 lengLR[nlr][offset + j] = lengAdd[nlr][j];
4988 for (
int i = 0; i <
m_exp->size(); ++i)
4990 loc_exp = (*m_exp)[i];
4994 loc_exp->GetBasis(0)->GetBasisKey();
4996 loc_exp->GetBasis(1)->GetBasisKey();
4999 e_npoints = TraceNq0 * TraceNq1;
5000 if (e_npoints0 < e_npoints)
5002 for (
int nlr = 0; nlr < 2; nlr++)
5006 e_npoints0 = e_npoints;
5009 LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
5010 LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
5012 LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
5013 LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
5014 for (
int nlr = 0; nlr < 2; ++nlr)
5017 int bndNumber = LRbndnumbs[nlr];
5018 loc_elmt = LRelmts[nlr];
5021 locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
5025 loc_elmt->GetTraceOrient(bndNumber);
5027 int fromid0, fromid1;
5040 loc_elmt->GetTraceBasisKey(bndNumber, fromid0);
5042 loc_elmt->GetTraceBasisKey(bndNumber, fromid1);
5047 AlignFace(orient, faceNq0, faceNq1, locLeng, alignedLeng);
5054 for (
int j = 0; j < e_npoints; ++j)
5056 lengLR[nlr][offset + j] = lengintp[nlr][j];
5068 "This method is not defined or valid for this class type");
5077 "This method is not defined or valid for this class type");
5084 "This method is not defined or valid for this class type");
5091 [[maybe_unused]]
bool PutFwdInBwdOnBCs, [[maybe_unused]]
bool DoExchange)
5094 "This method is not defined or valid for this class type");
5100 [[maybe_unused]]
bool PutFwdInBwdOnBCs)
5103 "This method is not defined or valid for this class type");
5112 "v_AddTraceQuadPhysToField is not defined for this class type");
5121 "v_AddTraceQuadPhysToOffDiag is not defined for this class");
5131 "v_GetLocTraceFromTracePts is not defined for this class");
5137 "v_GetBndCondBwdWeight is not defined for this class type");
5146 "v_setBndCondBwdWeight is not defined for this class type");
5152 "This method is not defined or valid for this class type");
5153 static vector<bool> tmp;
5161 "This method is not defined or valid for this class type");
5169 "This method is not defined or valid for this class type");
5177 "This method is not defined or valid for this class type");
5187 [[maybe_unused]]
const bool PhysSpaceForcing)
5200 [[maybe_unused]]
const bool PhysSpaceForcing)
5203 "LinearAdvectionDiffusionReactionSolve not implemented.");
5211 [[maybe_unused]]
const NekDouble lambda,
5215 "This method is not defined or valid for this class type");
5219 [[maybe_unused]]
const int npts,
5222 [[maybe_unused]]
bool Shuff, [[maybe_unused]]
bool UnShuff)
5225 "This method is not defined or valid for this class type");
5229 [[maybe_unused]]
const int npts,
5232 [[maybe_unused]]
bool Shuff, [[maybe_unused]]
bool UnShuff)
5235 "This method is not defined or valid for this class type");
5239 [[maybe_unused]]
const int npts,
5245 "This method is not defined or valid for this class type");
5249 [[maybe_unused]]
const int npts,
5255 "This method is not defined or valid for this class type");
5261 [[maybe_unused]]
int BndID)
5264 "This method is not defined or valid for this class type");
5271 [[maybe_unused]]
int BndID)
5274 "This method is not defined or valid for this class type");
5287 (*m_exp)[i]->NormVectorIProductWRTBase(
5297 (*m_exp)[i]->NormVectorIProductWRTBase(
5307 (*m_exp)[i]->NormVectorIProductWRTBase(
5324 "This method is not defined or valid for this class type");
5333 "This method is not defined or valid for this class type");
5339 [[maybe_unused]]
const int nreg,
5343 "This method is not defined or valid for this class type");
5349 "This method is not defined or valid for this class type");
5355 [[maybe_unused]]
bool useComm)
5358 "This method is not defined or valid for this class type");
5364 "This method is not defined or valid for this class type");
5372 "This method is not defined or valid for this class type");
5408 int input_offset{0};
5409 int output_offset{0};
5413 inarray + input_offset,
5414 tmp = outarray + output_offset);
5453 for (i = 0; i < (*m_exp).size(); ++i)
5456 (*m_exp)[i]->GetCoords(e_coord_0);
5460 ASSERTL0(coord_1.size() != 0,
"output coord_1 is not defined");
5462 for (i = 0; i < (*m_exp).size(); ++i)
5466 (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1);
5470 ASSERTL0(coord_1.size() != 0,
"output coord_1 is not defined");
5471 ASSERTL0(coord_2.size() != 0,
"output coord_2 is not defined");
5473 for (i = 0; i < (*m_exp).size(); ++i)
5478 (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1, e_coord_2);
5488 (*m_exp)[eid]->GetCoords(xc0, xc1, xc2);
5498 for (
int i = 0; i <
m_exp->size(); ++i)
5500 for (
int j = 0; j < (*m_exp)[i]->GetNtraces(); ++j)
5502 (*m_exp)[i]->ComputeTraceNormal(j);
5510 [[maybe_unused]]
int i, [[maybe_unused]] std::shared_ptr<ExpList> &result,
5511 [[maybe_unused]]
const bool DeclareCoeffPhysArrays)
5514 "This method is not defined or valid for this class type");
5535 for (cnt = n = 0; n < i; ++n)
5546 elmt =
GetExp(ElmtID[cnt + n]);
5547 elmt->GetTracePhysVals(
5549 tmp1 = element + offsetElmt, tmp2 = boundary + offsetBnd);
5551 offsetElmt += elmt->GetTotPoints();
5567 for (cnt = n = 0; n < i; ++n)
5576 npoints +=
GetExp(ElmtID[cnt + n])->GetTotPoints();
5587 nq =
GetExp(ElmtID[cnt + n])->GetTotPoints();
5589 Vmath::Vcopy(nq, &phys[offsetPhys], 1, &bndElmt[offsetElmt], 1);
5612 for (cnt = n = 0; n < i; ++n)
5624 elmt =
GetExp(ElmtID[cnt + n]);
5625 elmt->GetTracePhysVals(EdgeID[cnt + n],
5627 phys + offsetPhys, tmp1 = bnd + offsetBnd);
5646 for (j = 0; j < coordim; ++j)
5653 for (cnt = n = 0; n < i; ++n)
5664 elmt =
GetExp(ElmtID[cnt + n]);
5666 elmt->GetTraceNormal(EdgeID[cnt + n]);
5668 for (j = 0; j < coordim; ++j)
5670 Vmath::Vcopy(nq, normalsElmt[j], 1, tmp = normals[j] + offset, 1);
5681 "This method is not defined or valid for this class type");
5704 "This method is not defined or valid for this class type");
5715 "This method is not defined or valid for this class type");
5724 [[maybe_unused]]
const std::string varName,
5729 "This method is not defined or valid for this class type");
5737 "This method is not defined or valid for this class type");
5738 static map<int, RobinBCInfoSharedPtr> result;
5749 "This method is not defined or valid for this class type");
5754 unsigned int regionId,
const std::string &variable)
5756 auto collectionIter = collection.find(regionId);
5757 ASSERTL1(collectionIter != collection.end(),
5758 "Unable to locate collection " +
5759 boost::lexical_cast<string>(regionId));
5762 (*collectionIter).second;
5763 auto conditionMapIter = bndCondMap->find(variable);
5764 ASSERTL1(conditionMapIter != bndCondMap->end(),
5765 "Unable to locate condition map.");
5768 (*conditionMapIter).second;
5770 return boundaryCondition;
5776 "This method is not defined or valid for this class type");
5808 if (
m_graph->GetMeshDimension() == (*
m_exp)[0]->GetShapeDimension())
5814 bool verbose = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
5829 : 2 *
m_exp->size());
5831 vector<StdRegions::StdExpansionSharedPtr> collExp;
5836 collExp.push_back(exp);
5840 std::vector<LibUtilities::BasisKey> thisbasisKeys(
5842 std::vector<LibUtilities::BasisKey> prevbasisKeys(
5845 for (
int d = 0;
d < exp->GetNumBases();
d++)
5847 prevbasisKeys[
d] = exp->GetBasis(
d)->GetBasisKey();
5855 int mincol = (*m_exp).size();
5859 for (
int i = 1; i < (*m_exp).size(); i++)
5864 for (
int d = 0;
d < exp->GetNumBases();
d++)
5866 thisbasisKeys[
d] = exp->GetBasis(
d)->GetBasisKey();
5874 if (thisbasisKeys != prevbasisKeys || prevDef != Deformed ||
5884 if (collExp.size() > collsize)
5888 collsize = collExp.size();
5896 mincol = min(mincol, (
int)collExp.size());
5897 maxcol = max(maxcol, (
int)collExp.size());
5898 meancol += collExp.size();
5911 collExp.push_back(exp);
5914 prevbasisKeys = thisbasisKeys;
5921 if (collExp.size() > collsize)
5924 collsize = collExp.size();
5931 mincol = min(mincol, (
int)collExp.size());
5932 maxcol = max(maxcol, (
int)collExp.size());
5933 meancol += collExp.size();
5936 <<
"; mean len = " << meancol <<
" (min = " << mincol
5937 <<
", max = " << maxcol <<
")" << endl;
6014 int input_offset{0};
6015 int output_offset{0};
6019 inarray + input_offset,
6020 tmp = outarray + output_offset);
6042 int nTotElmt = (*m_exp).size();
6043 int nElmtPnt = (*m_exp)[0]->GetTotPoints();
6044 int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
6049 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6051 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6052 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6054 if (tmpPhys.size() != nElmtPnt || tmpCoef.size() != nElmtCoef)
6060 for (
int ncl = 0; ncl < nElmtPnt; ncl++)
6062 tmpPhys[ncl] = inarray[nelmt][ncl];
6064 (*m_exp)[nelmt]->IProductWRTDerivBase(nDirctn, tmpPhys, tmpCoef);
6066 for (
int nrw = 0; nrw < nElmtCoef; nrw++)
6068 (*mtxPerVar[nelmt])(nrw, ncl) = tmpCoef[nrw];
6079 int nTotElmt = (*m_exp).size();
6081 int nspacedim =
m_graph->GetSpaceDimension();
6090 int nElmtPntPrevious = 0;
6091 int nElmtCoefPrevious = 0;
6093 int nElmtPnt, nElmtCoef;
6094 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6096 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6097 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6100 if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
6101 (ElmtTypeNow != ElmtTypePrevious))
6103 if (nElmtPntPrevious != nElmtPnt)
6105 for (
int ndir = 0; ndir < nspacedim; ndir++)
6112 stdExp = (*m_exp)[nelmt]->GetStdExp();
6114 stdExp->DetShapeType(), *stdExp);
6116 ArrayStdMat[0] = stdExp->GetStdMatrix(matkey);
6117 ArrayStdMat_data[0] = ArrayStdMat[0]->GetPtr();
6124 ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
6125 ArrayStdMat_data[1] = ArrayStdMat[1]->GetPtr();
6130 stdExp->DetShapeType(),
6133 ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
6134 ArrayStdMat_data[2] = ArrayStdMat[2]->GetPtr();
6138 ElmtTypePrevious = ElmtTypeNow;
6139 nElmtPntPrevious = nElmtPnt;
6140 nElmtCoefPrevious = nElmtCoef;
6144 for (
int ndir = 0; ndir < nspacedim; ndir++)
6150 for (
int ndir = 0; ndir < nspacedim; ndir++)
6152 (*m_exp)[nelmt]->AlignVectorToCollapsedDir(
6153 ndir, inarray[ndir][nelmt], tmppnts);
6154 for (
int n = 0; n < nspacedim; n++)
6156 Vmath::Vadd(nElmtPnt, tmppnts[n], 1, projectedpnts[n], 1,
6157 projectedpnts[n], 1);
6161 for (
int ndir = 0; ndir < nspacedim; ndir++)
6164 (*m_exp)[nelmt]->MultiplyByQuadratureMetric(projectedpnts[ndir],
6165 projectedpnts[ndir]);
6168 for (
int np = 0; np < nElmtPnt; np++)
6170 NekDouble factor = projectedpnts[ndir][np];
6171 clmnArray = MatDataArray + np * nElmtCoef;
6172 clmnStdMatArray = ArrayStdMat_data[ndir] + np * nElmtCoef;
6173 Vmath::Svtvp(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray,
6186 int nElmtPntPrevious = 0;
6187 int nElmtCoefPrevious = 0;
6188 int nTotElmt = (*m_exp).size();
6189 int nElmtPnt = (*m_exp)[0]->GetTotPoints();
6190 int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
6196 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
6198 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
6199 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
6202 if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
6203 (ElmtTypeNow != ElmtTypePrevious))
6206 stdExp = (*m_exp)[nelmt]->GetStdExp();
6208 stdExp->DetShapeType(), *stdExp);
6211 stdMat_data = BwdMat->GetPtr();
6213 if (nElmtPntPrevious != nElmtPnt)
6218 ElmtTypePrevious = ElmtTypeNow;
6219 nElmtPntPrevious = nElmtPnt;
6220 nElmtCoefPrevious = nElmtCoef;
6223 (*m_exp)[nelmt]->MultiplyByQuadratureMetric(
6229 for (
int np = 0; np < nElmtPnt; np++)
6232 clmnArray = MatDataArray + np * nElmtCoef;
6233 clmnStdMatArray = stdMat_data + np * nElmtCoef;
6234 Vmath::Smul(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray, 1);
6258 std::shared_ptr<LocalRegions::ExpansionVector> traceExp =
6259 tracelist->GetExp();
6260 int ntotTrace = (*traceExp).size();
6261 int nTracePnt, nTraceCoef;
6263 std::shared_ptr<LocalRegions::ExpansionVector> fieldExp =
GetExp();
6269 locTraceToTraceMap->GetLeftRightAdjacentExpId();
6271 locTraceToTraceMap->GetLeftRightAdjacentExpFlag();
6274 locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffMap();
6276 locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffSign();
6281 int MatIndex, nPnts;
6284 int nTracePntsTtl = tracelist->GetTotPoints();
6285 int nlocTracePts = locTraceToTraceMap->GetNLocTracePts();
6286 int nlocTracePtsFwd = locTraceToTraceMap->GetNFwdLocTracePts();
6287 int nlocTracePtsBwd = nlocTracePts - nlocTracePtsFwd;
6290 nlocTracePtsLR[0] = nlocTracePtsFwd;
6291 nlocTracePtsLR[1] = nlocTracePtsBwd;
6293 size_t nFwdBwdNonZero = 0;
6295 for (
int i = 0; i < 2; ++i)
6297 if (nlocTracePtsLR[i] > 0)
6299 tmpIndex[nFwdBwdNonZero] = i;
6305 for (
int i = 0; i < nFwdBwdNonZero; ++i)
6307 nlocTracePtsNonZeroIndex[i] = tmpIndex[i];
6313 for (
int k = 0; k < 2; ++k)
6318 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6320 size_t i = nlocTracePtsNonZeroIndex[k];
6324 int nNumbElmt = fieldMat.size();
6327 for (
int i = 0; i < nNumbElmt; i++)
6329 ElmtMatDataArray[i] = fieldMat[i]->GetPtr();
6333 int nTraceCoefMax = 0;
6334 int nTraceCoefMin = std::numeric_limits<int>::max();
6340 for (
int nt = 0; nt < ntotTrace; nt++)
6342 nTraceCoef = (*traceExp)[nt]->GetNcoeffs();
6343 nTracePnt = tracelist->GetTotPoints(nt);
6344 int noffset = tracelist->GetPhys_Offset(nt);
6345 TraceCoefArray[nt] = nTraceCoef;
6346 TracePntArray[nt] = nTracePnt;
6347 TraceOffArray[nt] = noffset;
6348 FwdMatData[nt] = FwdMat[nt]->GetPtr();
6349 BwdMatData[nt] = BwdMat[nt]->GetPtr();
6350 if (nTraceCoef > nTraceCoefMax)
6352 nTraceCoefMax = nTraceCoef;
6354 if (nTraceCoef < nTraceCoefMin)
6356 nTraceCoefMin = nTraceCoef;
6359 WARNINGL1(nTraceCoefMax == nTraceCoefMin,
6360 "nTraceCoefMax!=nTraceCoefMin: Effeciency may be low ");
6362 int traceID, nfieldPnts, ElmtId, noffset;
6364 locTraceToTraceMap->GetLocTracephysToTraceIDMap();
6366 locTraceToTraceMap->GetLocTraceToFieldMap();
6369 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6371 size_t i = nlocTracePtsNonZeroIndex[k];
6373 Vmath::Vcopy(nlocTracePtsLR[i], &fieldToLocTraceMap[0] + noffset, 1,
6374 &fieldToLocTraceMapLR[i][0], 1);
6375 noffset += nlocTracePtsLR[i];
6379 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6381 size_t nlr = nlocTracePtsNonZeroIndex[k];
6383 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6385 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6386 nTraceCoef = TraceCoefArray[traceID];
6387 ElmtId = LRAdjExpid[nlr][traceID];
6389 nElmtCoef = ElmtCoefArray[ElmtId];
6390 nfieldPnts = fieldToLocTraceMapLR[nlr][nloc];
6391 nPnts = nfieldPnts - noffset;
6393 MatIndexArray[nlr][nloc] = nPnts * nElmtCoef;
6397 for (
int nc = 0; nc < nTraceCoefMin; nc++)
6399 for (
int nt = 0; nt < ntotTrace; nt++)
6401 nTraceCoef = TraceCoefArray[nt];
6402 nTracePnt = TracePntArray[nt];
6403 noffset = TraceOffArray[nt];
6404 Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
6405 &TraceFwdPhy[noffset], 1);
6406 Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
6407 &TraceBwdPhy[noffset], 1);
6410 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6412 size_t i = nlocTracePtsNonZeroIndex[k];
6413 Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
6419 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6421 size_t nlr = nlocTracePtsNonZeroIndex[k];
6422 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6424 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6425 nTraceCoef = TraceCoefArray[traceID];
6426 ElmtId = LRAdjExpid[nlr][traceID];
6427 nrwAdjExp = elmtLRMap[nlr][traceID][nc];
6428 sign = elmtLRSign[nlr][traceID][nc];
6429 MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
6431 ElmtMatDataArray[ElmtId][MatIndex] -=
6432 sign * tmplocTrace[nlr][nloc];
6437 for (
int nc = nTraceCoefMin; nc < nTraceCoefMax; nc++)
6439 for (
int nt = 0; nt < ntotTrace; nt++)
6441 nTraceCoef = TraceCoefArray[nt];
6442 nTracePnt = TracePntArray[nt];
6443 noffset = TraceOffArray[nt];
6444 if (nc < nTraceCoef)
6446 Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
6447 &TraceFwdPhy[noffset], 1);
6448 Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
6449 &TraceBwdPhy[noffset], 1);
6458 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6460 size_t i = nlocTracePtsNonZeroIndex[k];
6461 Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
6466 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6468 size_t nlr = nlocTracePtsNonZeroIndex[k];
6469 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6471 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6472 nTraceCoef = TraceCoefArray[traceID];
6473 if (nc < nTraceCoef)
6475 ElmtId = LRAdjExpid[nlr][traceID];
6476 nrwAdjExp = elmtLRMap[nlr][traceID][nc];
6477 sign = -elmtLRSign[nlr][traceID][nc];
6478 MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
6480 ElmtMatDataArray[ElmtId][MatIndex] +=
6481 sign * tmplocTrace[nlr][nloc];
6493 int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
6506 nelmtcoef0 = nelmtcoef;
6507 nelmtpnts0 = nelmtpnts;
6509 for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
6514 tmpMatQ = ElmtJacQuad[nelmt];
6515 tmpMatC = ElmtJacCoef[nelmt];
6517 MatQ_data = tmpMatQ->GetPtr();
6518 MatC_data = tmpMatC->GetPtr();
6520 if (nelmtcoef != nelmtcoef0)
6523 nelmtcoef0 = nelmtcoef;
6526 if (nelmtpnts != nelmtpnts0)
6529 nelmtpnts0 = nelmtpnts;
6532 for (
int np = 0; np < nelmtcoef; np++)
6534 Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
6536 (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
6537 (*m_exp)[nelmt]->IProductWRTDerivBase(dir, innarray, outarray);
6539 Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
6540 nelmtcoef, &MatC_data[0] + np, nelmtcoef);
6550 int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
6563 nelmtcoef0 = nelmtcoef;
6564 nelmtpnts0 = nelmtpnts;
6566 for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
6571 tmpMatQ = ElmtJacQuad[nelmt];
6572 tmpMatC = ElmtJacCoef[nelmt];
6574 MatQ_data = tmpMatQ->GetPtr();
6575 MatC_data = tmpMatC->GetPtr();
6577 if (nelmtcoef != nelmtcoef0)
6580 nelmtcoef0 = nelmtcoef;
6583 if (nelmtpnts != nelmtpnts0)
6586 nelmtpnts0 = nelmtpnts;
6589 for (
int np = 0; np < nelmtcoef; np++)
6591 Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
6593 (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
6594 (*m_exp)[nelmt]->IProductWRTBase(innarray, outarray);
6596 Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
6597 nelmtcoef, &MatC_data[0] + np, nelmtcoef);
6617 int pt0 = (*m_exp)[i]->GetNumPoints(0);
6618 int pt1 = (*m_exp)[i]->GetNumPoints(1);
6619 int npt0 = (int)pt0 * scale;
6620 int npt1 = (int)pt1 * scale;
6623 npt0, (*
m_exp)[i]->GetPointsType(0));
6625 npt1, (*
m_exp)[i]->GetPointsType(1));
6629 newPointsKey0, newPointsKey1, &inarray[cnt],
6630 (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
6631 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(), &outarray[cnt1]);
6643 int pt0 = (*m_exp)[i]->GetNumPoints(0);
6644 int pt1 = (*m_exp)[i]->GetNumPoints(1);
6645 int pt2 = (*m_exp)[i]->GetNumPoints(2);
6646 int npt0 = (int)pt0 * scale;
6647 int npt1 = (int)pt1 * scale;
6648 int npt2 = (int)pt2 * scale;
6651 npt0, (*
m_exp)[i]->GetPointsType(0));
6653 npt1, (*
m_exp)[i]->GetPointsType(1));
6655 npt2, (*
m_exp)[i]->GetPointsType(2));
6659 newPointsKey0, newPointsKey1, newPointsKey2, &inarray[cnt],
6660 (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
6661 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(),
6662 (*
m_exp)[i]->GetBasis(2)->GetPointsKey(), &outarray[cnt1]);
6664 cnt += npt0 * npt1 * npt2;
6665 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