91 "Pulse solver only set up for Discontinuous projections");
94 m_graph->GetMeshDimension() == 1,
95 "Pulse wave solver only set up for expansion dimension equal to 1");
108 if (
m_session->DefinesSolverInfo(
"PressureArea"))
128 std::map<int, LibUtilities::CommSharedPtr> domComm;
134 auto filterMap =
m_session->GetFilters();
135 unsigned int fcnt = 0;
136 for (
auto &x : filterMap)
138 ASSERTL0(x.domain != -1,
"Filter needs DOMAIN attribute when "
139 "applied to PulseWaveSolver.")
150 bool SetToOneSpaceDimension =
true;
174 m_filters[x].second->SetUpdateOnInitialise(
false);
176 m_filters[x].second->SetUpdateOnInitialise(
true);
189 SetToOneSpaceDimension);
279 if (
m_session->DefinesFunction(
"Viscoelasticity"))
286 for (
int j = 0; j < nq; ++j)
297 if (
m_session->DefinesFunction(
"StrainStiffening"))
304 for (
int j = 0; j < nq; ++j)
327 int nelmt_trace = trace->GetExpSize();
331 for (
int i = 0; i < nelmt_trace; ++i)
338 trace->GetExp(0)->GetGeom()->SetCoordim(1);
340 trace->GetNormals(normals);
348 std::map<int, LibUtilities::CommSharedPtr> &retval)
352 std::string def(
"default");
353 char *argv =
new char[def.length() + 1];
354 std::strcpy(argv, def.c_str());
358 size_t nprocs =
m_comm->GetSize();
365 retval[
d.first] = serialComm;
372 size_t rank =
m_comm->GetRank();
378 dmax = ((size_t)
d.first > dmax) ?
d.first : dmax;
388 commtmp[
d.first] = 1;
397 for (
size_t d = 0;
d < dmax; ++
d)
408 if ((
size_t)d1.first ==
d)
414 newcomm =
m_comm->CommCreateIf(flag);
419 if ((
size_t)d1.first ==
d)
438 std::map<int, int> SharedProc;
443 if (commtmp[
d.first] == 1)
445 retval[
d.first] = serialComm;
447 else if (commtmp[
d.first] == 2)
449 SharedProc[
d.first] = 1;
450 commtmp1[
d.first] = rank;
458 size_t nShrProc = SharedProc.size();
459 int commMax = nShrProc;
468 for (
auto &
d : SharedProc)
470 SharedProc[
d.first] = commtmp1[
d.first] - rank;
476 std::map<int, std::pair<int, int>> CreateComm;
484 std::set<int> proclist;
488 while (dorank < nprocs)
493 if (DoneCreate[dorank] ==
false)
496 ncomms = (rank == dorank) ? nShrProc : 0;
501 DoneCreate[dorank] = (ncomms == 0) ?
true :
false;
507 bool doneCreateOnDoRank =
false;
508 bool doneCreateOnSharedProc =
false;
509 bool createdComm =
false;
513 if ((proclist.count(dorank) == 0))
519 for (
auto &
d : SharedProc)
521 if (CreateComm.count(
d.first) == 0)
523 sharedproc = SharedProc[
d.first];
529 "Failed to fine a new "
530 "processor to set up another "
533 if (proclist.count(sharedproc) == 0)
537 for (
auto &
d : SharedProc)
539 if (
d.second == sharedproc)
541 CreateComm[
d.first] =
542 std::pair<int, int>(commcall,
550 if (CreateComm.size() == nShrProc)
552 doneCreateOnDoRank =
true;
563 "Error in obtaining rank "
564 "shared by domain. Sharedproc value is greater "
565 "than number of procs");
567 if (proclist.count(sharedproc) == 0)
569 if ((
int)rank == sharedproc)
573 for (
auto &
d : SharedProc)
575 if (
d.second == (
int)dorank)
577 CreateComm[
d.first] =
578 std::pair<int, int>(commcall,
584 if (CreateComm.size() == nShrProc)
586 doneCreateOnSharedProc =
true;
593 setdone[0] = (doneCreateOnDoRank) ? 1 : 0;
594 setdone[1] = (doneCreateOnSharedProc) ? 1 : 0;
595 setdone[2] = (createdComm) ? 1 : 0;
597 DoneCreate[dorank] = (bool)setdone[0];
598 if (sharedproc != -1)
600 DoneCreate[sharedproc] = (bool)setdone[1];
604 proclist.insert(dorank);
605 proclist.insert(sharedproc);
614 for (i = 0; i < nprocs; ++i)
616 if (DoneCreate[i] ==
false)
630 "Failed to find sub communicators "
631 "pattern in 4*commMax searches");
635 ASSERTL1(CreateComm.size() == nShrProc,
636 "Have not created communicators for all shared procs");
639 size_t maxCreateComm = CreateComm.size();
643 for (
size_t i = 0; i < maxCreateComm; ++i)
648 for (
auto &
d : CreateComm)
650 if (
d.second.first == (
int)i)
652 flag =
d.second.second;
656 newcomm =
m_comm->CommCreateIf(flag);
658 for (
auto &
d : CreateComm)
660 if (
d.second.first == (
int)i)
662 retval[
d.first] = newcomm;
676 numShared[rank] = nShrProc;
678 int totShared = (int)
Vmath::Vsum(nprocs, numShared, 1);
684 for (
auto &s : SharedProc)
686 if (s.second > (
int)rank)
692 numOffset[rank] = cnt;
696 for (
size_t i = 1; i < nprocs; ++i)
698 numShared[i] += numShared[i - 1];
699 numOffset[i] += numOffset[i - 1];
701 for (
size_t i = nprocs - 1; i > 0; --i)
703 numShared[i] = numShared[i - 1];
704 numOffset[i] = numOffset[i - 1];
712 for (
auto &s : SharedProc)
714 shareddom[numShared[rank] + cnt] = s.first;
723 for (
auto &s : SharedProc)
725 if (s.second > (
int)rank)
727 sharedid[numShared[rank] + cnt] = numOffset[rank] + cnt1;
731 for (j = 0; j < maxCreateComm; ++j)
733 if ((numShared[s.second] + j < totShared) &&
734 (shareddom[numShared[s.second] + j] == s.first))
740 sharedid[numShared[s.second] + j] = numOffset[rank] + cnt1;
751 for (
size_t i = 0; i < (size_t)totShared; ++i)
754 "Failed to number shared proc uniquely");
760 (int)
Vmath::Vmax(nShrProc, &sharedid[numShared[rank]], 1);
766 std::map<int, int> ShrToDom;
768 for (
auto &s : SharedProc)
770 ShrToDom[cnt] = s.first;
776 std::set<int> doneDom;
777 for (
size_t i = 0; i < nShrProc; ++i)
780 Vmath::Imin(nShrProc, &sharedid[numShared[rank]], 1);
781 sharedid[numShared[rank] + minId] += maxoffset;
784 doneDom.insert(ShrToDom[minId]);
790 if (doneDom.count(
d.first) == 0)
801 std::map<int, std::vector<InterfacePointShPtr>> VidToDomain;
811 for (
size_t omega = 0; omega <
m_nDomains; ++omega)
815 for (
size_t i = 0; i < (
m_vessels[vesselID]->GetBndConditions()).size();
818 if (
m_vessels[vesselID]->GetBndConditions()[i]->GetUserDefined() ==
823 ->UpdateBndCondExpansion(i)
835 size_t nExp =
m_vessels[vesselID]->GetExpSize();
836 for (
size_t n = 0; n < nExp; ++n)
838 for (
size_t p = 0;
p < 2; ++
p)
843 ->GetElmtToTrace()[n][
p]
850 ->GetElmtToTrace()[n][
p]
855 ->GetCoeff_Offset(eid);
872 VidToDomain[vid].push_back(Ipt);
878 std::map<int, int> domId;
883 domId[cnt] =
d.first;
889 int nvid2dom = VidToDomain.size();
894 for (
auto &v : VidToDomain)
896 tmp[cnt] = v.first + 1;
897 for (
size_t i = 0; i < v.second.size(); ++i)
904 const bool verbose =
m_session->DefinesCmdLineArgument(
"verbose");
917 for (
auto &v : VidToDomain)
919 if (nvid[cnt] == 3.0)
921 for (
size_t i = 0; i < v.second.size(); ++i)
926 if (v.second[i]->m_elmtVert == 0)
942 for (
auto &v : VidToDomain)
944 if (nvid[cnt] == 2.0)
947 for (
size_t i = 0; i < v.second.size(); ++i)
950 std::max(dom[cnt], (
NekDouble)domId[v.second[i]->m_domain]);
953 else if (nvid[cnt] == 3.0)
959 int val = (nbeg[cnt] == 2.0) ? 0 : 1;
961 for (
size_t i = 0; i < v.second.size(); ++i)
963 if (v.second[i]->m_elmtVert == val)
966 dom[cnt], (
NekDouble)domId[v.second[i]->m_domain]);
976 for (
auto &iter : VidToDomain)
978 ASSERTL1(nvid[v] != 1.0,
"Found an interface wth only "
979 "one domain which should not happen");
983 for (
size_t i = 0; i < iter.second.size(); ++i)
985 if (domId[iter.second[i]->m_domain] == dom[v])
987 iter.second[i]->m_riemannOrd = 1;
991 iter.second[i]->m_riemannOrd = 0;
996 else if (nvid[v] == 3.0)
999 int val = (nbeg[v] == 2.0) ? 1 : 0;
1001 for (
size_t i = 0; i < iter.second.size(); ++i)
1003 if (iter.second[i]->m_elmtVert == val)
1005 iter.second[i]->m_riemannOrd = 0;
1009 if (domId[iter.second[i]->m_domain] == dom[v])
1011 iter.second[i]->m_riemannOrd = 2;
1015 iter.second[i]->m_riemannOrd = 1;
1031 ASSERTL0(
false,
"Unknown junction type");
1047 for (
size_t i = 0; i < 3; ++i)
1049 tmp1[3 * cnt + i] = (
NekDouble)(3 * vid + i + 1);
1056 for (
size_t i = 0; i < 3; ++i)
1058 tmp1[3 * cnt + i] = (
NekDouble)(3 * vid + i + 1);
1065 for (
size_t i = 0; i < 3; ++i)
1067 tmp1[3 * cnt + i] = (
NekDouble)(3 * vid + i + 1);
1076 std::map<int, LibUtilities::CommSharedPtr> &domComm)
1091 std::map<int, SpatialDomains::GeometrySharedPtr> domvids;
1097 for (
size_t j = 0; j < compIt.second->m_geomVec.size(); ++j)
1101 for (
size_t p = 0;
p < 2; ++
p)
1104 compIt.second->m_geomVec[j]->GetVertex(
p);
1105 int vid = vert->GetGlobalID();
1109 if (domvids.count(vid))
1115 domvids[vid] = vert;
1121 ASSERTL1(domvids.size() == 2,
"Failed to find two end points "
1122 "of a domain (domvids = " +
1123 std::to_string(domvids.size()) +
")");
1125 size_t nprocs = domComm[
d]->GetSize();
1129 size_t rank = domComm[
d]->GetRank();
1131 nvids[rank] = domvids.size();
1139 for (
size_t i = 0; i < rank; ++i)
1144 for (
auto &i : domvids)
1146 locids[cnt++] = i.first;
1152 std::set<int> chkvids;
1153 for (
size_t i = 0; i < totvids; ++i)
1155 if (chkvids.count(locids[i]))
1158 if (domvids.count(locids[i]))
1160 domvids.erase(locids[i]);
1165 chkvids.insert(locids[i]);
1174 for (
auto &it : bregions)
1176 for (
auto &bregionIt : *it.second)
1180 int id = bregionIt.second->m_geomVec[0]->GetGlobalID();
1182 if (domvids.count(
id))
1190 std::vector<std::string> variables =
m_session->GetVariables();
1194 for (
auto &b : bregions)
1196 maxbregind = (maxbregind > b.first) ? maxbregind : b.first;
1199 for (
auto &b : domvids)
1209 gvec->m_geomVec.push_back(b.second);
1210 (*breg)[b.first] = gvec;
1218 std::string userDefined =
"Interface";
1222 AllocateSharedPtr(
m_session,
"0", userDefined));
1224 for (
size_t i = 0; i < variables.size(); ++i)
1226 (*bCondition)[variables[i]] = DirichletInterface;
1243 [[maybe_unused]]
bool dumpInitialConditions)
1245 if (
m_session->GetComm()->GetRank() == 0)
1247 std::cout <<
"Initial Conditions: " << std::endl;
1260 if (
m_session->GetComm()->GetRank() == 0)
1262 std::cout <<
"Subdomain: " << omega << std::endl;
1283 filterFields[j] =
m_vessels[vesselID + j];
1287 for (
auto &f :
d.second)
1331 time_v_IntStep.
Start();
1334 time_v_IntStep.
Stop();
1341 std::cout <<
"Steps: " << n + 1 <<
"\t Time: " <<
m_time
1342 <<
"\t Time-step: " <<
m_timestep <<
"\t" << std::endl;
1357 for (
size_t omega = 0; omega <
m_nDomains; omega++)
1376 filterFields[j] =
m_vessels[vesselID + j];
1380 for (
auto &f :
d.second)
1402 filterFields[j] =
m_vessels[vesselID + j];
1406 for (
auto &f :
d.second)
1419 time_FillDataFromInterfacePoint.
Start();
1421 int omega = I->m_domain;
1422 int traceId = I->m_traceId;
1423 int eid = I->m_elmt;
1424 int vert = I->m_elmtVert;
1426 int phys_offset =
m_vessels[vesselID]->GetPhys_Offset(eid);
1430 m_vessels[vesselID]->GetExp(eid)->GetTracePhysVals(
1433 m_vessels[vesselID]->GetExp(eid)->GetTracePhysVals(
1440 time_FillDataFromInterfacePoint.
Stop();
1442 "PulseWaveSystem::FillDataFromInterfacePoint", 2);
1449 time_EnforceInterfaceConditions.
Start();
1470 beta[l + 3 * cnt], A_0[l + 3 * cnt], alpha[l + 3 * cnt]);
1482 m_mergingJcts[n][i], fields, Au[l + 3 * cnt], uu[l + 3 * cnt],
1483 beta[l + 3 * cnt], A_0[l + 3 * cnt], alpha[l + 3 * cnt]);
1495 beta[l + 3 * cnt], A_0[l + 3 * cnt], alpha[l + 3 * cnt]);
1512 betat =
beta + 3 * cnt, A_0t = A_0 + 3 * cnt,
1513 alphat = alpha + 3 * cnt);
1522 ->UpdateBndCondExpansion(bcpos)
1523 ->UpdatePhys()[0] = Au[l + 3 * cnt];
1525 ->UpdateBndCondExpansion(bcpos)
1526 ->UpdatePhys()[0] = uu[l + 3 * cnt];
1535 betat =
beta + 3 * cnt, A_0t = A_0 + 3 * cnt,
1536 alphat = alpha + 3 * cnt);
1545 ->UpdateBndCondExpansion(bcpos)
1546 ->UpdatePhys()[0] = Au[l + 3 * cnt];
1548 ->UpdateBndCondExpansion(bcpos)
1549 ->UpdatePhys()[0] = uu[l + 3 * cnt];
1557 betat =
beta + 3 * cnt, A_0t = A_0 + 3 * cnt,
1558 alphat = alpha + 3 * cnt);
1567 ->UpdateBndCondExpansion(bcpos)
1568 ->UpdatePhys()[0] = Au[l + 3 * cnt];
1570 ->UpdateBndCondExpansion(bcpos)
1571 ->UpdatePhys()[0] = uu[l + 3 * cnt];
1574 time_EnforceInterfaceConditions.
Stop();
1576 "PulseWaveSystem::EnforceInterfaceConditions", 1);
1612 for (
size_t i = 1; i < 3; ++i)
1621 while ((proceed) && (iter < MAX_ITER))
1624 time_BifurcationRiemann.
Start();
1643 for (
size_t i = 0; i < 3; ++i)
1654 f[0] = W_Au[0] - W[0];
1655 f[1] = W_Au[1] - W[1];
1656 f[2] = W_Au[2] - W[2];
1657 f[3] = Au[0] * uu[0] - Au[1] * uu[1] - Au[2] * uu[2];
1658 f[4] = uu[0] * uu[0] + 2 * P_Au[0] / rho - uu[1] * uu[1] -
1660 f[5] = uu[0] * uu[0] + 2 * P_Au[0] / rho - uu[2] * uu[2] -
1670 for (
int i = 0; i < 3; ++i)
1677 if (
Dot(dx, dx) < Tol)
1683 if (iter >= MAX_ITER)
1685 ASSERTL0(
false,
"Riemann solver for Bifurcation did not converge.");
1687 time_BifurcationRiemann.
Stop();
1689 "PulseWaveSystem::Bifurcation Riemann", 2);
1725 for (
size_t i = 1; i < 3; ++i)
1734 while ((proceed) && (iter < MAX_ITER))
1737 time_MergingRiemann.
Start();
1756 for (
size_t i = 0; i < 3; ++i)
1767 f[0] = W_Au[0] - W[0];
1768 f[1] = W_Au[1] - W[1];
1769 f[2] = W_Au[2] - W[2];
1770 f[3] = Au[0] * uu[0] - Au[1] * uu[1] - Au[2] * uu[2];
1771 f[4] = uu[0] * uu[0] + 2 * P_Au[0] / rho - uu[1] * uu[1] -
1773 f[5] = uu[0] * uu[0] + 2 * P_Au[0] / rho - uu[2] * uu[2] -
1783 for (
size_t i = 0; i < 3; ++i)
1790 if (
Dot(dx, dx) < Tol)
1796 if (iter >= MAX_ITER)
1798 ASSERTL0(
false,
"Riemann solver for Merging Flow did not converge");
1800 time_MergingRiemann.
Stop();
1840 while ((proceed) && (iter < MAX_ITER))
1843 time_InterfaceRiemann.
Start();
1855 for (
size_t i = 0; i < 2; ++i)
1865 f[0] = W_Au[0] - W[0];
1866 f[1] = W_Au[1] - W[1];
1867 f[2] = Au[0] * uu[0] - Au[1] * uu[1];
1868 f[3] = uu[0] * uu[0] + 2 * P_Au[0] / rho - uu[1] * uu[1] -
1878 for (
size_t i = 0; i < 2; ++i)
1885 if (
Dot(dx, dx) < Tol)
1889 time_InterfaceRiemann.
Stop();
1891 "PulseWaveSystem::InterfaceRiemann", 2);
1894 if (iter >= MAX_ITER)
1896 ASSERTL0(
false,
"Riemann solver for Interface did not converge");
1921 std::stringstream outname;
1933 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1934 std::vector<std::string> variables =
m_session->GetVariables();
1941 std::vector<std::vector<NekDouble>> FieldData(FieldDef.size());
1943 size_t nFieldDefPerDomain = FieldDef.size() /
m_nDomains;
1952 for (
size_t i = 0; i < nFieldDefPerDomain; ++i)
1954 cnt = n * nFieldDefPerDomain + i;
1956 FieldDef[cnt]->m_fields.push_back(variables[j]);
1959 FieldDef[cnt], FieldData[cnt],
1969 for (
size_t i = 0; i < nFieldDefPerDomain; ++i)
1971 cnt = n * nFieldDefPerDomain + i;
1973 FieldDef[cnt]->m_fields.push_back(
"P");
1976 FieldData[cnt], PFwd);
1992 for (
size_t i = 0; i < nFieldDefPerDomain; ++i)
1994 cnt = n * nFieldDefPerDomain + i;
1996 FieldDef[cnt]->m_fields.push_back(
"c");
1997 FieldDef[cnt]->m_fields.push_back(
"W1");
1998 FieldDef[cnt]->m_fields.push_back(
"W2");
2001 FieldDef[cnt], FieldData[cnt], PWVFwd);
2003 FieldDef[cnt], FieldData[cnt], W1Fwd);
2005 FieldDef[cnt], FieldData[cnt], W2Fwd);
2035 for (
size_t omega = 0; omega <
m_nDomains; omega++)
2045 if (
m_vessels[vesselid]->GetPhysState() ==
false)
2052 if (exactsoln.size())
2055 m_vessels[vesselid]->GetPhys(), exactsoln);
2057 else if (
m_session->DefinesFunction(
"ExactSolution"))
2069 m_vessels[vesselid]->GetPhys(), exactsoln);
2077 if (
m_vessels[vesselid]->GetComm()->GetRank())
2084 L2error += L2error_dom * L2error_dom;
2086 if (Normalised ==
true)
2091 Vol +=
m_vessels[vesselid]->Integral(one);
2102 if (Normalised ==
true)
2106 L2error =
sqrt(L2error / Vol);
2110 L2error =
sqrt(L2error);
2125 NekDouble LinferrorDom, Linferror = -1.0;
2127 for (
size_t omega = 0; omega <
m_nDomains; ++omega)
2139 if (
m_vessels[vesselid]->GetPhysState() ==
false)
2146 if (exactsoln.size())
2148 LinferrorDom =
m_vessels[vesselid]->Linf(
2149 m_vessels[vesselid]->GetPhys(), exactsoln);
2151 else if (
m_session->DefinesFunction(
"ExactSolution"))
2160 LinferrorDom =
m_vessels[vesselid]->Linf(
2161 m_vessels[vesselid]->GetPhys(), exactsoln);
2168 Linferror = (Linferror > LinferrorDom) ? Linferror : LinferrorDom;
2172 ASSERTL0(
false,
"ErrorExtraPoints not allowed for this solver");
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
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.
Array< OneD, Array< OneD, NekDouble > > m_A_0
Array< OneD, int > m_fieldPhysOffset
void v_DoInitialise(bool dumpInitialConditions=false) override
Sets up initial conditions.
Array< OneD, Array< OneD, NekDouble > > m_beta_trace
std::map< int, int > m_filterToVesselID
Array< OneD, Array< OneD, NekDouble > > m_W2
Array< OneD, Array< OneD, NekDouble > > m_trace_fwd_normal
PulseWavePressureAreaSharedPtr m_pressureArea
void CheckPoint_Output(const int n)
Array< OneD, Array< OneD, NekDouble > > m_W1
void v_InitObject(bool DeclareField=false) override
std::vector< int > m_domOrder
void MergingRiemann(Array< OneD, NekDouble > &Au, Array< OneD, NekDouble > &uu, Array< OneD, NekDouble > &beta, Array< OneD, NekDouble > &A_0, Array< OneD, NekDouble > &alpha)
Riemann Problem for Merging Flow.
void InterfaceRiemann(Array< OneD, NekDouble > &Au, Array< OneD, NekDouble > &uu, Array< OneD, NekDouble > &beta, Array< OneD, NekDouble > &A_0, Array< OneD, NekDouble > &alpha)
Riemann Problem for Interface/Junction.
std::map< int, std::vector< int > > m_domainToFilterIDs
Array< OneD, Array< OneD, NekDouble > > m_alpha_trace
std::map< int, SpatialDomains::CompositeMap > m_domain
UpwindTypePulse m_upwindTypePulse
Array< OneD, Array< OneD, NekDouble > > m_A_0_trace
Array< OneD, Array< OneD, NekDouble > > m_pressure
NekDouble v_LinfError(unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray) override
Compute the L_inf error between fields and a given exact solution.
Array< OneD, Array< OneD, NekDouble > > m_gamma
void WriteVessels(const std::string &outname)
Write input fields to the given filename.
void GetCommArray(std::map< int, LibUtilities::CommSharedPtr > &retval)
Set and retrn a series of communicators for each partition.
Array< OneD, Array< OneD, NekDouble > > m_alpha
Gs::gs_data * m_intComm
Communicator for interfaces.
std::vector< std::vector< InterfacePointShPtr > > m_vesselIntfcs
Array< OneD, Array< OneD, NekDouble > > m_PWV
void v_Output(void) override
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
void FillDataFromInterfacePoint(InterfacePointShPtr &I, const Array< OneD, const Array< OneD, NekDouble > > &field, NekDouble &A, NekDouble &u, NekDouble &beta, NekDouble &A_0, NekDouble &alpha)
std::vector< std::vector< InterfacePointShPtr > > m_bifurcations
void SetUpDomainInterfaceBCs(SpatialDomains::BoundaryConditions &AllBcs, std::map< int, LibUtilities::CommSharedPtr > &domComm)
std::vector< std::vector< InterfacePointShPtr > > m_mergingJcts
void SetUpDomainInterfaces(void)
NekDouble v_L2Error(unsigned int field, const Array< OneD, NekDouble > &exactsoln=NullNekDouble1DArray, bool Normalised=false) override
Compute the L2 error between fields and a given exact solution.
void v_DoSolve() override
Solves an unsteady problem.
void EnforceInterfaceConditions(const Array< OneD, const Array< OneD, NekDouble > > &fields)
Array< OneD, Array< OneD, NekDouble > > m_beta
PulseWaveSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Initialises PulseWaveSystem class members.
void BifurcationRiemann(Array< OneD, NekDouble > &Au, Array< OneD, NekDouble > &uu, Array< OneD, NekDouble > &beta, Array< OneD, NekDouble > &A_0, Array< OneD, NekDouble > &alpha)
Riemann Problem for Bifurcation.
LibUtilities::FieldIOSharedPtr m_fld
Field input/output.
SpatialDomains::MeshGraphSharedPtr m_graph
Pointer to graph defining mesh.
LibUtilities::CommSharedPtr m_comm
Communicator.
NekDouble m_timestep
Time step size.
int m_infosteps
Number of time steps between outputting status information.
NekDouble m_time
Current time of simulation.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT int GetNpoints()
SOLVER_UTILS_EXPORT int GetNcoeffs()
std::string m_sessionName
Name of the session.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
SOLVER_UTILS_EXPORT void SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
Initialise the data in the dependent fields.
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
int m_steps
Number of steps to take.
int m_NumQuadPointsError
Number of Quadrature points used to work out the error.
SOLVER_UTILS_EXPORT int GetTraceTotPoints()
LibUtilities::FieldMetaDataMap m_fieldMetaDataMap
Map to identify relevant solver info to dump in output fields.
int m_checksteps
Number of steps between checkpoints.
SOLVER_UTILS_EXPORT void EvaluateExactSolution(int field, Array< OneD, NekDouble > &outfield, const NekDouble time)
Evaluates an exact solution.
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
Base class for unsteady solvers.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
std::vector< std::pair< std::string, FilterSharedPtr > > m_filters
LibUtilities::TimeIntegrationSchemeSharedPtr m_intScheme
Wrapper to the time integration scheme.
SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareField=true) override
Init object for UnsteadySystem class.
void AddBoundaryRegions(const int regionID, BoundaryRegionShPtr &bRegion)
const BoundaryRegionCollection & GetBoundaryRegions(void) const
void AddBoundaryConditions(const int regionID, BoundaryConditionMapShPtr &bCond)
static gs_data * Init(const Nektar::Array< OneD, long > &pId, const LibUtilities::CommSharedPtr &pComm, bool verbose=true)
Initialise Gather-Scatter map.
static void Gather(Nektar::Array< OneD, NekDouble > pU, gs_op pOp, gs_data *pGsh, Nektar::Array< OneD, NekDouble > pBuffer=NullNekDouble1DArray)
Performs a gather-scatter operation of the provided values.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Equation > EquationSharedPtr
@ beta
Gauss Radau pinned at x=-1,.
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
std::shared_ptr< Expansion > ExpansionSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::map< int, CompositeSharedPtr > BoundaryRegion
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
std::shared_ptr< BoundaryRegion > BoundaryRegionShPtr
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
std::map< std::string, BoundaryConditionShPtr > BoundaryConditionMap
std::shared_ptr< Composite > CompositeSharedPtr
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
std::shared_ptr< Geometry > GeometrySharedPtr
std::vector< double > d(NPUPPER *NPUPPER)
std::shared_ptr< InterfacePoint > InterfacePointShPtr
PressureAreaFactory & GetPressureAreaFactory()
void Multiply(NekMatrix< ResultDataType, StandardMatrixTag > &result, const NekMatrix< LhsDataType, LhsMatrixType > &lhs, const ResultDataType &rhs)
@ SIZE_UpwindTypePulse
Length of enum list.
const char *const UpwindTypeMapPulse[]
DataType Dot(const NekVector< DataType > &lhs, const NekVector< DataType > &rhs)
T Vsum(int n, const T *x, const int incx)
Subtract return sum(x)
int Imin(int n, const T *x, const int incx)
Return the index of the minimum element in 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)
scalarT< T > sqrt(scalarT< T > in)