37#include <boost/core/ignore_unused.hpp>
103 : m_expType(type), m_ncoeffs(0), m_npoints(0), m_physState(false),
119 : std::enable_shared_from_this<
ExpList>(in), m_expType(in.m_expType),
121 m_comm(in.m_comm), m_session(in.m_session), m_graph(in.m_graph),
122 m_ncoeffs(in.m_ncoeffs), m_npoints(in.m_npoints), m_physState(false),
123 m_exp(in.m_exp), m_collections(in.m_collections),
124 m_collectionsDoInit(in.m_collectionsDoInit),
125 m_coll_coeff_offset(in.m_coll_coeff_offset),
126 m_coll_phys_offset(in.m_coll_phys_offset),
127 m_coeff_offset(in.m_coeff_offset), m_phys_offset(in.m_phys_offset),
128 m_blockMat(in.m_blockMat), m_WaveSpace(false),
129 m_elmtToExpId(in.m_elmtToExpId)
138 const bool DeclarePhysArrays)
139 : m_expType(in->m_expType),
141 m_comm(in->m_comm), m_session(in->m_session), m_graph(in->m_graph),
142 m_ncoeffs(in->m_ncoeffs), m_npoints(in->m_npoints),
143 m_physState(in->m_physState), m_exp(in->m_exp),
144 m_collections(in->m_collections),
145 m_collectionsDoInit(in->m_collectionsDoInit),
146 m_coll_coeff_offset(in->m_coll_coeff_offset),
147 m_coll_phys_offset(in->m_coll_phys_offset),
148 m_coeff_offset(in->m_coeff_offset), m_phys_offset(in->m_phys_offset),
149 m_coeffsToElmt(in->m_coeffsToElmt), m_blockMat(in->m_blockMat),
150 m_WaveSpace(in->m_WaveSpace), m_elmtToExpId(in->m_elmtToExpId)
152 if (DeclareCoeffArrays)
156 if (DeclarePhysArrays)
168 const bool DeclareCoeffPhysArrays,
170 : m_expType(in.m_expType), m_comm(in.m_comm), m_session(in.m_session),
171 m_graph(in.m_graph), m_physState(false),
176 for (
int i = 0; i < eIDs.size(); ++i)
178 (*m_exp).push_back((*(in.
m_exp))[eIDs[i]]);
209 const bool DeclareCoeffPhysArrays,
const std::string &var,
211 : m_comm(pSession->GetComm()), m_session(pSession), m_graph(graph),
219 graph->GetExpansionInfo(var);
251 const bool DeclareCoeffPhysArrays,
253 : m_comm(pSession->GetComm()), m_session(pSession), m_physState(false),
273 : m_expType(
e0D), m_ncoeffs(1), m_npoints(1), m_physState(false),
280 (*m_exp).push_back(
Point);
312 : m_comm(comm), m_session(pSession), m_graph(graph), m_physState(false),
317 boost::ignore_unused(variable, ImpType);
318 int i, j, id, elmtid = 0;
336 for (i = 0; i < bndCond.size(); ++i)
338 if (bndCond[i]->GetBoundaryConditionType() ==
341 for (j = 0; j < bndConstraint[i]->GetExpSize(); ++j)
344 std::dynamic_pointer_cast<LocalRegions::Expansion0D>(
345 bndConstraint[i]->
GetExp(j))))
349 PointGeom = exp0D->GetGeom()->GetVertex(0);
352 tracesDone.insert(PointGeom->GetVid());
354 else if ((exp1D = std::dynamic_pointer_cast<
356 bndConstraint[i]->
GetExp(j))))
361 exp1D->GetBasis(0)->GetBasisKey();
362 segGeom = exp1D->GetGeom1D();
366 tracesDone.insert(segGeom->GetGlobalID());
368 else if ((exp2D = std::dynamic_pointer_cast<
369 LocalRegions::Expansion2D>(
370 bndConstraint[i]->
GetExp(j))))
374 LibUtilities::BasisKey bkey0 =
375 exp2D->GetBasis(0)->GetBasisKey();
376 LibUtilities::BasisKey bkey1 =
377 exp2D->GetBasis(1)->GetBasisKey();
378 FaceGeom = exp2D->GetGeom2D();
381 if ((QuadGeom = std::dynamic_pointer_cast<
382 SpatialDomains::QuadGeom>(FaceGeom)))
385 LocalRegions::QuadExp>::AllocateSharedPtr(bkey0,
388 tracesDone.insert(QuadGeom->GetGlobalID());
391 else if ((TriGeom = std::dynamic_pointer_cast<
392 SpatialDomains::TriGeom>(FaceGeom)))
395 LocalRegions::TriExp>::AllocateSharedPtr(bkey0,
398 tracesDone.insert(TriGeom->GetGlobalID());
404 "proper face geometry failed");
408 exp->SetElmtId(elmtid++);
411 (*m_exp).push_back(exp);
416 map<int, pair<SpatialDomains::Geometry1DSharedPtr, LibUtilities::BasisKey>>
420 pair<LibUtilities::BasisKey, LibUtilities::BasisKey>>>
423 for (i = 0; i < locexp.size(); ++i)
425 if ((exp1D = std::dynamic_pointer_cast<LocalRegions::Expansion1D>(
430 for (j = 0; j < 2; ++j)
432 PointGeom = (exp1D->GetGeom1D())->GetVertex(j);
433 id = PointGeom->GetVid();
436 if (tracesDone.count(
id) != 0)
443 tracesDone.insert(
id);
444 exp->SetElmtId(elmtid++);
445 (*m_exp).push_back(exp);
448 else if ((exp2D = std::dynamic_pointer_cast<LocalRegions::Expansion2D>(
452 for (j = 0; j < locexp[i]->GetNtraces(); ++j)
454 segGeom = exp2D->GetGeom2D()->GetEdge(j);
455 id = segGeom->GetGlobalID();
457 if (tracesDone.count(
id) != 0)
462 auto it = edgeOrders.find(
id);
464 if (it == edgeOrders.end())
466 edgeOrders.insert(std::make_pair(
467 id, std::make_pair(segGeom,
468 locexp[i]->GetTraceBasisKey(j))));
472 LibUtilities::BasisKey edge =
473 locexp[i]->GetTraceBasisKey(j);
474 LibUtilities::BasisKey existing = it->second.second;
476 int np1 = edge.GetNumPoints();
477 int np2 = existing.GetNumPoints();
478 int nm1 = edge.GetNumModes();
479 int nm2 = existing.GetNumModes();
487 if (np2 >= np1 && nm2 >= nm1)
491 else if (np2 <= np1 && nm2 <= nm1)
493 it->second.second = edge;
498 "inappropriate number of points/modes (max"
499 "num of points is not set with max order)");
504 else if ((exp3D = dynamic_pointer_cast<LocalRegions::Expansion3D>(
508 for (j = 0; j < exp3D->GetNtraces(); ++j)
510 FaceGeom = exp3D->GetGeom3D()->GetFace(j);
511 id = FaceGeom->GetGlobalID();
513 if (tracesDone.count(
id) != 0)
517 auto it = faceOrders.find(
id);
519 if (it == faceOrders.end())
523 LibUtilities::BasisKey face_dir0 =
524 locexp[i]->GetTraceBasisKey(j, 0);
525 LibUtilities::BasisKey face_dir1 =
526 locexp[i]->GetTraceBasisKey(j, 1);
531 if (locexp[i]->GetTraceOrient(j) >= 9)
533 std::swap(face_dir0, face_dir1);
536 faceOrders.insert(std::make_pair(
538 std::make_pair(FaceGeom,
539 std::make_pair(face_dir0, face_dir1))));
543 LibUtilities::BasisKey face0 =
544 locexp[i]->GetTraceBasisKey(j, 0);
545 LibUtilities::BasisKey face1 =
546 locexp[i]->GetTraceBasisKey(j, 1);
547 LibUtilities::BasisKey existing0 = it->second.second.first;
548 LibUtilities::BasisKey existing1 = it->second.second.second;
552 int np11 = face0.GetNumPoints();
553 int np12 = face1.GetNumPoints();
554 int np21 = existing0.GetNumPoints();
555 int np22 = existing1.GetNumPoints();
556 int nm11 = face0.GetNumModes();
557 int nm12 = face1.GetNumModes();
558 int nm21 = existing0.GetNumModes();
559 int nm22 = existing1.GetNumModes();
568 if (locexp[i]->GetTraceOrient(j) >= 9)
570 std::swap(np11, np12);
571 std::swap(nm11, nm12);
572 std::swap(face0, face1);
578 if (existing1.GetPointsType() ==
579 LibUtilities::eGaussRadauMAlpha1Beta0)
581 if (face1.GetPointsType() ==
589 if (face1.GetPointsType() ==
590 LibUtilities::eGaussRadauMAlpha1Beta0)
596 if (existing0.GetPointsType() ==
597 LibUtilities::eGaussRadauMAlpha1Beta0)
599 if (face0.GetPointsType() ==
607 if (face0.GetPointsType() ==
608 LibUtilities::eGaussRadauMAlpha1Beta0)
617 if (np22 >= np12 && nm22 >= nm12)
621 else if (np22 <= np12 && nm22 <= nm12)
625 LibUtilities::BasisKey newbkey(
626 existing1.GetBasisType(), nm12,
627 LibUtilities::PointsKey(np12,
628 existing1.GetPointsType()));
629 it->second.second.second = newbkey;
634 "inappropriate number of points/modes (max"
635 "num of points is not set with max order)");
638 if (np21 >= np11 && nm21 >= nm11)
642 else if (np21 <= np11 && nm21 <= nm11)
646 LibUtilities::PointsKey newpkey(
647 np11, existing0.GetPointsType());
648 LibUtilities::BasisKey newbkey(existing0.GetBasisType(),
650 it->second.second.first = newbkey;
655 "inappropriate number of points/modes (max"
656 "num of points is not set with max order)");
663 int nproc =
m_comm->GetRowComm()->GetSize();
664 int tracepr =
m_comm->GetRowComm()->GetRank();
671 for (i = 0; i < locexp.size(); ++i)
673 tCnt += locexp[i]->GetNtraces();
678 Array<OneD, int> tracesCnt(nproc, 0);
679 tracesCnt[tracepr] = tCnt;
683 int totTraceCnt =
Vmath::Vsum(nproc, tracesCnt, 1);
684 Array<OneD, int> tTotOffsets(nproc, 0);
686 for (i = 1; i < nproc; ++i)
688 tTotOffsets[i] = tTotOffsets[i - 1] + tracesCnt[i - 1];
693 Array<OneD, int> TracesTotID(totTraceCnt, 0);
694 Array<OneD, int> TracesTotNm0(totTraceCnt, 0);
695 Array<OneD, int> TracesTotNm1(totTraceCnt, 0);
696 Array<OneD, int> TracesTotPnts0(totTraceCnt, 0);
697 Array<OneD, int> TracesTotPnts1(totTraceCnt, 0);
698 Array<OneD, int> TracesPointsType0(totTraceCnt, 0);
699 Array<OneD, int> TracesPointsType1(totTraceCnt, 0);
710 int cntr = tTotOffsets[tracepr];
712 for (i = 0; i < locexp.size(); ++i)
714 if ((exp2D = locexp[i]->as<LocalRegions::Expansion2D>()))
717 int nedges = locexp[i]->GetNtraces();
719 for (j = 0; j < nedges; ++j, ++cntr)
721 LibUtilities::BasisKey bkeyEdge =
722 locexp[i]->GetTraceBasisKey(j);
723 TracesTotID[cntr] = exp2D->GetGeom2D()->GetEid(j);
724 TracesTotNm0[cntr] = bkeyEdge.GetNumModes();
725 TracesTotPnts0[cntr] = bkeyEdge.GetNumPoints();
726 TracesPointsType0[cntr] =
727 static_cast<int>(bkeyEdge.GetPointsType());
732 else if ((exp3D = locexp[i]->as<LocalRegions::Expansion3D>()))
734 int nfaces = locexp[i]->GetNtraces();
736 for (j = 0; j < nfaces; ++j, ++cntr)
738 LibUtilities::BasisKey face_dir0 =
739 locexp[i]->GetTraceBasisKey(j, 0);
740 LibUtilities::BasisKey face_dir1 =
741 locexp[i]->GetTraceBasisKey(j, 1);
746 if (locexp[i]->GetTraceOrient(j) >= 9)
748 std::swap(face_dir0, face_dir1);
751 TracesTotID[cntr] = exp3D->GetGeom3D()->GetFid(j);
752 TracesTotNm0[cntr] = face_dir0.GetNumModes();
753 TracesTotNm1[cntr] = face_dir1.GetNumModes();
754 TracesTotPnts0[cntr] = face_dir0.GetNumPoints();
755 TracesTotPnts1[cntr] = face_dir1.GetNumPoints();
756 TracesPointsType0[cntr] =
757 static_cast<int>(face_dir0.GetPointsType());
758 TracesPointsType1[cntr] =
759 static_cast<int>(face_dir1.GetPointsType());
766 m_comm->GetRowComm()->AllReduce(TracesTotPnts0,
768 m_comm->GetRowComm()->AllReduce(TracesPointsType0,
772 m_comm->GetRowComm()->AllReduce(TracesTotNm1,
774 m_comm->GetRowComm()->AllReduce(TracesTotPnts1,
776 m_comm->GetRowComm()->AllReduce(TracesPointsType1,
784 if (edgeOrders.size())
786 for (i = 0; i < totTraceCnt; ++i)
788 auto it = edgeOrders.find(TracesTotID[i]);
790 if (it == edgeOrders.end())
795 LibUtilities::BasisKey existing = it->second.second;
797 int np1 = TracesTotPnts0[i];
798 int np2 = existing.GetNumPoints();
799 int nm1 = TracesTotNm0[i];
800 int nm2 = existing.GetNumModes();
804 if (np2 >= np1 && nm2 >= nm1)
808 else if (np2 <= np1 && nm2 <= nm1)
812 LibUtilities::BasisKey newbkey(
813 existing.GetBasisType(), nm1,
814 LibUtilities::PointsKey(np1, existing.GetPointsType()));
815 it->second.second = newbkey;
820 "inappropriate number of points/modes (max "
821 "num of points is not set with max order)");
825 else if (faceOrders.size())
827 for (i = 0; i < totTraceCnt; ++i)
829 auto it = faceOrders.find(TracesTotID[i]);
831 if (it == faceOrders.end())
836 LibUtilities::BasisKey existing0 = it->second.second.first;
837 LibUtilities::BasisKey existing1 = it->second.second.second;
841 int np11 = TracesTotPnts0[i];
842 int np12 = TracesTotPnts1[i];
843 int np21 = existing0.GetNumPoints();
844 int np22 = existing1.GetNumPoints();
845 int nm11 = TracesTotNm0[i];
846 int nm12 = TracesTotNm1[i];
847 int nm21 = existing0.GetNumModes();
848 int nm22 = existing1.GetNumModes();
853 if (existing1.GetPointsType() ==
854 LibUtilities::eGaussRadauMAlpha1Beta0)
857 TracesPointsType1[i]) ==
866 TracesPointsType1[i]) ==
867 LibUtilities::eGaussRadauMAlpha1Beta0)
873 if (existing0.GetPointsType() ==
874 LibUtilities::eGaussRadauMAlpha1Beta0)
877 TracesPointsType0[i]) ==
886 TracesPointsType0[i]) ==
887 LibUtilities::eGaussRadauMAlpha1Beta0)
896 if (np22 >= np12 && nm22 >= nm12)
900 else if (np22 <= np12 && nm22 <= nm12)
902 LibUtilities::BasisKey newbkey(
903 existing1.GetBasisType(), nm12,
904 LibUtilities::PointsKey(np12,
905 existing1.GetPointsType()));
906 it->second.second.second = newbkey;
911 "inappropriate number of points/modes (max "
912 "num of points is not set with max order)");
915 if (np21 >= np11 && nm21 >= nm11)
919 else if (np21 <= np11 && nm21 <= nm11)
921 LibUtilities::BasisKey newbkey(
922 existing0.GetBasisType(), nm11,
923 LibUtilities::PointsKey(np11,
924 existing0.GetPointsType()));
925 it->second.second.first = newbkey;
930 "inappropriate number of points/modes (max"
931 "num of points is not set with max order)");
937 if (edgeOrders.size())
939 for (
auto &it : edgeOrders)
942 it.second.second, it.second.first);
943 exp->SetElmtId(elmtid++);
944 (*m_exp).push_back(exp);
949 for (
auto &it : faceOrders)
951 FaceGeom = it.second.first;
953 if ((QuadGeom = std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
957 it.second.second.first, it.second.second.second, QuadGeom);
960 std::dynamic_pointer_cast<SpatialDomains::TriGeom>(
964 it.second.second.first, it.second.second.second, TriGeom);
966 exp->SetElmtId(elmtid++);
967 (*m_exp).push_back(exp);
984 for (
int i = (*m_exp).size() - 1; i >= 0; --i)
1006 const bool DeclareCoeffPhysArrays,
const std::string variable,
1008 : m_comm(pSession->GetComm()), m_session(pSession), m_graph(graph),
1014 boost::ignore_unused(variable, ImpType);
1015 int i, j, elmtid = 0;
1030 for (i = 0; i < locexp.size(); ++i)
1032 if ((exp1D = std::dynamic_pointer_cast<LocalRegions::Expansion1D>(
1037 for (j = 0; j < 2; ++j)
1039 PointGeom = (exp1D->GetGeom1D())->GetVertex(j);
1043 exp->SetElmtId(elmtid++);
1044 (*m_exp).push_back(exp);
1047 else if ((exp2D = std::dynamic_pointer_cast<LocalRegions::Expansion2D>(
1052 locexp[i]->GetBasis(0)->GetBasisKey();
1054 for (j = 0; j < locexp[i]->GetNtraces(); ++j)
1056 segGeom = exp2D->GetGeom2D()->GetEdge(j);
1058 int dir = exp2D->GetGeom2D()->GetDir(j);
1060 if (locexp[i]->GetNtraces() == 3)
1063 locexp[i]->GetBasis(dir)->GetBasisKey();
1077 locexp[i]->GetBasis(dir)->GetBasisKey(), segGeom);
1080 exp->SetElmtId(elmtid++);
1081 (*m_exp).push_back(exp);
1084 else if ((exp3D = dynamic_pointer_cast<LocalRegions::Expansion3D>(
1090 locexp[i]->GetBasis(0)->GetBasisKey();
1092 locexp[i]->GetBasis(1)->GetBasisKey();
1094 for (j = 0; j < exp3D->GetNtraces(); ++j)
1096 FaceGeom = exp3D->GetGeom3D()->GetFace(j);
1098 int dir0 = exp3D->GetGeom3D()->GetDir(j, 0);
1099 int dir1 = exp3D->GetGeom3D()->GetDir(j, 1);
1102 locexp[i]->GetBasis(dir0)->GetBasisKey();
1104 locexp[i]->GetBasis(dir1)->GetBasisKey();
1107 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1112 face_dir0, face_dir1, QuadGeom);
1114 else if ((TriGeom = std::dynamic_pointer_cast<
1126 nface_dir0, nface_dir1, TriGeom);
1128 exp->SetElmtId(elmtid++);
1129 (*m_exp).push_back(exp);
1169 const bool DeclareCoeffPhysArrays,
const std::string variable,
1170 bool SetToOneSpaceDimension,
1173 : m_comm(comm), m_session(pSession), m_graph(graph), m_physState(false),
1188 int meshdim = graph->GetMeshDimension();
1192 graph->GetExpansionInfo(variable);
1196 for (
auto &compIt : domain)
1199 for (j = 0; j < compIt.second->m_geomVec.size(); ++j)
1201 if ((PtGeom = std::dynamic_pointer_cast<SpatialDomains::PointGeom>(
1202 compIt.second->m_geomVec[j])))
1210 std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1211 compIt.second->m_geomVec[j])))
1221 auto expIt = expansions.find(SegGeom->GetGlobalID());
1222 ASSERTL0(expIt != expansions.end(),
1223 "Failed to find basis key");
1224 bkey = expIt->second->m_basisKeyVector[0];
1230 graph->GetElementsFromEdge(SegGeom);
1236 int edge_id = elmts->at(0).second;
1238 graph->GetExpansionInfo(geom, variable);
1248 else if (geom->GetShapeType() ==
1257 "Fail to cast geom to a known 2D shape.");
1261 bkey = elmtStdExp->GetTraceBasisKey(edge_id);
1264 if (SetToOneSpaceDimension)
1267 SegGeom->GenerateOneSpaceDimGeom();
1271 bkey, OneDSegmentGeom);
1282 std::dynamic_pointer_cast<SpatialDomains::TriGeom>(
1283 compIt.second->m_geomVec[j])))
1289 graph->GetElementsFromFace(TriGeom);
1294 int face_id = elmts->at(0).second;
1296 graph->GetExpansionInfo(geom, variable);
1322 "Fail to cast geom to a known 3D shape.");
1327 elmtStdExp->GetTraceBasisKey(face_id, 0);
1329 elmtStdExp->GetTraceBasisKey(face_id, 1);
1331 if (geom->GetForient(face_id) >= 9)
1333 std::swap(TriBa, TriBb);
1336 if (graph->GetExpansionInfo()
1338 ->second->m_basisKeyVector[0]
1354 TriBa, TriBb, TriGeom);
1357 else if ((QuadGeom =
1358 std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1359 compIt.second->m_geomVec[j])))
1365 graph->GetElementsFromFace(QuadGeom);
1370 int face_id = elmts->at(0).second;
1372 graph->GetExpansionInfo(geom, variable);
1398 "Fail to cast geom to a known 3D shape.");
1403 elmtStdExp->GetTraceBasisKey(face_id, 0);
1405 elmtStdExp->GetTraceBasisKey(face_id, 1);
1407 if (geom->GetForient(face_id) >= 9)
1409 std::swap(QuadBa, QuadBb);
1413 QuadBa, QuadBb, QuadGeom);
1418 "dynamic cast to a Geom (possibly 3D) failed");
1421 exp->SetElmtId(elmtid++);
1422 (*m_exp).push_back(exp);
1457 for (i = 0; i <
m_exp->size(); ++i)
1462 m_npoints += (*m_exp)[i]->GetTotPoints();
1466 if (DeclareCoeffPhysArrays)
1474 for (
int i = 0; i <
m_exp->size(); ++i)
1478 int loccoeffs = (*m_exp)[i]->GetNcoeffs();
1480 for (
int j = 0; j < loccoeffs; ++j)
1505 for (
auto &expIt : expmap)
1509 switch (expInfo->m_basisKeyVector.size())
1514 "Cannot mix expansion dimensions in one vector");
1518 std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1519 expInfo->m_geomShPtr)))
1531 "dynamic cast to a 1D Geom failed");
1538 "Cannot mix expansion dimensions in one vector");
1545 std::dynamic_pointer_cast<SpatialDomains ::TriGeom>(
1546 expInfo->m_geomShPtr)))
1567 else if ((QuadrilateralGeom = std::dynamic_pointer_cast<
1572 Ba, Bb, QuadrilateralGeom);
1577 "dynamic cast to a 2D Geom failed");
1584 "Cannot mix expansion dimensions in one vector");
1592 std::dynamic_pointer_cast<SpatialDomains::TetGeom>(
1593 expInfo->m_geomShPtr)))
1600 "LocalRegions::NodalTetExp is not implemented "
1610 else if ((PrismGeom = std::dynamic_pointer_cast<
1611 SpatialDomains ::PrismGeom>(
1612 expInfo->m_geomShPtr)))
1618 else if ((PyrGeom = std::dynamic_pointer_cast<
1624 Ba, Bb, Bc, PyrGeom);
1626 else if ((HexGeom = std::dynamic_pointer_cast<
1631 Ba, Bb, Bc, HexGeom);
1636 "dynamic cast to a Geom failed");
1642 "Dimension of basis key is greater than 3");
1646 exp->SetElmtId(
id++);
1649 (*m_exp).push_back(exp);
1679 int nrows = blockmat->GetRows();
1680 int ncols = blockmat->GetColumns();
1687 out = (*blockmat) * in;
1699 for (
int i = 0; i < (*m_exp).size(); ++i)
1701 (*m_exp)[i]->MultiplyByQuadratureMetric(inarray +
m_phys_offset[i],
1702 e_outarray = outarray +
1716 for (
int i = 0; i < (*m_exp).size(); ++i)
1718 (*m_exp)[i]->DivideByQuadratureMetric(inarray +
m_phys_offset[i],
1745 for (i = 0; i < (*m_exp).size(); ++i)
1747 (*m_exp)[i]->IProductWRTDerivBase(dir, inarray +
m_phys_offset[i],
1763 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
1764 int nq = direction.size() / coordim;
1771 for (
int i = 0; i < (*m_exp).size(); ++i)
1773 npts_e = (*m_exp)[i]->GetTotPoints();
1776 for (
int k = 0; k < coordim; ++k)
1779 &locdir[k * npts_e], 1);
1782 (*m_exp)[i]->IProductWRTDirectionalDerivBase(
1807 ASSERTL1(inarray.size() >= dim,
"inarray is not of sufficient dimension");
1926 e_out_d0 = out_d0 + offset;
1927 e_out_d1 = out_d1 + offset;
1928 e_out_d2 = out_d2 + offset;
1931 inarray + offset, e_out_d0, e_out_d1,
1955 for (i = 0; i < (*m_exp).size(); ++i)
1958 (*m_exp)[i]->PhysDeriv_s(inarray +
m_phys_offset[i], e_out_ds);
1964 for (i = 0; i < (*m_exp).size(); i++)
1967 (*m_exp)[i]->PhysDeriv_n(inarray +
m_phys_offset[i], e_out_dn);
1984 int intdir = (int)edir;
1990 e_out_d = out_d + offset;
1993 inarray + offset, e_out_d);
2038 ASSERTL0(0,
"Dimension not supported by ExpList::Curl");
2059 bool halfMode =
false;
2062 m_session->MatchSolverInfo(
"ModeType",
"HalfMode", halfMode,
false);
2114 ASSERTL0(0,
"Dimension not supported");
2125 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
2126 int nq = direction.size() / coordim;
2132 for (
int i = 0; i < (*m_exp).size(); ++i)
2134 npts_e = (*m_exp)[i]->GetTotPoints();
2137 for (
int k = 0; k < coordim; ++k)
2140 &locdir[k * npts_e], 1);
2143 (*m_exp)[i]->PhysDirectionalDeriv(inarray +
m_phys_offset[i], locdir,
2155 for (
int i = 0; i < (*m_exp).size(); ++i)
2157 (*m_exp)[i]->ExponentialFilter(e_array = array +
m_phys_offset[i],
2158 alpha, exponent, cutoff);
2178 if (inarray.get() == outarray.get())
2181 out = (*InvMass) * in;
2186 out = (*InvMass) * in;
2225 for (i = 0; i < (*m_exp).size(); ++i)
2227 (*m_exp)[i]->FwdTransBndConstrained(inarray +
m_phys_offset[i],
2242 boost::ignore_unused(field);
2255 "Smoothing is currently not allowed unless you are using "
2256 "a nodal base for efficiency reasons. The implemented "
2257 "smoothing technique requires the mass matrix inversion "
2258 "which is trivial just for GLL_LAGRANGE_SEM and "
2259 "GAUSS_LAGRANGE_SEMexpansions.");
2287 map<int, int> elmt_id;
2292 for (i = 0; i < (*m_exp).size(); ++i)
2296 elmt_id[n_exp++] = i;
2302 n_exp = (*m_exp).size();
2303 for (i = 0; i < n_exp; ++i)
2317 for (i = 0; i < n_exp; ++i)
2319 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
2320 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2327 for (i = 0; i < n_exp; ++i)
2329 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2330 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
2341 for (i = 0; i < n_exp; ++i)
2343 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2344 ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2352 for (i = 0; i < n_exp; ++i)
2354 nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
2356 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2363 for (i = 0; i < n_exp; ++i)
2366 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2368 (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
2375 "Global Matrix creation not defined for this "
2388 for (i = cnt1 = 0; i < n_exp; ++i)
2399 (*
m_exp)[i]->GetTotPoints());
2406 loc_mat = std::dynamic_pointer_cast<LocalRegions::Expansion>(
2407 (*
m_exp)[elmt_id.find(i)->second])
2408 ->GetLocMatrix(matkey);
2409 BlkMatrix->SetBlock(i, i, loc_mat);
2426 return matrixIter->second;
2499 for (
int i = 0; i < (*m_exp).size(); ++i)
2509 (*
m_exp)[i]->GetTotPoints());
2516 (*m_exp)[i]->GeneralMatrixOp(
2533 int i, j, n, gid1, gid2, cntdim1, cntdim2;
2537 unsigned int glob_rows = 0;
2538 unsigned int glob_cols = 0;
2539 unsigned int loc_rows = 0;
2540 unsigned int loc_cols = 0;
2542 bool assembleFirstDim =
false;
2543 bool assembleSecondDim =
false;
2550 glob_cols = locToGloMap->GetNumGlobalCoeffs();
2552 assembleFirstDim =
false;
2553 assembleSecondDim =
true;
2558 glob_rows = locToGloMap->GetNumGlobalCoeffs();
2561 assembleFirstDim =
true;
2562 assembleSecondDim =
false;
2570 glob_rows = locToGloMap->GetNumGlobalCoeffs();
2571 glob_cols = locToGloMap->GetNumGlobalCoeffs();
2573 assembleFirstDim =
true;
2574 assembleSecondDim =
true;
2580 "Global Matrix creation not defined for this "
2592 for (n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
2603 (*
m_exp)[eid]->GetTotPoints());
2611 std::dynamic_pointer_cast<LocalRegions::Expansion>((*
m_exp)[n])
2612 ->GetLocMatrix(matkey);
2614 loc_rows = loc_mat->GetRows();
2615 loc_cols = loc_mat->GetColumns();
2617 for (i = 0; i < loc_rows; ++i)
2619 if (assembleFirstDim)
2621 gid1 = locToGloMap->GetLocalToGlobalMap(cntdim1 + i);
2622 sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
2630 for (j = 0; j < loc_cols; ++j)
2632 if (assembleSecondDim)
2634 gid2 = locToGloMap->GetLocalToGlobalMap(cntdim2 + j);
2635 sign2 = locToGloMap->GetLocalToGlobalSign(cntdim2 + j);
2644 coord = make_pair(gid1, gid2);
2645 if (spcoomat.count(coord) == 0)
2647 spcoomat[coord] = sign1 * sign2 * (*loc_mat)(i, j);
2651 spcoomat[coord] += sign1 * sign2 * (*loc_mat)(i, j);
2655 cntdim1 += loc_rows;
2656 cntdim2 += loc_cols;
2660 glob_cols, spcoomat);
2666 int i, j, n, gid1, gid2, loc_lda, eid;
2670 int totDofs = locToGloMap->GetNumGlobalCoeffs();
2671 int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
2673 unsigned int rows = totDofs - NumDirBCs;
2674 unsigned int cols = totDofs - NumDirBCs;
2678 int bwidth = locToGloMap->GetFullSystemBandWidth();
2690 if ((2 * (bwidth + 1)) < rows)
2694 rows, cols, zero, matStorage, bwidth, bwidth);
2700 rows, cols, zero, matStorage);
2709 rows, cols, zero, matStorage);
2714 for (n = 0; n < (*m_exp).size(); ++n)
2725 (*
m_exp)[eid]->GetTotPoints());
2733 std::dynamic_pointer_cast<LocalRegions::Expansion>((*
m_exp)[n])
2734 ->GetLocMatrix(matkey);
2741 int rows = loc_mat->GetRows();
2742 int cols = loc_mat->GetColumns();
2743 const NekDouble *dat = loc_mat->GetRawPtr();
2746 Blas::Dscal(rows * cols, loc_mat->Scale(), new_mat->GetRawPtr(), 1);
2751 (*m_exp)[n]->AddRobinMassMatrix(
2752 rBC->m_robinID, rBC->m_robinPrimitiveCoeffs, new_mat);
2761 loc_lda = loc_mat->GetColumns();
2763 for (i = 0; i < loc_lda; ++i)
2767 sign1 = locToGloMap->GetLocalToGlobalSign(
m_coeff_offset[n] + i);
2770 for (j = 0; j < loc_lda; ++j)
2775 sign2 = locToGloMap->GetLocalToGlobalSign(
2783 if ((matStorage ==
eFULL) || (gid2 >= gid1))
2785 value = Gmat->GetValue(gid1, gid2) +
2786 sign1 * sign2 * (*loc_mat)(i, j);
2787 Gmat->SetValue(gid1, gid2, value);
2837 const map<int, RobinBCInfoSharedPtr> vRobinBCInfo =
GetRobinBCInfo();
2921 NekDouble tol,
bool returnNearestElmt,
int cachedId,
2926 return GetExpIndex(gloCoord, Lcoords, tol, returnNearestElmt, cachedId,
2932 bool returnNearestElmt,
int cachedId,
2945 for (
int i = (*m_exp).size() - 1; i >= 0; --i)
2956 if (cachedId >= 0 && cachedId < (*m_exp).size())
2959 if ((*
m_exp)[cachedId]->GetGeom()->ContainsPoint(gloCoords, locCoords,
2964 else if (returnNearestElmt && (nearpt < nearpt_min))
2969 nearpt_min = nearpt;
2970 Vmath::Vcopy(locCoords.size(), locCoords, 1, savLocCoords, 1);
2974 NekDouble x = (gloCoords.size() > 0 ? gloCoords[0] : 0.0);
2975 NekDouble y = (gloCoords.size() > 1 ? gloCoords[1] : 0.0);
2976 NekDouble z = (gloCoords.size() > 2 ? gloCoords[2] : 0.0);
2983 std::vector<int> elmts =
m_graph->GetElementsContainingPoint(
p);
2986 for (
int i = 0; i < elmts.size(); ++i)
2993 if ((*
m_exp)[
id]->GetGeom()->ContainsPoint(gloCoords, locCoords, tol,
2998 else if (returnNearestElmt && (nearpt < nearpt_min))
3003 nearpt_min = nearpt;
3004 Vmath::Vcopy(locCoords.size(), locCoords, 1, savLocCoords, 1);
3010 if (returnNearestElmt && nearpt_min <= maxDistance)
3014 "Failed to find point within element to "
3016 boost::lexical_cast<std::string>(tol) +
" using local point (" +
3017 boost::lexical_cast<std::string>(locCoords[0]) +
"," +
3018 boost::lexical_cast<std::string>(locCoords[1]) +
"," +
3019 boost::lexical_cast<std::string>(locCoords[1]) +
3020 ") in element: " + boost::lexical_cast<std::string>(min_id);
3023 Vmath::Vcopy(locCoords.size(), savLocCoords, 1, locCoords, 1);
3040 ASSERTL0(dim == coords.size(),
"Invalid coordinate dimension.");
3045 ASSERTL0(elmtIdx > 0,
"Unable to find element containing point.");
3051 return (*
m_exp)[elmtIdx]->StdPhysEvaluate(xi, elmtPhys);
3080 for (
int i = 0; i <
m_exp->size(); ++i)
3082 (*m_exp)[i]->GetGeom()->Reset(
m_graph->GetCurvedEdges(),
3087 for (
int i = 0; i <
m_exp->size(); ++i)
3089 (*m_exp)[i]->Reset();
3105 int coordim =
GetExp(0)->GetCoordim();
3106 char vars[3] = {
'x',
'y',
'z'};
3117 outfile <<
"Variables = x";
3118 for (
int i = 1; i < coordim; ++i)
3120 outfile <<
", " << vars[i];
3125 outfile <<
", " << var;
3128 outfile << std::endl << std::endl;
3141 int nBases = (*m_exp)[0]->GetNumBases();
3146 if (expansion == -1)
3154 GetCoords(coords[0], coords[1], coords[2]);
3156 for (i = 0; i <
m_exp->size(); ++i)
3160 for (j = 0; j < nBases; ++j)
3162 numInt *= (*m_exp)[i]->GetNumPoints(j) - 1;
3165 numBlocks += numInt;
3170 nPoints = (*m_exp)[expansion]->GetTotPoints();
3176 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
3179 for (j = 0; j < nBases; ++j)
3181 numBlocks *= (*m_exp)[expansion]->GetNumPoints(j) - 1;
3189 int nPlanes =
GetZIDs().size();
3190 NekDouble tmp = numBlocks * (nPlanes - 1.0) / nPlanes;
3191 numBlocks = (int)tmp;
3199 outfile <<
"Zone, N=" << nPoints <<
", E=" << numBlocks <<
", F=FEBlock";
3204 outfile <<
", ET=QUADRILATERAL" << std::endl;
3207 outfile <<
", ET=BRICK" << std::endl;
3215 for (j = 0; j < coordim; ++j)
3217 for (i = 0; i < nPoints; ++i)
3219 outfile << coords[j][i] <<
" ";
3220 if (i % 1000 == 0 && i)
3222 outfile << std::endl;
3225 outfile << std::endl;
3232 int nbase = (*m_exp)[0]->GetNumBases();
3235 std::shared_ptr<LocalRegions::ExpansionVector> exp =
m_exp;
3237 if (expansion != -1)
3239 exp = std::shared_ptr<LocalRegions::ExpansionVector>(
3241 (*exp)[0] = (*m_exp)[expansion];
3246 for (i = 0; i < (*exp).size(); ++i)
3248 const int np0 = (*exp)[i]->GetNumPoints(0);
3249 const int np1 = (*exp)[i]->GetNumPoints(1);
3251 for (j = 1; j < np1; ++j)
3253 for (k = 1; k < np0; ++k)
3255 outfile << cnt + (j - 1) * np0 + k <<
" ";
3256 outfile << cnt + (j - 1) * np0 + k + 1 <<
" ";
3257 outfile << cnt + j * np0 + k + 1 <<
" ";
3258 outfile << cnt + j * np0 + k << endl;
3265 else if (nbase == 3)
3267 for (i = 0; i < (*exp).size(); ++i)
3269 const int np0 = (*exp)[i]->GetNumPoints(0);
3270 const int np1 = (*exp)[i]->GetNumPoints(1);
3271 const int np2 = (*exp)[i]->GetNumPoints(2);
3272 const int np01 = np0 * np1;
3274 for (j = 1; j < np2; ++j)
3276 for (k = 1; k < np1; ++k)
3278 for (l = 1; l < np0; ++l)
3280 outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l
3282 outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l + 1
3284 outfile << cnt + (j - 1) * np01 + k * np0 + l + 1
3286 outfile << cnt + (j - 1) * np01 + k * np0 + l <<
" ";
3287 outfile << cnt + j * np01 + (k - 1) * np0 + l <<
" ";
3288 outfile << cnt + j * np01 + (k - 1) * np0 + l + 1
3290 outfile << cnt + j * np01 + k * np0 + l + 1 <<
" ";
3291 outfile << cnt + j * np01 + k * np0 + l << endl;
3295 cnt += np0 * np1 * np2;
3311 if (expansion == -1)
3319 for (
int i = 0; i < totpoints; ++i)
3321 outfile <<
m_phys[i] <<
" ";
3322 if (i % 1000 == 0 && i)
3324 outfile << std::endl;
3327 outfile << std::endl;
3331 int nPoints = (*m_exp)[expansion]->GetTotPoints();
3333 for (
int i = 0; i < nPoints; ++i)
3338 outfile << std::endl;
3344 outfile <<
"<?xml version=\"1.0\"?>" << endl;
3345 outfile <<
"<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
3346 <<
"byte_order=\"LittleEndian\">" << endl;
3347 outfile <<
" <UnstructuredGrid>" << endl;
3352 outfile <<
" </UnstructuredGrid>" << endl;
3353 outfile <<
"</VTKFile>" << endl;
3359 boost::ignore_unused(istrip);
3361 int nbase = (*m_exp)[expansion]->GetNumBases();
3362 int ntot = (*m_exp)[expansion]->GetTotPoints();
3366 for (i = 0; i < nbase; ++i)
3368 nquad[i] = (*m_exp)[expansion]->GetNumPoints(i);
3369 ntotminus *= (nquad[i] - 1);
3376 (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
3378 outfile <<
" <Piece NumberOfPoints=\"" << ntot <<
"\" NumberOfCells=\""
3379 << ntotminus <<
"\">" << endl;
3380 outfile <<
" <Points>" << endl;
3381 outfile <<
" <DataArray type=\"Float64\" "
3382 <<
"NumberOfComponents=\"3\" format=\"ascii\">" << endl;
3384 for (i = 0; i < ntot; ++i)
3386 for (j = 0; j < 3; ++j)
3388 outfile << setprecision(8) << scientific << (float)coords[j][i]
3394 outfile <<
" </DataArray>" << endl;
3395 outfile <<
" </Points>" << endl;
3396 outfile <<
" <Cells>" << endl;
3397 outfile <<
" <DataArray type=\"Int32\" "
3398 <<
"Name=\"connectivity\" format=\"ascii\">" << endl;
3408 for (i = 0; i < nquad[0] - 1; ++i)
3410 outfile << i <<
" " << i + 1 << endl;
3418 for (i = 0; i < nquad[0] - 1; ++i)
3420 for (j = 0; j < nquad[1] - 1; ++j)
3422 outfile << j * nquad[0] + i <<
" " << j * nquad[0] + i + 1
3423 <<
" " << (j + 1) * nquad[0] + i + 1 <<
" "
3424 << (j + 1) * nquad[0] + i << endl;
3433 for (i = 0; i < nquad[0] - 1; ++i)
3435 for (j = 0; j < nquad[1] - 1; ++j)
3437 for (k = 0; k < nquad[2] - 1; ++k)
3440 << k * nquad[0] * nquad[1] + j * nquad[0] + i <<
" "
3441 << k * nquad[0] * nquad[1] + j * nquad[0] + i + 1
3443 << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] +
3446 << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] + i
3448 << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] + i
3450 << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] +
3453 << (k + 1) * nquad[0] * nquad[1] +
3454 (j + 1) * nquad[0] + i + 1
3456 << (k + 1) * nquad[0] * nquad[1] +
3457 (j + 1) * nquad[0] + i
3469 outfile <<
" </DataArray>" << endl;
3470 outfile <<
" <DataArray type=\"Int32\" "
3471 <<
"Name=\"offsets\" format=\"ascii\">" << endl;
3472 for (i = 0; i < ntotminus; ++i)
3474 outfile << i * ns + ns <<
" ";
3477 outfile <<
" </DataArray>" << endl;
3478 outfile <<
" <DataArray type=\"UInt8\" "
3479 <<
"Name=\"types\" format=\"ascii\">" << endl;
3480 for (i = 0; i < ntotminus; ++i)
3485 outfile <<
" </DataArray>" << endl;
3486 outfile <<
" </Cells>" << endl;
3487 outfile <<
" <PointData>" << endl;
3492 boost::ignore_unused(expansion);
3493 outfile <<
" </PointData>" << endl;
3494 outfile <<
" </Piece>" << endl;
3501 int nq = (*m_exp)[expansion]->GetTotPoints();
3504 outfile <<
" <DataArray type=\"Float64\" Name=\"" << var <<
"\">"
3510 for (i = 0; i < nq; ++i)
3516 outfile <<
" </DataArray>" << endl;
3550 err = max(err,
abs(inarray[i] - soln[i]));
3583 for (i = 0; i < (*m_exp).size(); ++i)
3586 err += errl2 * errl2;
3591 for (i = 0; i < (*m_exp).size(); ++i)
3595 err += errl2 * errl2;
3625 for (i = 0; i < (*m_exp).size(); ++i)
3641 for (i = 0; i < (*m_exp).size(); ++i)
3644 for (j = 0; j < inarray.size(); ++j)
3648 flux += (*m_exp)[i]->VectorFlux(tmp);
3657 "This method is not defined or valid for this class type");
3665 "This method is not defined or valid for this class type");
3673 "This method is not defined or valid for this class type");
3680 boost::ignore_unused(lhom);
3682 "This method is not defined or valid for this class type");
3688 "This method is not defined or valid for this class type");
3696 "This method is not defined or valid for this class type");
3704 "ClearGlobalLinSysManager not implemented for ExpList.");
3709 boost::ignore_unused(poolName);
3716 boost::ignore_unused(key, clearLocalMatrices);
3718 "UnsetGlobalLinSys not implemented for ExpList.");
3725 "GetGlobalLinSysManager not implemented for ExpList.");
3731 const std::string &varName,
3734 string varString = fileName.substr(0, fileName.find_last_of(
"."));
3735 int j, k, len = varString.length();
3736 varString = varString.substr(len - 1, len);
3738 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
3739 std::vector<std::vector<NekDouble>> FieldData;
3744 ft, comm,
m_session->GetSharedFilesystem());
3746 f->Import(fileName, FieldDef, FieldData);
3749 for (j = 0; j < FieldDef.size(); ++j)
3751 for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
3753 if (FieldDef[j]->m_fields[k] == varName)
3757 FieldDef[j]->m_fields[k], coeffs);
3763 ASSERTL0(found,
"Could not find variable '" + varName +
3764 "' in file boundary condition " + fileName);
3790 for (i = 0; i < (*m_exp).size(); ++i)
3794 err += errh1 * errh1;
3803 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef,
3805 std::vector<NekDouble> &HomoLen,
bool homoStrips,
3806 std::vector<unsigned int> &HomoSIDs, std::vector<unsigned int> &HomoZIDs,
3807 std::vector<unsigned int> &HomoYIDs)
3814 ASSERTL1(NumHomoDir == HomoBasis.size(),
3815 "Homogeneous basis is not the same length as NumHomoDir");
3816 ASSERTL1(NumHomoDir == HomoLen.size(),
3817 "Homogeneous length vector is not the same length as NumHomDir");
3836 for (s = startenum; s <= endenum; ++s)
3838 std::vector<unsigned int> elementIDs;
3839 std::vector<LibUtilities::BasisType> basis;
3840 std::vector<unsigned int> numModes;
3841 std::vector<std::string> fields;
3844 bool UniOrder =
true;
3849 for (
int i = 0; i < (*m_exp).size(); ++i)
3851 if ((*
m_exp)[i]->GetGeom()->GetShapeType() == shape)
3853 elementIDs.push_back((*
m_exp)[i]->GetGeom()->GetGlobalID());
3856 for (
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
3859 (*
m_exp)[i]->GetBasis(j)->GetBasisType());
3861 (*
m_exp)[i]->GetBasis(j)->GetNumModes());
3865 for (n = 0; n < NumHomoDir; ++n)
3867 basis.push_back(HomoBasis[n]->GetBasisType());
3868 numModes.push_back(HomoBasis[n]->GetNumModes());
3876 (*
m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
3877 "Routine is not set up for multiple bases definitions");
3879 for (
int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
3882 (*
m_exp)[i]->GetBasis(j)->GetNumModes());
3884 (*
m_exp)[i]->GetBasis(j)->GetNumModes())
3890 for (n = 0; n < NumHomoDir; ++n)
3892 numModes.push_back(HomoBasis[n]->GetNumModes());
3898 if (elementIDs.size() > 0)
3903 numModes, fields, NumHomoDir, HomoLen,
3904 homoStrips, HomoSIDs, HomoZIDs, HomoYIDs);
3905 fielddef.push_back(fdef);
3913std::vector<LibUtilities::FieldDefinitionsSharedPtr>
ExpList::
3916 std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
3922 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef)
3931 std::vector<NekDouble> &fielddata)
3945 map<int, int> ElmtID_to_ExpID;
3946 for (i = 0; i < (*m_exp).size(); ++i)
3948 ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
3951 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
3953 int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
3954 int datalen = (*m_exp)[eid]->GetNcoeffs();
3963 std::vector<NekDouble> &fielddata, std::string &field,
3970 const std::shared_ptr<ExpList> &fromExpList,
3987 std::vector<NekDouble> &fielddata, std::string &field,
3990 boost::ignore_unused(zIdToPlane);
3993 int modes_offset = 0;
3994 int datalen = fielddata.size() / fielddef->m_fields.size();
3997 for (i = 0; i < fielddef->m_fields.size(); ++i)
3999 if (fielddef->m_fields[i] == field)
4006 ASSERTL0(i != fielddef->m_fields.size(),
4007 "Field (" + field +
") not found in file.");
4014 for (i = (*m_exp).size() - 1; i >= 0; --i)
4020 for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
4024 if (fielddef->m_uniOrder ==
true)
4030 fielddef->m_shapeType, fielddef->m_numModes, modes_offset);
4032 const int elmtId = fielddef->m_elementIDs[i];
4038 modes_offset += (*m_exp)[0]->GetNumBases();
4042 expId = eIt->second;
4044 bool sameBasis =
true;
4045 for (
int j = 0; j < fielddef->m_basis.size(); ++j)
4047 if (fielddef->m_basis[j] != (*
m_exp)[expId]->GetBasisType(j))
4061 (*m_exp)[expId]->ExtractDataToCoeffs(
4062 &fielddata[offset], fielddef->m_numModes, modes_offset,
4067 modes_offset += (*m_exp)[0]->GetNumBases();
4074 const std::shared_ptr<ExpList> &fromExpList,
4081 for (i = 0; i < (*m_exp).size(); ++i)
4083 std::vector<unsigned int> nummodes;
4084 vector<LibUtilities::BasisType> basisTypes;
4085 for (
int j = 0; j < fromExpList->GetExp(i)->GetNumBases(); ++j)
4087 nummodes.push_back(fromExpList->GetExp(i)->GetBasisNumModes(j));
4088 basisTypes.push_back(fromExpList->GetExp(i)->GetBasisType(j));
4091 (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes, 0,
4095 offset += fromExpList->GetExp(i)->GetNcoeffs();
4105 size_t nTracePts = weightAver.size();
4107 for (
int i = 0; i < nTracePts; ++i)
4109 weightAver[i] = 0.5;
4110 weightJump[i] = 1.0;
4122 int nq = outarray[0].size() / MFdim;
4125 int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
4129 for (
int i = 0; i <
m_exp->size(); ++i)
4131 npts = (*m_exp)[i]->GetTotPoints();
4133 for (
int j = 0; j < MFdim * coordim; ++j)
4139 (*m_exp)[i]->GetMetricInfo()->GetMovingFrames(
4140 (*
m_exp)[i]->GetPointsKeys(), MMFdir, CircCentre, MFloc);
4143 for (
int j = 0; j < MFdim; ++j)
4145 for (
int k = 0; k < coordim; ++k)
4169 for (
int i = 0; i < (*m_exp).size(); ++i)
4171 npoints_e = (*m_exp)[i]->GetTotPoints();
4192 "This method is not defined or valid for this class type");
4199 boost::ignore_unused(i);
4201 "This method is not defined or valid for this class type");
4202 static std::shared_ptr<ExpList> result;
4225 int i, j, k, e_npoints, offset;
4233 "Input vector does not have sufficient dimensions to "
4237 for (i = 0; i <
m_exp->size(); ++i)
4240 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4241 normals = (*m_exp)[i]->GetPhysNormals();
4247 for (j = 0; j < e_npoints; ++j)
4251 for (k = 0; k < coordim; ++k)
4253 Vn += Vec[k][offset + j] * normals[k * e_npoints + j];
4259 Upwind[offset + j] = Fwd[offset + j];
4263 Upwind[offset + j] = Bwd[offset + j];
4271 "This method is not defined or valid for this class type");
4317 "This method is not defined or valid for this class type");
4318 static std::shared_ptr<ExpList> returnVal;
4325 "This method is not defined or valid for this class type");
4326 static std::shared_ptr<AssemblyMapDG> result;
4332 return GetTraceMap()->GetBndCondIDToGlobalTraceID();
4338 "This method is not defined or valid for this class type");
4339 static std::vector<bool> result;
4356 for (
int i = 0; i < nquad2; ++i)
4358 for (
int j = 0; j < nquad1; ++j)
4360 out[i * nquad1 + j] = in[j * nquad2 + i];
4366 for (
int i = 0; i < nquad2; ++i)
4368 for (
int j = 0; j < nquad1; ++j)
4370 out[i * nquad1 + j] = in[i * nquad1 + j];
4381 for (
int i = 0; i < nquad2; ++i)
4383 for (
int j = 0; j < nquad1 / 2; ++j)
4385 swap(out[i * nquad1 + j], out[i * nquad1 + nquad1 - j - 1]);
4396 for (
int j = 0; j < nquad1; ++j)
4398 for (
int i = 0; i < nquad2 / 2; ++i)
4400 swap(out[i * nquad1 + j], out[(nquad2 - i - 1) * nquad1 + j]);
4415 int i, j, k, e_npoints, offset;
4421 ASSERTL1(normals.size() >= coordim,
4422 "Output vector does not have sufficient dimensions to "
4430 for (i = 0; i <
m_exp->size(); ++i)
4435 loc_exp->GetLeftAdjacentElementExp();
4439 locnormals = loc_elmt->GetTraceNormal(
4440 loc_exp->GetLeftAdjacentElementTrace());
4446 for (j = 0; j < e_npoints; ++j)
4450 for (k = 0; k < coordim; ++k)
4452 normals[k][offset] = locnormals[k][0];
4464 for (i = 0; i <
m_exp->size(); ++i)
4469 loc_exp->GetLeftAdjacentElementExp();
4471 int edgeNumber = loc_exp->GetLeftAdjacentElementTrace();
4474 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4476 locnormals = loc_elmt->GetTraceNormal(edgeNumber);
4477 int e_nmodes = loc_exp->GetBasis(0)->GetNumModes();
4478 int loc_nmodes = loc_elmt->GetBasis(0)->GetNumModes();
4480 if (e_nmodes != loc_nmodes)
4482 if (loc_exp->GetRightAdjacentElementTrace() >= 0)
4485 loc_exp->GetRightAdjacentElementExp();
4488 loc_exp->GetRightAdjacentElementTrace();
4492 locnormals = loc_elmt->GetTraceNormal(EdgeNumber);
4497 for (j = 0; j < e_npoints; ++j)
4502 for (k = 0; k < coordim; ++k)
4504 normals[k][offset + j] = -locnormals[k][j];
4513 for (
int p = 0;
p < coordim; ++
p)
4517 loc_exp->GetBasis(0)->GetPointsKey();
4519 loc_elmt->GetBasis(0)->GetPointsKey();
4527 for (j = 0; j < e_npoints; ++j)
4531 for (k = 0; k < coordim; ++k)
4533 normals[k][offset + j] = normal[k][j];
4544 for (j = 0; j < e_npoints; ++j)
4548 for (k = 0; k < coordim; ++k)
4550 normals[k][offset + j] = locnormals[k][j];
4562 for (i = 0; i <
m_exp->size(); ++i)
4566 traceExp->GetLeftAdjacentElementExp();
4569 int faceNum = traceExp->GetLeftAdjacentElementTrace();
4573 exp3D->GetTraceNormal(faceNum);
4579 int fromid0, fromid1;
4593 exp3D->GetTraceBasisKey(faceNum, fromid0);
4595 exp3D->GetTraceBasisKey(faceNum, fromid1);
4597 traceExp->GetBasis(0)->GetBasisKey();
4599 traceExp->GetBasis(1)->GetBasisKey();
4605 exp3D->ReOrientTracePhysMap(orient, faceids, faceNq0, faceNq1);
4609 for (j = 0; j < coordim; ++j)
4611 Vmath::Scatr(faceNq0 * faceNq1, locNormals[j], faceids,
4617 traceBasis1.
GetPointsKey(), tmp = normals[j] + offset);
4625 "This method is not defined or valid for this class type");
4640 lengLR[0] = lengthsFwd;
4641 lengLR[1] = lengthsBwd;
4645 int e_npoints0 = -1;
4648 for (
int i = 0; i <
m_exp->size(); ++i)
4650 loc_exp = (*m_exp)[i];
4653 int e_nmodes = loc_exp->GetBasis(0)->GetNumModes();
4654 e_npoints = (*m_exp)[i]->GetNumPoints(0);
4655 if (e_npoints0 < e_npoints)
4657 for (
int nlr = 0; nlr < 2; nlr++)
4661 e_npoints0 = e_npoints;
4664 LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
4665 LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
4667 LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
4668 LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
4669 for (
int nlr = 0; nlr < 2; ++nlr)
4672 lengAdd[nlr] = lengintp[nlr];
4673 int bndNumber = LRbndnumbs[nlr];
4674 loc_elmt = LRelmts[nlr];
4677 locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
4678 lengAdd[nlr] = locLeng;
4680 int loc_nmodes = loc_elmt->GetBasis(0)->GetNumModes();
4681 if (e_nmodes != loc_nmodes)
4685 loc_exp->GetBasis(0)->GetPointsKey();
4687 loc_elmt->GetBasis(0)->GetPointsKey();
4690 lengAdd[nlr] = lengintp[nlr];
4694 for (
int j = 0; j < e_npoints; ++j)
4696 lengLR[nlr][offset + j] = lengAdd[nlr][j];
4703 for (
int i = 0; i <
m_exp->size(); ++i)
4705 loc_exp = (*m_exp)[i];
4709 loc_exp->GetBasis(0)->GetBasisKey();
4711 loc_exp->GetBasis(1)->GetBasisKey();
4714 e_npoints = TraceNq0 * TraceNq1;
4715 if (e_npoints0 < e_npoints)
4717 for (
int nlr = 0; nlr < 2; nlr++)
4721 e_npoints0 = e_npoints;
4724 LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
4725 LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
4727 LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
4728 LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
4729 for (
int nlr = 0; nlr < 2; ++nlr)
4732 int bndNumber = LRbndnumbs[nlr];
4733 loc_elmt = LRelmts[nlr];
4736 locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
4740 loc_elmt->GetTraceOrient(bndNumber);
4742 int fromid0, fromid1;
4755 loc_elmt->GetTraceBasisKey(bndNumber, fromid0);
4757 loc_elmt->GetTraceBasisKey(bndNumber, fromid1);
4762 AlignFace(orient, faceNq0, faceNq1, locLeng, alignedLeng);
4769 for (
int j = 0; j < e_npoints; ++j)
4771 lengLR[nlr][offset + j] = lengintp[nlr][j];
4782 boost::ignore_unused(Fx, Fy, outarray);
4784 "This method is not defined or valid for this class type");
4790 boost::ignore_unused(Fn, outarray);
4792 "This method is not defined or valid for this class type");
4799 boost::ignore_unused(Fwd, Bwd, outarray);
4801 "This method is not defined or valid for this class type");
4807 boost::ignore_unused(Fwd, Bwd);
4809 "This method is not defined or valid for this class type");
4815 bool PutFwdInBwdOnBCs,
bool DoExchange)
4817 boost::ignore_unused(field, Fwd, Bwd, FillBnd, PutFwdInBwdOnBCs,
4820 "This method is not defined or valid for this class type");
4825 bool PutFwdInBwdOnBCs)
4827 boost::ignore_unused(Fwd, Bwd, PutFwdInBwdOnBCs);
4829 "This method is not defined or valid for this class type");
4836 boost::ignore_unused(field, Fwd, Bwd);
4838 "v_AddTraceQuadPhysToField is not defined for this class type");
4845 boost::ignore_unused(field, Fwd, Bwd);
4847 "v_AddTraceQuadPhysToOffDiag is not defined for this class");
4855 boost::ignore_unused(Fwd, Bwd, locTraceFwd, locTraceBwd);
4857 "v_GetLocTraceFromTracePts is not defined for this class");
4863 "v_GetBndCondBwdWeight is not defined for this class type");
4870 boost::ignore_unused(index, value);
4872 "v_setBndCondBwdWeight is not defined for this class type");
4878 "This method is not defined or valid for this class type");
4879 static vector<bool> tmp;
4885 boost::ignore_unused(outarray);
4887 "This method is not defined or valid for this class type");
4893 boost::ignore_unused(inarray, outarray);
4895 "This method is not defined or valid for this class type");
4902 boost::ignore_unused(inarray, outarray);
4904 "This method is not defined or valid for this class type");
4914 boost::ignore_unused(inarray, outarray,
factors, varcoeff, varfactors,
4915 dirForcing, PhysSpaceForcing);
4927 boost::ignore_unused(inarray, outarray,
factors, varcoeff, varfactors,
4928 dirForcing, PhysSpaceForcing);
4930 "LinearAdvectionDiffusionReactionSolve not implemented.");
4940 boost::ignore_unused(velocity, inarray, outarray, lambda, dirForcing);
4942 "This method is not defined or valid for this class type");
4948 bool Shuff,
bool UnShuff)
4950 boost::ignore_unused(npts, inarray, outarray, Shuff, UnShuff);
4952 "This method is not defined or valid for this class type");
4958 bool Shuff,
bool UnShuff)
4960 boost::ignore_unused(npts, inarray, outarray, Shuff, UnShuff);
4962 "This method is not defined or valid for this class type");
4970 boost::ignore_unused(npts, inarray1, inarray2, outarray);
4972 "This method is not defined or valid for this class type");
4980 boost::ignore_unused(npts, inarray1, inarray2, outarray);
4982 "This method is not defined or valid for this class type");
4988 boost::ignore_unused(BndVals, TotField, BndID);
4990 "This method is not defined or valid for this class type");
4998 boost::ignore_unused(V1, V2, outarray, BndID);
5000 "This method is not defined or valid for this class type");
5013 (*m_exp)[i]->NormVectorIProductWRTBase(
5023 (*m_exp)[i]->NormVectorIProductWRTBase(
5033 (*m_exp)[i]->NormVectorIProductWRTBase(
5048 boost::ignore_unused(outarray);
5050 "This method is not defined or valid for this class type");
5057 boost::ignore_unused(coeffs);
5059 "This method is not defined or valid for this class type");
5067 boost::ignore_unused(nreg, coeffs);
5069 "This method is not defined or valid for this class type");
5074 boost::ignore_unused(useComm);
5076 "This method is not defined or valid for this class type");
5082 boost::ignore_unused(inarray, outarray, useComm);
5084 "This method is not defined or valid for this class type");
5090 "This method is not defined or valid for this class type");
5096 boost::ignore_unused(inarray, outarray);
5098 "This method is not defined or valid for this class type");
5169 for (i = 0; i < (*m_exp).size(); ++i)
5172 (*m_exp)[i]->GetCoords(e_coord_0);
5176 ASSERTL0(coord_1.size() != 0,
"output coord_1 is not defined");
5178 for (i = 0; i < (*m_exp).size(); ++i)
5182 (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1);
5186 ASSERTL0(coord_1.size() != 0,
"output coord_1 is not defined");
5187 ASSERTL0(coord_2.size() != 0,
"output coord_2 is not defined");
5189 for (i = 0; i < (*m_exp).size(); ++i)
5194 (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1, e_coord_2);
5204 (*m_exp)[eid]->GetCoords(xc0, xc1, xc2);
5214 for (
int i = 0; i <
m_exp->size(); ++i)
5216 for (
int j = 0; j < (*m_exp)[i]->GetNtraces(); ++j)
5218 (*m_exp)[i]->ComputeTraceNormal(j);
5226 const bool DeclareCoeffPhysArrays)
5228 boost::ignore_unused(i, result, DeclareCoeffPhysArrays);
5230 "This method is not defined or valid for this class type");
5251 for (cnt = n = 0; n < i; ++n)
5262 elmt =
GetExp(ElmtID[cnt + n]);
5263 elmt->GetTracePhysVals(
5265 tmp1 = element + offsetElmt, tmp2 = boundary + offsetBnd);
5267 offsetElmt += elmt->GetTotPoints();
5283 for (cnt = n = 0; n < i; ++n)
5292 npoints +=
GetExp(ElmtID[cnt + n])->GetTotPoints();
5303 nq =
GetExp(ElmtID[cnt + n])->GetTotPoints();
5305 Vmath::Vcopy(nq, &phys[offsetPhys], 1, &bndElmt[offsetElmt], 1);
5328 for (cnt = n = 0; n < i; ++n)
5340 elmt =
GetExp(ElmtID[cnt + n]);
5341 elmt->GetTracePhysVals(EdgeID[cnt + n],
5343 phys + offsetPhys, tmp1 = bnd + offsetBnd);
5362 for (j = 0; j < coordim; ++j)
5369 for (cnt = n = 0; n < i; ++n)
5380 elmt =
GetExp(ElmtID[cnt + n]);
5382 elmt->GetTraceNormal(EdgeID[cnt + n]);
5384 for (j = 0; j < coordim; ++j)
5386 Vmath::Vcopy(nq, normalsElmt[j], 1, tmp = normals[j] + offset, 1);
5396 boost::ignore_unused(ElmtID, EdgeID);
5398 "This method is not defined or valid for this class type");
5404 boost::ignore_unused(weightave, weightjmp);
5411 boost::ignore_unused(Fwd, Bwd);
5421 "This method is not defined or valid for this class type");
5432 "This method is not defined or valid for this class type");
5440 const std::string varName,
5444 boost::ignore_unused(time, varName, x2_in, x3_in);
5446 "This method is not defined or valid for this class type");
5454 "This method is not defined or valid for this class type");
5455 static map<int, RobinBCInfoSharedPtr> result;
5465 boost::ignore_unused(periodicVerts, periodicEdges, periodicFaces);
5467 "This method is not defined or valid for this class type");
5472 unsigned int regionId,
const std::string &variable)
5474 auto collectionIter = collection.find(regionId);
5475 ASSERTL1(collectionIter != collection.end(),
5476 "Unable to locate collection " +
5477 boost::lexical_cast<string>(regionId));
5480 (*collectionIter).second;
5481 auto conditionMapIter = bndCondMap->find(variable);
5482 ASSERTL1(conditionMapIter != bndCondMap->end(),
5483 "Unable to locate condition map.");
5486 (*conditionMapIter).second;
5488 return boundaryCondition;
5493 boost::ignore_unused(n);
5495 "This method is not defined or valid for this class type");
5506 vector<std::pair<LocalRegions::ExpansionSharedPtr, int>>>
5531 if (
m_graph->GetMeshDimension() == (*
m_exp)[0]->GetShapeDimension())
5537 bool verbose = (
m_session->DefinesCmdLineArgument(
"verbose")) &&
5543 : 2 *
m_exp->size());
5555 vector<StdRegions::StdExpansionSharedPtr> collExp;
5557 std::vector<LibUtilities::BasisKey> prevbasisKeys(
5559 std::vector<LibUtilities::BasisKey> thisbasisKeys(
5562 bool prevDef =
false;
5568 for (
int i = 0; i < (*m_exp).size(); i++)
5574 for (
int d = 0;
d < exp->GetNumBases();
d++)
5576 thisbasisKeys[
d] = exp->GetBasis(
d)->GetBasisKey();
5584 if (thisbasisKeys != prevbasisKeys || prevDef != Deformed ||
5601 if (collExp.size() > collsize)
5605 collsize = collExp.size();
5617 collExp.push_back(exp);
5620 prevbasisKeys = thisbasisKeys;
5626 collExp.push_back(exp);
5632 if (i == (*m_exp).size() - 1)
5643 if (collExp.size() > collsize)
5647 collsize = collExp.size();
5705 int pt0 = (*m_exp)[i]->GetNumPoints(0);
5706 int pt1 = (*m_exp)[i]->GetNumPoints(1);
5707 int npt0 = (int)pt0 * scale;
5708 int npt1 = (int)pt1 * scale;
5711 npt0, (*
m_exp)[i]->GetPointsType(0));
5713 npt1, (*
m_exp)[i]->GetPointsType(1));
5717 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(),
5718 &inarray[cnt], newPointsKey0,
5719 newPointsKey1, &outarray[cnt1]);
5722 cnt1 += npt0 * npt1;
5731 int pt0 = (*m_exp)[i]->GetNumPoints(0);
5732 int pt1 = (*m_exp)[i]->GetNumPoints(1);
5733 int pt2 = (*m_exp)[i]->GetNumPoints(2);
5734 int npt0 = (int)pt0 * scale;
5735 int npt1 = (int)pt1 * scale;
5736 int npt2 = (int)pt2 * scale;
5739 npt0, (*
m_exp)[i]->GetPointsType(0));
5741 npt1, (*
m_exp)[i]->GetPointsType(1));
5743 npt2, (*
m_exp)[i]->GetPointsType(2));
5747 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(),
5748 (*
m_exp)[i]->GetBasis(2)->GetPointsKey(),
5749 &inarray[cnt], newPointsKey0,
5750 newPointsKey1, newPointsKey2,
5753 cnt += pt0 * pt1 * pt2;
5754 cnt1 += npt0 * npt1 * npt2;
5771 boost::ignore_unused(FwdFlux, BwdFlux, outarray);
5779 int nTotElmt = (*m_exp).size();
5780 int nElmtPnt = (*m_exp)[0]->GetTotPoints();
5781 int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
5786 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
5788 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
5789 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
5791 if (tmpPhys.size() != nElmtPnt || tmpCoef.size() != nElmtCoef)
5797 for (
int ncl = 0; ncl < nElmtPnt; ncl++)
5799 tmpPhys[ncl] = inarray[nelmt][ncl];
5801 (*m_exp)[nelmt]->IProductWRTDerivBase(nDirctn, tmpPhys, tmpCoef);
5803 for (
int nrw = 0; nrw < nElmtCoef; nrw++)
5805 (*mtxPerVar[nelmt])(nrw, ncl) = tmpCoef[nrw];
5816 int nTotElmt = (*m_exp).size();
5818 int nspacedim =
m_graph->GetSpaceDimension();
5827 int nElmtPntPrevious = 0;
5828 int nElmtCoefPrevious = 0;
5830 int nElmtPnt, nElmtCoef;
5831 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
5833 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
5834 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
5837 if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
5838 (ElmtTypeNow != ElmtTypePrevious))
5840 if (nElmtPntPrevious != nElmtPnt)
5842 for (
int ndir = 0; ndir < nspacedim; ndir++)
5849 stdExp = (*m_exp)[nelmt]->GetStdExp();
5851 stdExp->DetShapeType(), *stdExp);
5853 ArrayStdMat[0] = stdExp->GetStdMatrix(matkey);
5854 ArrayStdMat_data[0] = ArrayStdMat[0]->GetPtr();
5861 ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
5862 ArrayStdMat_data[1] = ArrayStdMat[1]->GetPtr();
5867 stdExp->DetShapeType(),
5870 ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
5871 ArrayStdMat_data[2] = ArrayStdMat[2]->GetPtr();
5875 ElmtTypePrevious = ElmtTypeNow;
5876 nElmtPntPrevious = nElmtPnt;
5877 nElmtCoefPrevious = nElmtCoef;
5881 for (
int ndir = 0; ndir < nspacedim; ndir++)
5887 for (
int ndir = 0; ndir < nspacedim; ndir++)
5889 (*m_exp)[nelmt]->AlignVectorToCollapsedDir(
5890 ndir, inarray[ndir][nelmt], tmppnts);
5891 for (
int n = 0; n < nspacedim; n++)
5893 Vmath::Vadd(nElmtPnt, tmppnts[n], 1, projectedpnts[n], 1,
5894 projectedpnts[n], 1);
5898 for (
int ndir = 0; ndir < nspacedim; ndir++)
5901 (*m_exp)[nelmt]->MultiplyByQuadratureMetric(projectedpnts[ndir],
5902 projectedpnts[ndir]);
5905 for (
int np = 0; np < nElmtPnt; np++)
5907 NekDouble factor = projectedpnts[ndir][np];
5908 clmnArray = MatDataArray + np * nElmtCoef;
5909 clmnStdMatArray = ArrayStdMat_data[ndir] + np * nElmtCoef;
5910 Vmath::Svtvp(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray,
5923 int nElmtPntPrevious = 0;
5924 int nElmtCoefPrevious = 0;
5925 int nTotElmt = (*m_exp).size();
5926 int nElmtPnt = (*m_exp)[0]->GetTotPoints();
5927 int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
5933 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
5935 nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
5936 nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
5939 if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
5940 (ElmtTypeNow != ElmtTypePrevious))
5943 stdExp = (*m_exp)[nelmt]->GetStdExp();
5945 stdExp->DetShapeType(), *stdExp);
5948 stdMat_data = BwdMat->GetPtr();
5950 if (nElmtPntPrevious != nElmtPnt)
5955 ElmtTypePrevious = ElmtTypeNow;
5956 nElmtPntPrevious = nElmtPnt;
5957 nElmtCoefPrevious = nElmtCoef;
5960 (*m_exp)[nelmt]->MultiplyByQuadratureMetric(
5966 for (
int np = 0; np < nElmtPnt; np++)
5969 clmnArray = MatDataArray + np * nElmtCoef;
5970 clmnStdMatArray = stdMat_data + np * nElmtCoef;
5971 Vmath::Smul(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray, 1);
5995 std::shared_ptr<LocalRegions::ExpansionVector> traceExp =
5996 tracelist->GetExp();
5997 int ntotTrace = (*traceExp).size();
5998 int nTracePnt, nTraceCoef;
6000 std::shared_ptr<LocalRegions::ExpansionVector> fieldExp =
GetExp();
6006 locTraceToTraceMap->GetLeftRightAdjacentExpId();
6008 locTraceToTraceMap->GetLeftRightAdjacentExpFlag();
6011 locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffMap();
6013 locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffSign();
6018 int MatIndex, nPnts;
6021 int nTracePntsTtl = tracelist->GetTotPoints();
6022 int nlocTracePts = locTraceToTraceMap->GetNLocTracePts();
6023 int nlocTracePtsFwd = locTraceToTraceMap->GetNFwdLocTracePts();
6024 int nlocTracePtsBwd = nlocTracePts - nlocTracePtsFwd;
6027 nlocTracePtsLR[0] = nlocTracePtsFwd;
6028 nlocTracePtsLR[1] = nlocTracePtsBwd;
6030 size_t nFwdBwdNonZero = 0;
6032 for (
int i = 0; i < 2; ++i)
6034 if (nlocTracePtsLR[i] > 0)
6036 tmpIndex[nFwdBwdNonZero] = i;
6042 for (
int i = 0; i < nFwdBwdNonZero; ++i)
6044 nlocTracePtsNonZeroIndex[i] = tmpIndex[i];
6050 for (
int k = 0; k < 2; ++k)
6055 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6057 size_t i = nlocTracePtsNonZeroIndex[k];
6061 int nNumbElmt = fieldMat.size();
6064 for (
int i = 0; i < nNumbElmt; i++)
6066 ElmtMatDataArray[i] = fieldMat[i]->GetPtr();
6070 int nTraceCoefMax = 0;
6071 int nTraceCoefMin = std::numeric_limits<int>::max();
6077 for (
int nt = 0; nt < ntotTrace; nt++)
6079 nTraceCoef = (*traceExp)[nt]->GetNcoeffs();
6080 nTracePnt = tracelist->GetTotPoints(nt);
6081 int noffset = tracelist->GetPhys_Offset(nt);
6082 TraceCoefArray[nt] = nTraceCoef;
6083 TracePntArray[nt] = nTracePnt;
6084 TraceOffArray[nt] = noffset;
6085 FwdMatData[nt] = FwdMat[nt]->GetPtr();
6086 BwdMatData[nt] = BwdMat[nt]->GetPtr();
6087 if (nTraceCoef > nTraceCoefMax)
6089 nTraceCoefMax = nTraceCoef;
6091 if (nTraceCoef < nTraceCoefMin)
6093 nTraceCoefMin = nTraceCoef;
6096 WARNINGL1(nTraceCoefMax == nTraceCoefMin,
6097 "nTraceCoefMax!=nTraceCoefMin: Effeciency may be low ");
6099 int traceID, nfieldPnts, ElmtId, noffset;
6101 locTraceToTraceMap->GetLocTracephysToTraceIDMap();
6103 locTraceToTraceMap->GetLocTraceToFieldMap();
6106 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6108 size_t i = nlocTracePtsNonZeroIndex[k];
6110 Vmath::Vcopy(nlocTracePtsLR[i], &fieldToLocTraceMap[0] + noffset, 1,
6111 &fieldToLocTraceMapLR[i][0], 1);
6112 noffset += nlocTracePtsLR[i];
6116 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6118 size_t nlr = nlocTracePtsNonZeroIndex[k];
6120 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6122 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6123 nTraceCoef = TraceCoefArray[traceID];
6124 ElmtId = LRAdjExpid[nlr][traceID];
6126 nElmtCoef = ElmtCoefArray[ElmtId];
6127 nfieldPnts = fieldToLocTraceMapLR[nlr][nloc];
6128 nPnts = nfieldPnts - noffset;
6130 MatIndexArray[nlr][nloc] = nPnts * nElmtCoef;
6134 for (
int nc = 0; nc < nTraceCoefMin; nc++)
6136 for (
int nt = 0; nt < ntotTrace; nt++)
6138 nTraceCoef = TraceCoefArray[nt];
6139 nTracePnt = TracePntArray[nt];
6140 noffset = TraceOffArray[nt];
6141 Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
6142 &TraceFwdPhy[noffset], 1);
6143 Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
6144 &TraceBwdPhy[noffset], 1);
6147 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6149 size_t i = nlocTracePtsNonZeroIndex[k];
6150 Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
6156 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6158 size_t nlr = nlocTracePtsNonZeroIndex[k];
6159 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6161 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6162 nTraceCoef = TraceCoefArray[traceID];
6163 ElmtId = LRAdjExpid[nlr][traceID];
6164 nrwAdjExp = elmtLRMap[nlr][traceID][nc];
6165 sign = elmtLRSign[nlr][traceID][nc];
6166 MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
6168 ElmtMatDataArray[ElmtId][MatIndex] -=
6169 sign * tmplocTrace[nlr][nloc];
6174 for (
int nc = nTraceCoefMin; nc < nTraceCoefMax; nc++)
6176 for (
int nt = 0; nt < ntotTrace; nt++)
6178 nTraceCoef = TraceCoefArray[nt];
6179 nTracePnt = TracePntArray[nt];
6180 noffset = TraceOffArray[nt];
6181 if (nc < nTraceCoef)
6183 Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
6184 &TraceFwdPhy[noffset], 1);
6185 Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
6186 &TraceBwdPhy[noffset], 1);
6195 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6197 size_t i = nlocTracePtsNonZeroIndex[k];
6198 Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
6203 for (
int k = 0; k < nFwdBwdNonZero; ++k)
6205 size_t nlr = nlocTracePtsNonZeroIndex[k];
6206 for (
int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
6208 traceID = LocTracephysToTraceIDMap[nlr][nloc];
6209 nTraceCoef = TraceCoefArray[traceID];
6210 if (nc < nTraceCoef)
6212 ElmtId = LRAdjExpid[nlr][traceID];
6213 nrwAdjExp = elmtLRMap[nlr][traceID][nc];
6214 sign = -elmtLRSign[nlr][traceID][nc];
6215 MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
6217 ElmtMatDataArray[ElmtId][MatIndex] +=
6218 sign * tmplocTrace[nlr][nloc];
6230 int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
6243 nelmtcoef0 = nelmtcoef;
6244 nelmtpnts0 = nelmtpnts;
6246 for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
6251 tmpMatQ = ElmtJacQuad[nelmt];
6252 tmpMatC = ElmtJacCoef[nelmt];
6254 MatQ_data = tmpMatQ->GetPtr();
6255 MatC_data = tmpMatC->GetPtr();
6257 if (nelmtcoef != nelmtcoef0)
6260 nelmtcoef0 = nelmtcoef;
6263 if (nelmtpnts != nelmtpnts0)
6266 nelmtpnts0 = nelmtpnts;
6269 for (
int np = 0; np < nelmtcoef; np++)
6271 Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
6273 (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
6274 (*m_exp)[nelmt]->IProductWRTDerivBase(dir, innarray, outarray);
6276 Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
6277 nelmtcoef, &MatC_data[0] + np, nelmtcoef);
6287 int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
6300 nelmtcoef0 = nelmtcoef;
6301 nelmtpnts0 = nelmtpnts;
6303 for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
6308 tmpMatQ = ElmtJacQuad[nelmt];
6309 tmpMatC = ElmtJacCoef[nelmt];
6311 MatQ_data = tmpMatQ->GetPtr();
6312 MatC_data = tmpMatC->GetPtr();
6314 if (nelmtcoef != nelmtcoef0)
6317 nelmtcoef0 = nelmtcoef;
6320 if (nelmtpnts != nelmtpnts0)
6323 nelmtpnts0 = nelmtpnts;
6326 for (
int np = 0; np < nelmtcoef; np++)
6328 Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
6330 (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
6331 (*m_exp)[nelmt]->IProductWRTBase(innarray, outarray);
6333 Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
6334 nelmtcoef, &MatC_data[0] + np, nelmtcoef);
6354 int pt0 = (*m_exp)[i]->GetNumPoints(0);
6355 int pt1 = (*m_exp)[i]->GetNumPoints(1);
6356 int npt0 = (int)pt0 * scale;
6357 int npt1 = (int)pt1 * scale;
6360 npt0, (*
m_exp)[i]->GetPointsType(0));
6362 npt1, (*
m_exp)[i]->GetPointsType(1));
6366 newPointsKey0, newPointsKey1, &inarray[cnt],
6367 (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
6368 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(), &outarray[cnt1]);
6380 int pt0 = (*m_exp)[i]->GetNumPoints(0);
6381 int pt1 = (*m_exp)[i]->GetNumPoints(1);
6382 int pt2 = (*m_exp)[i]->GetNumPoints(2);
6383 int npt0 = (int)pt0 * scale;
6384 int npt1 = (int)pt1 * scale;
6385 int npt2 = (int)pt2 * scale;
6388 npt0, (*
m_exp)[i]->GetPointsType(0));
6390 npt1, (*
m_exp)[i]->GetPointsType(1));
6392 npt2, (*
m_exp)[i]->GetPointsType(2));
6396 newPointsKey0, newPointsKey1, newPointsKey2, &inarray[cnt],
6397 (*
m_exp)[i]->GetBasis(0)->GetPointsKey(),
6398 (*
m_exp)[i]->GetBasis(1)->GetPointsKey(),
6399 (*
m_exp)[i]->GetBasis(2)->GetPointsKey(), &outarray[cnt1]);
6401 cnt += npt0 * npt1 * npt2;
6402 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.
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 .
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.
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
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)
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_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
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)
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
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
Exapnsion type.
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
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::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
void Interp3D(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)
this function interpolates a 3D function evaluated at the quadrature points of the 3D basis,...
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
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
The above copyright notice and this permission notice shall be included.
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