60 m_session->MatchSolverInfo(
"FLAGIMPLICITITSSTATISTICS",
"True",
70 "Please specify NewtonRelativeIteTol instead of "
71 "NewtonAbsoluteIteTol in XML session file");
74 m_session->LoadParameter(
"AdvectionJacFlag", ntmp, 1);
77 m_session->LoadParameter(
"ViscousJacFlag", ntmp, 1);
90 int ntotal =
m_fields[0]->GetNcoeffs() * nvariables;
93 if (
m_session->DefinesSolverInfo(
"NonlinSysIterSolver"))
98 "NekNonlinSys '" +
SolverType +
"' is not defined.\n");
103 m_session->LoadParameter(
"NekLinSysMaxIterations",
108 m_session->MatchSolverInfo(
"GMRESLeftPrecon",
"True",
110 m_session->MatchSolverInfo(
"GMRESRightPrecon",
"True",
113 m_session->LoadParameter(
"NekNonlinSysMaxIterations",
115 m_session->LoadParameter(
"NonlinIterTolRelativeL2",
117 m_session->LoadParameter(
"LinSysRelativeTolInNonlin",
119 m_session->LoadSolverInfo(
"LinSysIterSolverTypeInNonlin",
122 int GMRESCentralDifference = 0;
123 m_session->LoadParameter(
"GMRESCentralDifference", GMRESCentralDifference,
125 switch (GMRESCentralDifference)
149 const auto locTraceToTraceMap =
m_fields[0]->GetLocTraceToTraceMap();
150 locTraceToTraceMap->CalcLocTracePhysToTraceIDMap(
m_fields[0]->GetTrace(),
152 for (
int i = 1; i < nvariables; i++)
154 m_fields[i]->GetLocTraceToTraceMap()->SetLocTracePhysToTraceIDMap(
155 locTraceToTraceMap->GetLocTracephysToTraceIDMap());
201 cout <<
"-------------------------------------------" << endl
205 <<
"-------------------------------------------" << endl;
211 [[maybe_unused]]
const bool &flag)
214 unsigned int nvariables =
m_fields.size();
215 unsigned int npoints =
m_fields[0]->GetNcoeffs();
218 for (
int i = 0; i < nvariables; ++i)
220 int offset = i * npoints;
221 in2D[i] = inarray + offset;
222 out2D[i] = out + offset;
236 unsigned int nvariable = inarray.size();
237 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
238 unsigned int npoints =
m_fields[0]->GetNpoints();
242 for (
int i = 0; i < nvariable; ++i)
245 m_fields[i]->BwdTrans(inarray[i], inpnts[i]);
258 for (
int i = 0; i < nvariable; ++i)
263 m_nonlinsol->GetRefSourceVec() + i * ncoeffs, 1, out[i], 1);
271 int nvariables = inarray.size();
272 int ncoeffs =
m_fields[0]->GetNcoeffs();
275 for (
int i = 0; i < nvariables; ++i)
282 for (
int i = 0; i < nvariables; ++i)
284 m_fields[i]->BwdTrans(tmpOut[i], outarray[i]);
297 int nvariables = inarray.size();
314 for (
int i = 0; i < nvariables; ++i)
318 m_fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
329 for (
int i = 0; i < nvariables; ++i)
343 x->ApplyCoeff(
m_fields, inarray, outarray, time);
348 int nElements =
m_fields[0]->GetExpSize();
357 for (
int n = 0; n < nElements; ++n)
359 nq =
m_fields[0]->GetExp(n)->GetNcoeffs();
360 offset =
m_fields[0]->GetCoeff_Offset(n);
362 for (
int i = 0; i < nvariables; ++i)
365 tmp = outarray[i] + offset, 1);
380 int nvariables = inarray.size();
383 auto advWeakDGObject =
384 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
m_advObject);
386 "Use WeakDG for implicit compressible flow solver!");
387 advWeakDGObject->AdvectCoeffs(nvariables,
m_fields, advVel, inarray,
388 outarray, time, pFwd, pBwd);
409 unsigned int nvariables = inpnts.size();
410 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
411 unsigned int ntotal = nvariables * ncoeffs;
420 for (
int i = 0; i < nvariables; ++i)
422 int noffset = i * ncoeffs;
423 tmpArray = inarray + noffset;
424 m_fields[i]->FwdTrans(inpnts[i], tmpArray);
429 for (
int i = 0; i < nvariables; ++i)
431 int noffset = i * ncoeffs;
432 tmpArray = outarray + noffset;
433 m_fields[i]->BwdTrans(tmpArray, outpnt[i]);
445 unsigned int ntotal = inarray.size();
463 unsigned int nvariables =
m_fields.size();
464 unsigned int ntotal = inarray.size();
465 unsigned int npoints = ntotal / nvariables;
467 unsigned int nTotalGlobal = ntotal;
468 m_comm->GetSpaceComm()->AllReduce(nTotalGlobal,
470 unsigned int nTotalDOF = nTotalGlobal / nvariables;
476 for (
int i = 0; i < nvariables; ++i)
478 int offset = i * npoints;
480 Vmath::Dot(npoints, inarray + offset, inarray + offset);
485 for (
int i = 0; i < nvariables; ++i)
490 for (
int i = 2; i < nvariables - 1; ++i)
495 for (
int i = 2; i < nvariables - 1; ++i)
500 for (
int i = 0; i < nvariables; ++i)
506 for (
int i = 0; i < nvariables; ++i)
517 [[maybe_unused]]
const bool &flag)
522 unsigned int ntotal = inarray.size();
524 m_comm->GetSpaceComm()->AllReduce(magninarray,
532 Vmath::Svtvp(ntotal, eps, inarray, 1, solref, 1, solplus, 1);
534 Vmath::Vsub(ntotal, resplus, 1, resref, 1, out, 1);
551 for (
int i = 0; i < nvariables; i++)
577template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
585 if (StdMatDataDBB.size() == 0)
590 int nSpaceDim =
m_graph->GetSpaceDimension();
591 int nvariable = inarray.size();
592 int npoints =
m_fields[0]->GetTotPoints();
593 int nVar2 = nvariable * nvariable;
594 std::shared_ptr<LocalRegions::ExpansionVector> expvect =
596 int nTotElmt = (*expvect).size();
607 for (
int i = 0; i < 3; i++)
611 normal3D[0][0] = 1.0;
612 normal3D[1][1] = 1.0;
613 normal3D[2][2] = 1.0;
619 nvariable - 1, nvariable, 0.0);
656 int nElmtCoefOld = -1;
657 for (
int ne = 0; ne < nTotElmt; ne++)
659 int nElmtCoef = (*expvect)[ne]->GetNcoeffs();
660 int nElmtCoef2 = nElmtCoef * nElmtCoef;
661 int nElmtPnt = (*expvect)[ne]->GetTotPoints();
665 int nQuotPlus = nQuot;
672 if (nElmtPnt > PntJacCons[0].size() || nElmtCoef > nElmtCoefOld)
674 nElmtCoefOld = nElmtCoef;
675 for (
int ndir = 0; ndir < 3; ndir++)
687 PntJacConsStd[ndir] =
689 for (
int i = 0; i < nElmtPnt; i++)
695 for (
int ndir1 = 0; ndir1 <
m_spacedim; ndir1++)
697 PntJacDerv[ndir][ndir1] =
699 PntJacDervStd[ndir][ndir1] =
703 for (
int i = 0; i < nElmtPnt; i++)
705 PntJacDerv[ndir][ndir1][i] =
707 PntJacDervStd[ndir][ndir1][i] =
715 for (
int j = 0; j < nvariable; j++)
717 locVars[j] = inarray[j] + noffset;
722 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
724 normals = normal3D[nFluxDir];
726 wspMat, PntJacCons[nFluxDir]);
732 for (
int j = 0; j < nSpaceDim; j++)
734 for (
int k = 0; k < nvariable; k++)
736 locDerv[j][k] = qfield[j][k] + noffset;
739 locmu = mu + noffset;
740 locDmuDT = DmuDT + noffset;
741 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
743 normals = normal3D[nFluxDir];
745 locDerv, locmu, locDmuDT, normals,
746 wspMatDrv, PntJacCons[nFluxDir]);
752 locmu = mu + noffset;
753 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
756 for (
int nDervDir = 0; nDervDir < nSpaceDim; nDervDir++)
759 nvariable, nElmtPnt, nDervDir, locVars, locmu,
760 normalPnt, wspMatDrv, PntJacDerv[nFluxDir][nDervDir]);
766 for (
int n = 0; n < nvariable; n++)
768 for (
int m = 0; m < nvariable; m++)
770 int nVarOffset = m + n * nvariable;
771 GmatxData = gmtxarray[m][n]->GetBlock(ne, ne)->GetPtr();
773 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
779 for (
int i = 0; i < nElmtPnt; i++)
781 tmppnts[i] = PntJacCons[ndir][i][nVarOffset];
783 (*expvect)[ne]->AlignVectorToCollapsedDir(ndir, tmppnts,
787 Vmath::Vadd(nElmtPnt, ConsCurv[nd], 1, ConsStdd[nd], 1,
794 (*expvect)[ne]->MultiplyByQuadratureMetric(
795 ConsStdd[ndir], ConsStdd[ndir]);
796 for (
int i = 0; i < nElmtPnt; i++)
798 PntJacConsStd[ndir][i][nVarOffset] =
799 DataType(ConsStdd[ndir][i]);
807 for (
int m = 0; m < nvariable; m++)
809 for (
int n = 0; n < nvariable; n++)
811 int nVarOffset = m + n * nvariable;
812 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
814 for (
int ndStd1 = 0; ndStd1 <
m_spacedim; ndStd1++)
816 Vmath::Zero(nElmtPnt, DervStdd[ndStd0][ndStd1], 1);
823 for (
int i = 0; i < nElmtPnt; i++)
826 PntJacDerv[nd0][nd1][i][nVarOffset];
829 (*expvect)[ne]->AlignVectorToCollapsedDir(
830 nd0, tmppnts, ConsCurv);
833 (*expvect)[ne]->AlignVectorToCollapsedDir(
834 nd1, ConsCurv[nd], DervCurv[nd]);
837 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
843 DervCurv[ndStd0][ndStd1], 1,
844 DervStdd[ndStd0][ndStd1], 1,
845 DervStdd[ndStd0][ndStd1], 1);
854 (*expvect)[ne]->MultiplyByQuadratureMetric(
857 for (
int i = 0; i < nElmtPnt; i++)
859 PntJacDervStd[nd0][nd1][i][nVarOffset] =
860 -DataType(DervStdd[nd0][nd1][i]);
872 for (
int i = 0; i < nElmtPnt; i++)
875 &StdMatDataDBB[ne][ndir][i][0], 1,
876 &PntJacConsStd[ndir][i][0], 1, &MatData[0],
887 for (
int i = 0; i < nElmtPnt; i++)
890 &StdMatDataDBDB[ne][nd0][nd1][i][0], 1,
891 &PntJacDervStd[nd0][nd1][i][0], 1,
892 &MatData[0], nElmtCoef2Paded);
900 for (
int n = 0; n < nvariable; n++)
902 for (
int m = 0; m < nvariable; m++)
904 int nVarOffset = m + n * nvariable;
905 GmatxData = gmtxarray[m][n]->GetBlock(ne, ne)->GetPtr();
907 tmpA = MatData + nVarOffset * nElmtCoef2Paded, 1,
914template <
typename DataType>
918 std::shared_ptr<LocalRegions::ExpansionVector> expvect =
920 int nTotElmt = (*expvect).size();
925 vector<DNekMatSharedPtr> VectStdDerivBase0;
926 vector<TensorOfArray3D<DataType>> VectStdDerivBase_Base;
927 vector<TensorOfArray4D<DataType>> VectStdDervBase_DervBase;
931 for (
int ne = 0; ne < nTotElmt; ne++)
934 stdExp = (*expvect)[ne]->GetStdExp();
936 stdExp->DetShapeType(), *stdExp);
937 MatStdDerivBase0 = stdExp->GetStdMatrix(matkey);
939 int nTotStdExp = VectStdDerivBase0.size();
940 int nFoundStdExp = -1;
941 for (
int i = 0; i < nTotStdExp; i++)
943 if ((*VectStdDerivBase0[i]) == (*MatStdDerivBase0))
948 if (nFoundStdExp >= 0)
950 StdMatDataDBB[ne] = VectStdDerivBase_Base[nFoundStdExp];
951 StdMatDataDBDB[ne] = VectStdDervBase_DervBase[nFoundStdExp];
955 int nElmtCoef = (*expvect)[ne]->GetNcoeffs();
956 int nElmtCoef2 = nElmtCoef * nElmtCoef;
957 int nElmtPnt = (*expvect)[ne]->GetTotPoints();
961 int nQuotPlus = nQuot;
968 ArrayStdMat[0] = MatStdDerivBase0;
973 ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
978 stdExp->DetShapeType(),
980 ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
985 ArrayStdMatData[nd0] = ArrayStdMat[nd0]->GetPtr();
989 stdExp->DetShapeType(), *stdExp);
999 for (
int i = 0; i < nElmtPnt; i++)
1002 for (
int nc1 = 0; nc1 < nElmtCoef; nc1++)
1004 int noffset = nc1 * nElmtCoef;
1005 for (
int nc0 = 0; nc0 < nElmtCoef; nc0++)
1007 tmpStdDBB[nd0][i][nc0 + noffset] = DataType(
1008 ArrayStdMatData[nd0][i * nElmtCoef + nc0] *
1009 BwdMatData[i * nElmtCoef + nc1]);
1017 tmpStdDBDB[nd0][nd1] =
1019 for (
int i = 0; i < nElmtPnt; i++)
1021 tmpStdDBDB[nd0][nd1][i] =
1023 for (
int nc1 = 0; nc1 < nElmtCoef; nc1++)
1025 int noffset = nc1 * nElmtCoef;
1026 for (
int nc0 = 0; nc0 < nElmtCoef; nc0++)
1028 tmpStdDBDB[nd0][nd1][i][nc0 + noffset] =
1030 ArrayStdMatData[nd0]
1031 [i * nElmtCoef + nc0] *
1032 ArrayStdMatData[nd1]
1033 [i * nElmtCoef + nc1]);
1039 VectStdDerivBase0.push_back(MatStdDerivBase0);
1040 VectStdDerivBase_Base.push_back(tmpStdDBB);
1041 VectStdDervBase_DervBase.push_back(tmpStdDBDB);
1043 StdMatDataDBB[ne] = tmpStdDBB;
1044 StdMatDataDBDB[ne] = tmpStdDBDB;
1049template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1059 int nvariables = inarray.size();
1063 GetTraceJac(inarray, qfield, TraceJac, TraceJacDeriv, TraceJacDerivSign,
1064 TraceIPSymJacArray);
1073 gmtxarray, tmpJac, tmpSign);
1078template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1081 TypeNekBlkMatSharedPtr &gmtVar,
1082 [[maybe_unused]]
const DataType &tmpDataType)
1084 int n1d = gmtxarray.size();
1085 int n2d = gmtxarray[0].size();
1086 int nConvectiveFields = n1d;
1088 ASSERTL0(n1d == n2d,
"ElmtVarInvMtrx requires n1d==n2d");
1093 gmtxarray[0][0]->GetBlockSizes(rowSizes, colSizes);
1094 int nTotElmt = rowSizes.size();
1095 int nElmtCoef = rowSizes[0] - 1;
1096 int nElmtCoef0 = -1;
1100 TypeNekBlkMatSharedPtr tmpGmtx;
1105 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1107 int nrows = gmtxarray[0][0]->GetBlock(nelmt, nelmt)->GetRows();
1108 int ncols = gmtxarray[0][0]->GetBlock(nelmt, nelmt)->GetColumns();
1109 ASSERTL0(nrows == ncols,
"ElmtVarInvMtrx requires nrows==ncols");
1113 if (nElmtCoef0 != nElmtCoef)
1115 nElmtCoef0 = nElmtCoef;
1116 int nElmtCoefVar = nElmtCoef0 * nConvectiveFields;
1117 blocksize = nElmtCoefVar * nElmtCoefVar;
1118 tmprow[0] = nElmtCoefVar;
1120 GMatData = tmpGmtx->GetBlock(0, 0)->GetPtr();
1123 for (
int n = 0; n < nConvectiveFields; n++)
1125 for (
int m = 0; m < nConvectiveFields; m++)
1127 ElmtMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1129 for (
int ncl = 0; ncl < nElmtCoef; ncl++)
1132 (n * nElmtCoef + ncl) * nConvectiveFields * nElmtCoef +
1134 int Eoffset = ncl * nElmtCoef;
1136 Vmath::Vcopy(nElmtCoef, tmpArray1 = ElmtMatData + Eoffset,
1137 1, tmpArray2 = GMatData + Goffset, 1);
1142 tmpGmtx->GetBlock(0, 0)->Invert();
1144 for (
int m = 0; m < nConvectiveFields; m++)
1146 for (
int n = 0; n < nConvectiveFields; n++)
1148 ElmtMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1150 for (
int ncl = 0; ncl < nElmtCoef; ncl++)
1153 (n * nElmtCoef + ncl) * nConvectiveFields * nElmtCoef +
1155 int Eoffset = ncl * nElmtCoef;
1157 Vmath::Vcopy(nElmtCoef, tmpArray1 = GMatData + Goffset, 1,
1158 tmpArray2 = ElmtMatData + Eoffset, 1);
1162 ElmtMatData = gmtVar->GetBlock(nelmt, nelmt)->GetPtr();
1168template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1177 int nvariables = inarray.size();
1184 TypeNekBlkMatSharedPtr FJac, BJac;
1187 if (TraceJac.size() > 0)
1207 for (
int i = 0; i < nvariables; ++i)
1211 m_fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
1219 TraceIPSymJacArray);
1225template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1227 const int nConvectiveFields,
1234 TypeNekBlkMatSharedPtr &FJac, TypeNekBlkMatSharedPtr &BJac,
1238 int nvariables = nConvectiveFields;
1246 for (
int i = 0; i < nvariables; i++)
1258 for (
int i = 0; i < nvariables; ++i)
1264 fields[0]->GetTraceMap();
1269 for (
int nd = 0; nd < nDim; ++nd)
1273 for (
int i = 0; i < nConvectiveFields; ++i)
1278 fields[i]->GetFwdBwdTracePhys(qfield[nd][i], qFwd[nd][i],
1279 qBwd[nd][i],
true,
true,
false);
1280 TraceMap->GetAssemblyCommDG()->PerformExchange(qFwd[nd][i],
1287 PenaltyFactor2, fields, AdvVel, inarray, time,
1288 qfield, Fwd, Bwd, qFwd, qBwd, MuVarTrace,
1289 nonZeroIndex, numflux);
1291 int nFields = nvariables;
1296 for (
int i = 0; i < nFields; i++)
1305 for (
int i = 0; i < nFields; i++)
1315 for (
int i = 0; i < nFields; i++)
1319 Vmath::Sadd(nTracePts, epsvar, Fwd[i], 1, plusFwd[i], 1);
1323 for (
int i = 0; i < nFields; i++)
1330 x->Apply(FwdBnd, tmpinarry, time);
1334 for (
int j = 0; j < nFields; j++)
1336 m_fields[j]->FillBwdWithBoundCond(plusFwd[j], plusBwd[j]);
1340 PenaltyFactor2, fields, AdvVel, inarray, time,
1341 qfield, plusFwd, plusBwd, qFwd, qBwd, MuVarTrace,
1342 nonZeroIndex, plusflux);
1344 for (
int n = 0; n < nFields; n++)
1346 Vmath::Vsub(nTracePts, plusflux[n], 1, numflux[n], 1, Jacvect[n],
1348 Vmath::Smul(nTracePts, oepsvar, Jacvect[n], 1, Jacvect[n], 1);
1350 for (
int j = 0; j < nTracePts; j++)
1352 tmpMatData = FJac->GetBlock(j, j)->GetPtr();
1353 for (
int n = 0; n < nFields; n++)
1355 tmpMatData[n + i * nFields] = DataType(Jacvect[n][j]);
1365 for (
int i = 0; i < nFields; i++)
1372 x->Apply(FwdBnd, tmpinarry, time);
1376 for (
int i = 0; i < nFields; i++)
1381 for (
int i = 0; i < nFields; i++)
1386 Vmath::Sadd(nTracePts, epsvar, Bwd[i], 1, plusBwd[i], 1);
1388 for (
int j = 0; j < nFields; j++)
1390 m_fields[j]->FillBwdWithBoundCond(Fwd[j], plusBwd[j]);
1394 PenaltyFactor2, fields, AdvVel, inarray, time,
1395 qfield, Fwd, plusBwd, qFwd, qBwd, MuVarTrace,
1396 nonZeroIndex, plusflux);
1398 for (
int n = 0; n < nFields; n++)
1400 Vmath::Vsub(nTracePts, plusflux[n], 1, numflux[n], 1, Jacvect[n],
1402 Vmath::Smul(nTracePts, oepsvar, Jacvect[n], 1, Jacvect[n], 1);
1404 for (
int j = 0; j < nTracePts; j++)
1406 tmpMatData = BJac->GetBlock(j, j)->GetPtr();
1407 for (
int n = 0; n < nFields; n++)
1409 tmpMatData[n + i * nFields] = DataType(Jacvect[n][j]);
1418 const int nConvectiveFields, [[maybe_unused]]
const int nDim,
1419 [[maybe_unused]]
const int nPts,
const int nTracePts,
1420 [[maybe_unused]]
const NekDouble PenaltyFactor2,
1435 auto advWeakDGObject =
1436 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
1439 "Use WeakDG for implicit compressible flow solver!");
1440 advWeakDGObject->AdvectTraceFlux(nConvectiveFields,
m_fields, AdvVel,
1446 for (
int i = 0; i < nConvectiveFields; i++)
1455 for (
int i = 0; i < nConvectiveFields; i++)
1461 m_session->LoadSolverInfo(
"DiffusionType", diffName,
"InteriorPenalty");
1462 if (diffName ==
"InteriorPenalty")
1464 m_diffusion->DiffuseTraceFlux(fields, inarray, qfield,
1466 vFwd, vBwd, nonZeroIndex);
1470 ASSERTL1(
false,
"LDGNS not yet validated for implicit compressible "
1475 for (
int i = 0; i < nConvectiveFields - 1; ++i)
1480 m_diffusion->DiffuseTraceFlux(fields, inarray, qfield,
1482 inFwd, inBwd, nonZeroIndex);
1484 for (
int i = 0; i < nConvectiveFields; i++)
1486 Vmath::Vsub(nTracePts, traceflux[i], 1, visflux[i], 1, traceflux[i],
1521 TraceJacDerivSign, TraceIPSymJacArray);
1536 [[maybe_unused]]
const int nConvectiveFields,
1537 [[maybe_unused]]
const int nElmtPnt,
1549template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1555 std::shared_ptr<LocalRegions::ExpansionVector> pexp = explist->GetExp();
1556 int nTotElmt = (*pexp).size();
1557 int nConvectiveFields =
m_fields.size();
1562 Vmath::Fill(nTotElmt, Negdtlamda, pseudotimefactor, 1);
1565 for (
int m = 0; m < nConvectiveFields; m++)
1567 for (
int n = 0; n < nConvectiveFields; n++)
1569 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1571 GMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1572 DataType factor = DataType(pseudotimefactor[nelmt]);
1585 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1590 explist->GetExp(nelmt)->DetShapeType();
1592 if (tmp.size() != nelmtcoef || (ElmtTypeNow != ElmtTypePrevious))
1595 stdExp = explist->GetExp(nelmt)->GetStdExp();
1597 stdExp->DetShapeType(), *stdExp);
1600 BwdMatData = BwdMat->GetPtr();
1602 if (nelmtcoef != tmp.size())
1606 nelmtcoef, nelmtcoef, 0.0);
1607 MassMatData = MassMat->GetPtr();
1608 MassMatDataDataType =
1612 ElmtTypePrevious = ElmtTypeNow;
1615 for (
int np = 0; np < nelmtcoef; np++)
1617 explist->GetExp(nelmt)->IProductWRTBase(BwdMatData + np * nelmtpnts,
1619 Vmath::Vcopy(nelmtcoef, tmp, 1, tmp2 = MassMatData + np * nelmtcoef,
1622 for (
int i = 0; i < MassMatData.size(); i++)
1624 MassMatDataDataType[i] = DataType(MassMatData[i]);
1627 for (
int m = 0; m < nConvectiveFields; m++)
1629 GMatData = gmtxarray[m][m]->GetBlock(nelmt, nelmt)->GetPtr();
1630 Vmath::Vadd(MassMatData.size(), MassMatDataDataType, 1, GMatData, 1,
1637template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1642 int nFwdBwd, nDiagBlks, nvar0Jac, nvar1Jac;
1646 nFwdBwd = TraceJac.size();
1647 TraceJac[0]->GetBlockSizes(rowSizes, colSizes);
1648 nDiagBlks = rowSizes.size();
1649 nvar0Jac = rowSizes[1] - rowSizes[0];
1650 nvar1Jac = colSizes[1] - colSizes[0];
1652 if (0 == TraceJacArray.size())
1655 for (
int nlr = 0; nlr < nFwdBwd; nlr++)
1658 for (
int m = 0; m < nvar0Jac; m++)
1660 TraceJacArray[nlr][m] =
1662 for (
int n = 0; n < nvar1Jac; n++)
1670 for (
int nlr = 0; nlr < nFwdBwd; nlr++)
1672 const TypeNekBlkMatSharedPtr tmpMat = TraceJac[nlr];
1683 [[maybe_unused]]
const int nDervDir,
1686 [[maybe_unused]]
const int nFluxDir)
1692 [[maybe_unused]]
const int nConvectiveFields,
1693 [[maybe_unused]]
const int nElmtPnt, [[maybe_unused]]
const int nDervDir,
1706 [[maybe_unused]]
const int nDervDir,
1713 const int nConvectiveFields,
const int nElmtPnt,
1720 int matsize = nConvectiveFields * nConvectiveFields;
1724 for (
int npnt = 0; npnt < nElmtPnt; npnt++)
1726 for (
int j = 0; j < nConvectiveFields; j++)
1728 pointVar[j] = locVars[j][npnt];
1733 Vmath::Vcopy(matsize, wspMatData, 1, PntJacArray[npnt], 1);
1742 int nvariables = conservVar.size();
1743 const int nvariables3D = 5;
1747 efix_StegerWarming = 0.0;
1749 if (nvariables > expDim + 2)
1756 fluxJacData = fluxJac->GetPtr();
1758 if (nConvectiveFields == nvariables3D)
1770 PointFJac3DData = PointFJac3D->GetPtr();
1776 index[nvariables - 1] = 4;
1777 for (
int i = 0; i < nvariables - 1; i++)
1784 for (
int j = 0; j < nvariables; j++)
1787 PointFwd[nj] = conservVar[j];
1791 efix_StegerWarming, fsw);
1793 for (
int j = 0; j < nvariables; j++)
1796 for (
int k = 0; k < nvariables; k++)
1799 fluxJacData[j + k * nConvectiveFields] =
1800 PointFJac3DData[nj + nk * nvariables3D];
1806template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1812 BlkMat->GetBlockSizes(rowSizes, colSizes);
1813 int nDiagBlks = rowSizes.size();
1814 int nvar0 = rowSizes[1] - rowSizes[0];
1815 int nvar1 = colSizes[1] - colSizes[0];
1819 for (
int i = 0; i < nDiagBlks; i++)
1821 ElmtMatData = BlkMat->GetBlock(i, i)->GetPtr();
1822 for (
int n = 0; n < nvar1; n++)
1824 int noffset = n * nvar0;
1825 for (
int m = 0; m < nvar0; m++)
1827 MatArray[m][n][i] = ElmtMatData[m + noffset];
1833template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1836 const DataType valu)
1838 int n1d = gmtxarray.size();
1840 for (
int n1 = 0; n1 < n1d; ++n1)
1846template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1850 int n1d = gmtxarray.size();
1857 for (
int n1 = 0; n1 < n1d; ++n1)
1859 gmtxarray[n1]->GetBlockSizes(rowSizes, colSizes);
1860 int nelmts = rowSizes.size();
1862 for (
int i = 0; i < nelmts; ++i)
1864 loc_mat_arr = gmtxarray[n1]->GetBlock(i, i)->GetPtr();
1866 int nrows = gmtxarray[n1]->GetBlock(i, i)->GetRows();
1867 int ncols = gmtxarray[n1]->GetBlock(i, i)->GetColumns();
1885 const int nvariables3D = 5;
1888 NekDouble a, a2, h, h0, v2, vn, eps, eps2;
1891 NekDouble l1, l4, l5, al1, al4, al5, x1, x2, x3, y1;
1892 NekDouble c1, d1, c2, d2, c3, d3, c4, d4, c5, d5;
1909 NekDouble eL = (EL - 0.5 * (rhouL * vx + rhovL * vy + rhowL * vz)) / rhoL;
1911 ps =
m_varConv->Geteos()->GetPressure(rhoL, eL);
1915 v2 = vx * vx + vy * vy + vz * vz;
1916 a2 = gama * ps / ro;
1925 vn = nx * vx + ny * vy + nz * vz;
1926 sn = std::max(
sqrt(nx * nx + ny * ny + nz * nz), sml_ssf);
1940 al1 =
sqrt(l1 * l1 + eps2);
1941 al4 =
sqrt(l4 * l4 + eps2);
1942 al5 =
sqrt(l5 * l5 + eps2);
1944 l1 = 0.5 * (fExactorSplt * l1 + fsw * al1);
1945 l4 = 0.5 * (fExactorSplt * l4 + fsw * al4);
1946 l5 = 0.5 * (fExactorSplt * l5 + fsw * al5);
1948 x1 = 0.5 * (l4 + l5);
1949 x2 = 0.5 * (l4 - l5);
1956 int nVar1 = nvariables3D;
1957 int nVar2 = 2 * nvariables3D;
1958 int nVar3 = 3 * nvariables3D;
1959 int nVar4 = 4 * nvariables3D;
1960 FJacData[nVar0] = c1 * y1 - d1 * vna + l1;
1961 FJacData[nVar1] = -c1 * vx + d1 * nxa;
1962 FJacData[nVar2] = -c1 * vy + d1 * nya;
1963 FJacData[nVar3] = -c1 * vz + d1 * nza;
1964 FJacData[nVar4] = c1;
1965 c2 = c1 * vx + d1 * nxa * ae;
1966 d2 = x3 * nxa + d1 * vx;
1967 FJacData[1 + nVar0] = c2 * y1 - d2 * vna;
1968 FJacData[1 + nVar1] = -c2 * vx + d2 * nxa + l1;
1969 FJacData[1 + nVar2] = -c2 * vy + d2 * nya;
1970 FJacData[1 + nVar3] = -c2 * vz + d2 * nza;
1971 FJacData[1 + nVar4] = c2;
1972 c3 = c1 * vy + d1 * nya * ae;
1973 d3 = x3 * nya + d1 * vy;
1974 FJacData[2 + nVar0] = c3 * y1 - d3 * vna;
1975 FJacData[2 + nVar1] = -c3 * vx + d3 * nxa;
1976 FJacData[2 + nVar2] = -c3 * vy + d3 * nya + l1;
1977 FJacData[2 + nVar3] = -c3 * vz + d3 * nza;
1978 FJacData[2 + nVar4] = c3;
1979 c4 = c1 * vz + d1 * nza * ae;
1980 d4 = x3 * nza + d1 * vz;
1981 FJacData[3 + nVar0] = c4 * y1 - d4 * vna;
1982 FJacData[3 + nVar1] = -c4 * vx + d4 * nxa;
1983 FJacData[3 + nVar2] = -c4 * vy + d4 * nya;
1984 FJacData[3 + nVar3] = -c4 * vz + d4 * nza + l1;
1985 FJacData[3 + nVar4] = c4;
1986 c5 = c1 * h0 + d1 * vna * ae;
1987 d5 = x3 * vna + d1 * h0;
1988 FJacData[4 + nVar0] = c5 * y1 - d5 * vna;
1989 FJacData[4 + nVar1] = -c5 * vx + d5 * nxa;
1990 FJacData[4 + nVar2] = -c5 * vy + d5 * nya;
1991 FJacData[4 + nVar3] = -c5 * vz + d5 * nza;
1992 FJacData[4 + nVar4] = c5 + l1;
#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 WARNINGL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
size_type size() const
Returns the array's size.
bool v_UpdateTimeStepCheck() override
void CalcVolJacStdMat(TensorOfArray4D< DataType > &StdMatDataDBB, TensorOfArray5D< DataType > &StdMatDataDBDB)
void NumCalcRiemFluxJac(const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const Array< OneD, NekDouble > > &AdvVel, const Array< OneD, const Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfield, const NekDouble &time, const Array< OneD, const Array< OneD, NekDouble > > &Fwd, const Array< OneD, const Array< OneD, NekDouble > > &Bwd, TypeNekBlkMatSharedPtr &FJac, TypeNekBlkMatSharedPtr &BJac, TensorOfArray5D< DataType > &TraceIPSymJacArray)
void DoOdeImplicitRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
void AddMatNSBlkDiagVol(const Array< OneD, const Array< OneD, NekDouble > > &inarray, const Array< OneD, const TensorOfArray2D< NekDouble > > &qfield, Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > &gmtxarray, TensorOfArray4D< DataType > &StdMatDataDBB, TensorOfArray5D< DataType > &StdMatDataDBDB)
bool m_flagImplicitItsStatistics
void GetFluxDerivJacDirctnElmt(const int nConvectiveFields, const int nElmtPnt, const int nDervDir, const Array< OneD, const Array< OneD, NekDouble > > &locVars, const Array< OneD, NekDouble > &locmu, const Array< OneD, const Array< OneD, NekDouble > > &locnormal, DNekMatSharedPtr &wspMat, Array< OneD, Array< OneD, NekDouble > > &PntJacArray)
void CalcTraceNumericalFlux(const int nConvectiveFields, const int nDim, const int nPts, const int nTracePts, const NekDouble PenaltyFactor2, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const Array< OneD, NekDouble > > &AdvVel, const Array< OneD, const Array< OneD, NekDouble > > &inarray, const NekDouble time, TensorOfArray3D< NekDouble > &qfield, const Array< OneD, const Array< OneD, NekDouble > > &vFwd, const Array< OneD, const Array< OneD, NekDouble > > &vBwd, const Array< OneD, const TensorOfArray2D< NekDouble > > &qFwd, const Array< OneD, const TensorOfArray2D< NekDouble > > &qBwd, const Array< OneD, NekDouble > &MuVarTrace, Array< OneD, int > &nonZeroIndex, Array< OneD, Array< OneD, NekDouble > > &traceflux)
LibUtilities::NekNonlinSysSharedPtr m_nonlinsol
void DoImplicitSolve(const Array< OneD, const Array< OneD, NekDouble > > &inpnts, Array< OneD, Array< OneD, NekDouble > > &outpnt, const NekDouble time, const NekDouble lambda)
void DoImplicitSolveCoeff(const Array< OneD, const Array< OneD, NekDouble > > &inpnts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out, const NekDouble time, const NekDouble lambda)
void GetFluxVectorJacDirElmt(const int nConvectiveFields, const int nElmtPnt, const Array< OneD, const Array< OneD, NekDouble > > &locVars, const Array< OneD, NekDouble > &normals, DNekMatSharedPtr &wspMat, Array< OneD, Array< OneD, NekDouble > > &PntJacArray)
void ElmtVarInvMtrx(Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > &gmtxarray, TypeNekBlkMatSharedPtr &gmtVar, const DataType &tmpDatatype)
void CalcPreconMatBRJCoeff(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, SNekBlkMatSharedPtr > > &gmtxarray, SNekBlkMatSharedPtr &gmtVar, Array< OneD, SNekBlkMatSharedPtr > &TraceJac, Array< OneD, SNekBlkMatSharedPtr > &TraceJacDeriv, Array< OneD, Array< OneD, NekSingle > > &TraceJacDerivSign, TensorOfArray4D< NekSingle > &TraceJacArray, TensorOfArray4D< NekSingle > &TraceJacDerivArray, TensorOfArray5D< NekSingle > &TraceIPSymJacArray)
virtual void v_MinusDiffusionFluxJacPoint(const int nConvectiveFields, const int nElmtPnt, const Array< OneD, const Array< OneD, NekDouble > > &locVars, const TensorOfArray3D< NekDouble > &locDerv, const Array< OneD, NekDouble > &locmu, const Array< OneD, NekDouble > &locDmuDT, const Array< OneD, NekDouble > &normals, DNekMatSharedPtr &wspMat, Array< OneD, Array< OneD, NekDouble > > &PntJacArray)
void PointFluxJacobianPoint(const Array< OneD, NekDouble > &Fwd, const Array< OneD, NekDouble > &normals, DNekMatSharedPtr &FJac, const NekDouble efix, const NekDouble fsw)
void v_DoSolve() override
Solves an unsteady problem.
NekDouble m_jacobiFreeEps
CFSImplicit(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
void GetTraceJac(const Array< OneD, const Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfield, Array< OneD, TypeNekBlkMatSharedPtr > &TraceJac, Array< OneD, TypeNekBlkMatSharedPtr > &TraceJacDeriv, Array< OneD, Array< OneD, DataType > > &TraceJacDerivSign, TensorOfArray5D< DataType > &TraceIPSymJacArray)
void PreconCoeff(const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const bool &flag)
void MultiplyElmtInvMassPlusSource(Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > &gmtxarray, const NekDouble dtlamda)
void CalcRefValues(const Array< OneD, const NekDouble > &inarray)
void TransTraceJacMatToArray(const Array< OneD, TypeNekBlkMatSharedPtr > &TraceJac, TensorOfArray4D< DataType > &TraceJacDerivArray)
void v_PrintStatusInformation(const int step, const NekDouble cpuTime) override
Print Status Information.
void CalcPhysDeriv(const Array< OneD, const Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfield)
PreconCfsSharedPtr m_preconCfs
void MinusDiffusionFluxJacPoint(const int nConvectiveFields, const int nElmtPnt, const Array< OneD, const Array< OneD, NekDouble > > &locVars, const TensorOfArray3D< NekDouble > &locDerv, const Array< OneD, NekDouble > &locmu, const Array< OneD, NekDouble > &locDmuDT, const Array< OneD, NekDouble > &normals, DNekMatSharedPtr &wspMat, Array< OneD, Array< OneD, NekDouble > > &PntJacArray)
void CalcMuDmuDT(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &mu, Array< OneD, NekDouble > &DmuDT)
void NonlinSysEvaluatorCoeff(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &out)
Array< OneD, Array< OneD, NekDouble > > m_solutionPhys
void DoOdeRhsCoeff(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the right-hand side.
void DoDiffusionCoeff(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, const Array< OneD, NekDouble > > &pFwd, const Array< OneD, const Array< OneD, NekDouble > > &pBwd)
Add the diffusions terms to the right-hand side Similar to DoDiffusion() but with outarray in coeffic...
void AllocateNekBlkMatDig(SNekBlkMatSharedPtr &mat, const Array< OneD, unsigned int > nrow, const Array< OneD, unsigned int > ncol)
virtual void v_GetFluxDerivJacDirctnElmt(const int nConvectiveFields, const int nElmtPnt, const int nDervDir, const Array< OneD, const Array< OneD, NekDouble > > &locVars, const Array< OneD, NekDouble > &locmu, const Array< OneD, const Array< OneD, NekDouble > > &locnormal, DNekMatSharedPtr &wspMat, Array< OneD, Array< OneD, NekDouble > > &PntJacArray)
TensorOfArray4D< NekSingle > m_stdSMatDataDBB
void TranSamesizeBlkDiagMatIntoArray(const TypeNekBlkMatSharedPtr &BlkMat, TensorOfArray3D< DataType > &MatArray)
virtual void v_GetFluxDerivJacDirctn(const MultiRegions::ExpListSharedPtr &explist, const Array< OneD, const Array< OneD, NekDouble > > &normals, const int nDervDir, const Array< OneD, const Array< OneD, NekDouble > > &inarray, TensorOfArray5D< NekDouble > &ElmtJacArray, const int nFluxDir)
void v_PrintSummaryStatistics(const NekDouble intTime) override
Print Summary Statistics.
virtual void v_DoDiffusionCoeff(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, const Array< OneD, NekDouble > > &pFwd, const Array< OneD, const Array< OneD, NekDouble > > &pBwd)
void GetFluxVectorJacPoint(const int nConvectiveFields, const Array< OneD, NekDouble > &conservVar, const Array< OneD, NekDouble > &normals, DNekMatSharedPtr &fluxJac)
bool m_updateShockCaptPhys
TensorOfArray5D< NekSingle > m_stdSMatDataDBDB
void NonlinSysEvaluatorCoeff1D(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out, const bool &flag=true)
void MatrixMultiplyMatrixFreeCoeff(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out, const bool &flag=false)
NekDouble m_TimeIntegLambda
coefff of spacial derivatives(rhs or m_F in GLM) in calculating the residual of the whole equation(us...
void Fill2DArrayOfBlkDiagonalMat(Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > &gmtxarray, const DataType valu)
Array< OneD, NekDouble > m_magnitdEstimat
Estimate the magnitude of each conserved varibles.
void AddMatNSBlkDiagBnd(const Array< OneD, const Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &qfield, TensorOfArray2D< TypeNekBlkMatSharedPtr > &gmtxarray, Array< OneD, TypeNekBlkMatSharedPtr > &TraceJac, Array< OneD, TypeNekBlkMatSharedPtr > &TraceJacDeriv, Array< OneD, Array< OneD, DataType > > &TraceJacDerivSign, TensorOfArray5D< DataType > &TraceIPSymJacArray)
NekDouble m_newtonRelativeIteTol
void Fill1DArrayOfBlkDiagonalMat(Array< OneD, TypeNekBlkMatSharedPtr > &gmtxarray, const DataType valu)
void InitialiseNonlinSysSolver()
void v_InitObject(bool DeclareFields=true) override
Initialization object for CFSImplicit class.
void DoAdvectionCoeff(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const Array< OneD, const Array< OneD, NekDouble > > &pFwd, const Array< OneD, const Array< OneD, NekDouble > > &pBwd)
Compute the advection terms for the right-hand side.
void GetElmtTimeStep(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &tstep)
Calculate the maximum timestep on each element subject to CFL restrictions.
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the projection and call the method for imposing the boundary conditions in case of discontinu...
NekDouble m_bndEvaluateTime
SolverUtils::DiffusionSharedPtr m_diffusion
void v_InitObject(bool DeclareFields=true) override
Initialization object for CompressibleFlowSystem class.
std::vector< CFSBndCondSharedPtr > m_bndConds
VariableConverterSharedPtr m_varConv
std::vector< SolverUtils::ForcingSharedPtr > m_forcing
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
NekDouble m_NonlinIterTolRelativeL2
int m_NekNonlinSysMaxIterations
bool m_NekLinSysLeftPrecon
NekDouble m_LinSysRelativeTolInNonlin
std::string m_LinSysIterSolverTypeInNonlin
bool m_NekLinSysRightPrecon
int m_KrylovMaxHessMatBand
int m_NekLinSysMaxIterations
void DefineNekSysResEval(FuncPointerT func, ObjectPointerT obj)
void DefineNekSysLhsEval(FuncPointerT func, ObjectPointerT obj)
void DefineNekSysPrecon(FuncPointerT func, ObjectPointerT obj)
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
void DefineImplicitSolve(FuncPointerT func, ObjectPointerT obj)
void AccumulateRegion(std::string, int iolevel=0)
Accumulate elapsed time for a region.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void DefineCalcPreconMatBRJCoeff(FuncPointerT func, ObjectPointerT obj)
SolverUtils::AdvectionSharedPtr m_advObject
Advection term.
int m_spacedim
Spatial dimension (>= expansion dim).
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.
SOLVER_UTILS_EXPORT int GetTraceTotPoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
NekDouble m_fintime
Finish time of the simulation.
NekDouble m_lastCheckTime
NekDouble m_checktime
Time between checkpoints.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
enum HomogeneousType m_HomogeneousType
SOLVER_UTILS_EXPORT int GetNpoints()
SOLVER_UTILS_EXPORT int GetNcoeffs()
SOLVER_UTILS_EXPORT int GetPhys_Offset(int n)
SOLVER_UTILS_EXPORT int GetTotPoints()
Base class for unsteady solvers.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
bool m_explicitDiffusion
Indicates if explicit or implicit treatment of diffusion is used.
virtual SOLVER_UTILS_EXPORT void v_PrintSummaryStatistics(const NekDouble intTime)
Print Summary Statistics.
virtual SOLVER_UTILS_EXPORT void v_PrintStatusInformation(const int step, const NekDouble cpuTime)
Print Status Information.
SOLVER_UTILS_EXPORT void v_DoSolve() override
Solves an unsteady problem.
static void Ger(const int &m, const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy, double *a, const int &lda)
BLAS level 2: Matrix vector multiply A = alpha*x*y**T + A where A[m x n].
NekNonlinSysFactory & GetNekNonlinSysFactory()
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< AssemblyMapDG > AssemblyMapDGSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
PreconCfsFactory & GetPreconCfsFactory()
Declaration of the boundary condition factory singleton.
std::shared_ptr< SNekBlkMat > SNekBlkMatSharedPtr
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray
static Array< OneD, Array< OneD, Array< OneD, NekDouble > > > NullNekDoubleTensorOfArray3D
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 Dot(int n, const T *w, const T *x)
dot product
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.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
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)