60 m_session->MatchSolverInfo(
"FLAGIMPLICITITSSTATISTICS",
"True",
69 m_session->LoadParameter(
"AdvectionJacFlag", ntmp, 1);
72 m_session->LoadParameter(
"ViscousJacFlag", ntmp, 1);
85 int ntotal =
m_fields[0]->GetNcoeffs() * nvariables;
88 if (
m_session->DefinesSolverInfo(
"NonlinSysIterSolver"))
94 "NekNonlinSys '" +
SolverType +
"' is not defined.\n");
99 m_session->LoadParameter(
"NekLinSysMaxIterations",
102 m_session->LoadParameter(
"LinSysRelativeTolInNonlin",
106 m_session->MatchSolverInfo(
"GMRESLeftPrecon",
"True",
108 m_session->MatchSolverInfo(
"GMRESRightPrecon",
"True",
110 int GMRESCentralDifference = 0;
111 m_session->LoadParameter(
"GMRESCentralDifference", GMRESCentralDifference,
115 m_session->LoadParameter(
"NekNonlinSysMaxIterations",
117 m_session->LoadParameter(
"NewtonRelativeIteTol",
120 "Please specify NewtonRelativeIteTol instead of "
121 "NewtonAbsoluteIteTol in XML session file");
122 m_session->LoadParameter(
"NonlinIterTolRelativeL2",
124 m_session->LoadSolverInfo(
"LinSysIterSolverTypeInNonlin",
135 const auto locTraceToTraceMap =
m_fields[0]->GetLocTraceToTraceMap();
136 locTraceToTraceMap->CalcLocTracePhysToTraceIDMap(
m_fields[0]->GetTrace(),
138 for (
int i = 1; i < nvariables; i++)
140 m_fields[i]->GetLocTraceToTraceMap()->SetLocTracePhysToTraceIDMap(
141 locTraceToTraceMap->GetLocTracephysToTraceIDMap());
187 cout <<
"-------------------------------------------" << endl
191 <<
"-------------------------------------------" << endl;
200 unsigned int nvariables =
m_fields.size();
201 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
204 for (
int i = 0; i < nvariables; ++i)
206 int offset = i * ncoeffs;
207 in2D[i] = inarray + offset;
208 out2D[i] = out + offset;
222 unsigned int nvariable = inarray.size();
223 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
224 unsigned int npoints =
m_fields[0]->GetNpoints();
228 for (
int i = 0; i < nvariable; ++i)
231 m_fields[i]->BwdTrans(inarray[i], inpnts[i]);
244 for (
int i = 0; i < nvariable; ++i)
251 m_nonlinsol->GetRefSourceVec() + i * ncoeffs, 1, out[i],
261 int nvariables = inarray.size();
262 int ncoeffs =
m_fields[0]->GetNcoeffs();
265 for (
int i = 0; i < nvariables; ++i)
272 for (
int i = 0; i < nvariables; ++i)
274 m_fields[i]->BwdTrans(tmpOut[i], outarray[i]);
287 "Do not use Local Time-Stepping with implicit time-discretization");
291 int nvariables = inarray.size();
308 for (
int i = 0; i < nvariables; ++i)
312 m_fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
323 for (
int i = 0; i < nvariables; ++i)
337 x->ApplyCoeff(
m_fields, inarray, outarray, time);
350 int nvariables = inarray.size();
353 auto advWeakDGObject =
354 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
m_advObject);
356 "Use WeakDG for implicit compressible flow solver!");
357 advWeakDGObject->AdvectCoeffs(nvariables,
m_fields, advVel, inarray,
358 outarray, time, pFwd, pBwd);
379 unsigned int nvariables = inpnts.size();
380 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
381 unsigned int ntotal = nvariables * ncoeffs;
399 for (
int i = 0; i < nvariables; ++i)
401 int noffset = i * ncoeffs;
402 tmpArray = inarray + noffset;
403 m_fields[i]->FwdTrans(tmpIn[i], tmpArray);
411 for (
int i = 0; i < nvariables; ++i)
416 for (
int i = 0; i < nvariables; ++i)
418 int noffset = i * ncoeffs;
419 tmpArray = outarray + noffset;
420 m_fields[i]->BwdTrans(tmpArray, tmpOut[i]);
423 for (
int i = 0; i < nvariables; ++i)
425 m_fields[i]->FwdTrans(tmpOut[i], tmpoutarray[i]);
426 m_fields[i]->GeneralMatrixOp(mkey, tmpoutarray[i], outpnt[i]);
431 for (
int i = 0; i < nvariables; ++i)
433 int noffset = i * ncoeffs;
434 tmpArray = outarray + noffset;
435 m_fields[i]->BwdTrans(tmpArray, outpnt[i]);
448 unsigned int ntotal = inarray.size();
466 unsigned int nvariables =
m_fields.size();
467 unsigned int ntotal = inarray.size();
468 unsigned int npoints = ntotal / nvariables;
470 unsigned int nTotalGlobal = ntotal;
471 m_comm->GetSpaceComm()->AllReduce(nTotalGlobal,
473 unsigned int nTotalDOF = nTotalGlobal / nvariables;
479 for (
int i = 0; i < nvariables; ++i)
481 int offset = i * npoints;
483 Vmath::Dot(npoints, inarray + offset, inarray + offset);
488 for (
int i = 0; i < nvariables; ++i)
493 for (
int i = 2; i < nvariables - 1; ++i)
498 for (
int i = 2; i < nvariables - 1; ++i)
503 for (
int i = 0; i < nvariables; ++i)
509 for (
int i = 0; i < nvariables; ++i)
520 const bool ¢ralDifferenceFlag)
524 unsigned int ntotal = inarray.size();
526 m_comm->GetSpaceComm()->AllReduce(magninarray,
533 Vmath::Svtvp(ntotal, eps, inarray, 1, solref, 1, solplus, 1);
536 if (centralDifferenceFlag)
540 Vmath::Svtvp(ntotal, -1.0 * eps, inarray, 1, solref, 1, solminus, 1);
542 Vmath::Vsub(ntotal, resplus, 1, resminus, 1, out, 1);
550 Vmath::Vsub(ntotal, resplus, 1, resref, 1, out, 1);
568 for (
int i = 0; i < nvariables; i++)
594template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
602 if (StdMatDataDBB.size() == 0)
607 int nSpaceDim =
m_graph->GetSpaceDimension();
608 int nvariable = inarray.size();
609 int npoints =
m_fields[0]->GetTotPoints();
610 int nVar2 = nvariable * nvariable;
611 std::shared_ptr<LocalRegions::ExpansionVector> expvect =
613 int nTotElmt = (*expvect).size();
624 for (
int i = 0; i < 3; i++)
628 normal3D[0][0] = 1.0;
629 normal3D[1][1] = 1.0;
630 normal3D[2][2] = 1.0;
636 nvariable - 1, nvariable, 0.0);
673 int nElmtCoefOld = -1;
674 for (
int ne = 0; ne < nTotElmt; ne++)
676 int nElmtCoef = (*expvect)[ne]->GetNcoeffs();
677 int nElmtCoef2 = nElmtCoef * nElmtCoef;
678 int nElmtPnt = (*expvect)[ne]->GetTotPoints();
682 int nQuotPlus = nQuot;
689 if (nElmtPnt > PntJacCons[0].size() || nElmtCoef > nElmtCoefOld)
691 nElmtCoefOld = nElmtCoef;
692 for (
int ndir = 0; ndir < 3; ndir++)
704 PntJacConsStd[ndir] =
706 for (
int i = 0; i < nElmtPnt; i++)
712 for (
int ndir1 = 0; ndir1 <
m_spacedim; ndir1++)
714 PntJacDerv[ndir][ndir1] =
716 PntJacDervStd[ndir][ndir1] =
720 for (
int i = 0; i < nElmtPnt; i++)
722 PntJacDerv[ndir][ndir1][i] =
724 PntJacDervStd[ndir][ndir1][i] =
732 for (
int j = 0; j < nvariable; j++)
734 locVars[j] = inarray[j] + noffset;
739 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
741 normals = normal3D[nFluxDir];
743 wspMat, PntJacCons[nFluxDir]);
749 for (
int j = 0; j < nSpaceDim; j++)
751 for (
int k = 0; k < nvariable; k++)
753 locDerv[j][k] = qfield[j][k] + noffset;
756 locmu = mu + noffset;
757 locDmuDT = DmuDT + noffset;
758 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
760 normals = normal3D[nFluxDir];
762 locDerv, locmu, locDmuDT, normals,
763 wspMatDrv, PntJacCons[nFluxDir]);
769 locmu = mu + noffset;
770 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
773 for (
int nDervDir = 0; nDervDir < nSpaceDim; nDervDir++)
776 nvariable, nElmtPnt, nDervDir, locVars, locmu,
777 normalPnt, wspMatDrv, PntJacDerv[nFluxDir][nDervDir]);
783 for (
int n = 0; n < nvariable; n++)
785 for (
int m = 0; m < nvariable; m++)
787 int nVarOffset = m + n * nvariable;
788 GmatxData = gmtxarray[m][n]->GetBlock(ne, ne)->GetPtr();
790 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
796 for (
int i = 0; i < nElmtPnt; i++)
798 tmppnts[i] = PntJacCons[ndir][i][nVarOffset];
800 (*expvect)[ne]->AlignVectorToCollapsedDir(ndir, tmppnts,
804 Vmath::Vadd(nElmtPnt, ConsCurv[nd], 1, ConsStdd[nd], 1,
811 (*expvect)[ne]->MultiplyByQuadratureMetric(
812 ConsStdd[ndir], ConsStdd[ndir]);
813 for (
int i = 0; i < nElmtPnt; i++)
815 PntJacConsStd[ndir][i][nVarOffset] =
816 DataType(ConsStdd[ndir][i]);
824 for (
int m = 0; m < nvariable; m++)
826 for (
int n = 0; n < nvariable; n++)
828 int nVarOffset = m + n * nvariable;
829 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
831 for (
int ndStd1 = 0; ndStd1 <
m_spacedim; ndStd1++)
833 Vmath::Zero(nElmtPnt, DervStdd[ndStd0][ndStd1], 1);
840 for (
int i = 0; i < nElmtPnt; i++)
843 PntJacDerv[nd0][nd1][i][nVarOffset];
846 (*expvect)[ne]->AlignVectorToCollapsedDir(
847 nd0, tmppnts, ConsCurv);
850 (*expvect)[ne]->AlignVectorToCollapsedDir(
851 nd1, ConsCurv[nd], DervCurv[nd]);
854 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
860 DervCurv[ndStd0][ndStd1], 1,
861 DervStdd[ndStd0][ndStd1], 1,
862 DervStdd[ndStd0][ndStd1], 1);
871 (*expvect)[ne]->MultiplyByQuadratureMetric(
874 for (
int i = 0; i < nElmtPnt; i++)
876 PntJacDervStd[nd0][nd1][i][nVarOffset] =
877 -DataType(DervStdd[nd0][nd1][i]);
889 for (
int i = 0; i < nElmtPnt; i++)
892 &StdMatDataDBB[ne][ndir][i][0], 1,
893 &PntJacConsStd[ndir][i][0], 1, &MatData[0],
904 for (
int i = 0; i < nElmtPnt; i++)
907 &StdMatDataDBDB[ne][nd0][nd1][i][0], 1,
908 &PntJacDervStd[nd0][nd1][i][0], 1,
909 &MatData[0], nElmtCoef2Paded);
917 for (
int n = 0; n < nvariable; n++)
919 for (
int m = 0; m < nvariable; m++)
921 int nVarOffset = m + n * nvariable;
922 GmatxData = gmtxarray[m][n]->GetBlock(ne, ne)->GetPtr();
924 tmpA = MatData + nVarOffset * nElmtCoef2Paded, 1,
931template <
typename DataType>
935 std::shared_ptr<LocalRegions::ExpansionVector> expvect =
937 int nTotElmt = (*expvect).size();
942 vector<DNekMatSharedPtr> VectStdDerivBase0;
943 vector<TensorOfArray3D<DataType>> VectStdDerivBase_Base;
944 vector<TensorOfArray4D<DataType>> VectStdDervBase_DervBase;
948 for (
int ne = 0; ne < nTotElmt; ne++)
951 stdExp = (*expvect)[ne]->GetStdExp();
953 stdExp->DetShapeType(), *stdExp);
954 MatStdDerivBase0 = stdExp->GetStdMatrix(matkey);
956 int nTotStdExp = VectStdDerivBase0.size();
957 int nFoundStdExp = -1;
958 for (
int i = 0; i < nTotStdExp; i++)
960 if ((*VectStdDerivBase0[i]) == (*MatStdDerivBase0))
965 if (nFoundStdExp >= 0)
967 StdMatDataDBB[ne] = VectStdDerivBase_Base[nFoundStdExp];
968 StdMatDataDBDB[ne] = VectStdDervBase_DervBase[nFoundStdExp];
972 int nElmtCoef = (*expvect)[ne]->GetNcoeffs();
973 int nElmtCoef2 = nElmtCoef * nElmtCoef;
974 int nElmtPnt = (*expvect)[ne]->GetTotPoints();
978 int nQuotPlus = nQuot;
985 ArrayStdMat[0] = MatStdDerivBase0;
990 ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
995 stdExp->DetShapeType(),
997 ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
1002 ArrayStdMatData[nd0] = ArrayStdMat[nd0]->GetPtr();
1006 stdExp->DetShapeType(), *stdExp);
1016 for (
int i = 0; i < nElmtPnt; i++)
1019 for (
int nc1 = 0; nc1 < nElmtCoef; nc1++)
1021 int noffset = nc1 * nElmtCoef;
1022 for (
int nc0 = 0; nc0 < nElmtCoef; nc0++)
1024 tmpStdDBB[nd0][i][nc0 + noffset] = DataType(
1025 ArrayStdMatData[nd0][i * nElmtCoef + nc0] *
1026 BwdMatData[i * nElmtCoef + nc1]);
1034 tmpStdDBDB[nd0][nd1] =
1036 for (
int i = 0; i < nElmtPnt; i++)
1038 tmpStdDBDB[nd0][nd1][i] =
1040 for (
int nc1 = 0; nc1 < nElmtCoef; nc1++)
1042 int noffset = nc1 * nElmtCoef;
1043 for (
int nc0 = 0; nc0 < nElmtCoef; nc0++)
1045 tmpStdDBDB[nd0][nd1][i][nc0 + noffset] =
1047 ArrayStdMatData[nd0]
1048 [i * nElmtCoef + nc0] *
1049 ArrayStdMatData[nd1]
1050 [i * nElmtCoef + nc1]);
1056 VectStdDerivBase0.push_back(MatStdDerivBase0);
1057 VectStdDerivBase_Base.push_back(tmpStdDBB);
1058 VectStdDervBase_DervBase.push_back(tmpStdDBDB);
1060 StdMatDataDBB[ne] = tmpStdDBB;
1061 StdMatDataDBDB[ne] = tmpStdDBDB;
1066template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1076 int nvariables = inarray.size();
1080 GetTraceJac(inarray, qfield, TraceJac, TraceJacDeriv, TraceJacDerivSign,
1081 TraceIPSymJacArray);
1090 gmtxarray, tmpJac, tmpSign);
1095template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1098 TypeNekBlkMatSharedPtr &gmtVar,
1099 [[maybe_unused]]
const DataType &tmpDataType)
1101 int n1d = gmtxarray.size();
1102 int n2d = gmtxarray[0].size();
1103 int nConvectiveFields = n1d;
1105 ASSERTL0(n1d == n2d,
"ElmtVarInvMtrx requires n1d==n2d");
1110 gmtxarray[0][0]->GetBlockSizes(rowSizes, colSizes);
1111 int nTotElmt = rowSizes.size();
1112 int nElmtCoef = rowSizes[0] - 1;
1113 int nElmtCoef0 = -1;
1117 TypeNekBlkMatSharedPtr tmpGmtx;
1122 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1124 int nrows = gmtxarray[0][0]->GetBlock(nelmt, nelmt)->GetRows();
1125 int ncols = gmtxarray[0][0]->GetBlock(nelmt, nelmt)->GetColumns();
1126 ASSERTL0(nrows == ncols,
"ElmtVarInvMtrx requires nrows==ncols");
1130 if (nElmtCoef0 != nElmtCoef)
1132 nElmtCoef0 = nElmtCoef;
1133 int nElmtCoefVar = nElmtCoef0 * nConvectiveFields;
1134 blocksize = nElmtCoefVar * nElmtCoefVar;
1135 tmprow[0] = nElmtCoefVar;
1137 GMatData = tmpGmtx->GetBlock(0, 0)->GetPtr();
1140 for (
int n = 0; n < nConvectiveFields; n++)
1142 for (
int m = 0; m < nConvectiveFields; m++)
1144 ElmtMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1146 for (
int ncl = 0; ncl < nElmtCoef; ncl++)
1149 (n * nElmtCoef + ncl) * nConvectiveFields * nElmtCoef +
1151 int Eoffset = ncl * nElmtCoef;
1153 Vmath::Vcopy(nElmtCoef, tmpArray1 = ElmtMatData + Eoffset,
1154 1, tmpArray2 = GMatData + Goffset, 1);
1159 tmpGmtx->GetBlock(0, 0)->Invert();
1161 for (
int m = 0; m < nConvectiveFields; m++)
1163 for (
int n = 0; n < nConvectiveFields; n++)
1165 ElmtMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1167 for (
int ncl = 0; ncl < nElmtCoef; ncl++)
1170 (n * nElmtCoef + ncl) * nConvectiveFields * nElmtCoef +
1172 int Eoffset = ncl * nElmtCoef;
1174 Vmath::Vcopy(nElmtCoef, tmpArray1 = GMatData + Goffset, 1,
1175 tmpArray2 = ElmtMatData + Eoffset, 1);
1179 ElmtMatData = gmtVar->GetBlock(nelmt, nelmt)->GetPtr();
1185template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1194 int nvariables = inarray.size();
1201 TypeNekBlkMatSharedPtr FJac, BJac;
1204 if (TraceJac.size() > 0)
1224 for (
int i = 0; i < nvariables; ++i)
1228 m_fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
1236 TraceIPSymJacArray);
1242template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1244 const int nConvectiveFields,
1251 TypeNekBlkMatSharedPtr &FJac, TypeNekBlkMatSharedPtr &BJac,
1255 int nvariables = nConvectiveFields;
1263 for (
int i = 0; i < nvariables; i++)
1275 for (
int i = 0; i < nvariables; ++i)
1281 fields[0]->GetTraceMap();
1286 for (
int nd = 0; nd < nDim; ++nd)
1290 for (
int i = 0; i < nConvectiveFields; ++i)
1295 fields[i]->GetFwdBwdTracePhys(qfield[nd][i], qFwd[nd][i],
1296 qBwd[nd][i],
true,
true,
false);
1297 TraceMap->GetAssemblyCommDG()->PerformExchange(qFwd[nd][i],
1304 PenaltyFactor2, fields, AdvVel, inarray, time,
1305 qfield, Fwd, Bwd, qFwd, qBwd, MuVarTrace,
1306 nonZeroIndex, numflux);
1308 int nFields = nvariables;
1313 for (
int i = 0; i < nFields; i++)
1322 for (
int i = 0; i < nFields; i++)
1332 for (
int i = 0; i < nFields; i++)
1336 Vmath::Sadd(nTracePts, epsvar, Fwd[i], 1, plusFwd[i], 1);
1340 for (
int i = 0; i < nFields; i++)
1347 x->Apply(FwdBnd, tmpinarry, time);
1351 for (
int j = 0; j < nFields; j++)
1353 m_fields[j]->FillBwdWithBoundCond(plusFwd[j], plusBwd[j]);
1357 PenaltyFactor2, fields, AdvVel, inarray, time,
1358 qfield, plusFwd, plusBwd, qFwd, qBwd, MuVarTrace,
1359 nonZeroIndex, plusflux);
1361 for (
int n = 0; n < nFields; n++)
1363 Vmath::Vsub(nTracePts, plusflux[n], 1, numflux[n], 1, Jacvect[n],
1365 Vmath::Smul(nTracePts, oepsvar, Jacvect[n], 1, Jacvect[n], 1);
1367 for (
int j = 0; j < nTracePts; j++)
1369 tmpMatData = FJac->GetBlock(j, j)->GetPtr();
1370 for (
int n = 0; n < nFields; n++)
1372 tmpMatData[n + i * nFields] = DataType(Jacvect[n][j]);
1382 for (
int i = 0; i < nFields; i++)
1389 x->Apply(FwdBnd, tmpinarry, time);
1393 for (
int i = 0; i < nFields; i++)
1398 for (
int i = 0; i < nFields; i++)
1403 Vmath::Sadd(nTracePts, epsvar, Bwd[i], 1, plusBwd[i], 1);
1405 for (
int j = 0; j < nFields; j++)
1407 m_fields[j]->FillBwdWithBoundCond(Fwd[j], plusBwd[j]);
1411 PenaltyFactor2, fields, AdvVel, inarray, time,
1412 qfield, Fwd, plusBwd, qFwd, qBwd, MuVarTrace,
1413 nonZeroIndex, plusflux);
1415 for (
int n = 0; n < nFields; n++)
1417 Vmath::Vsub(nTracePts, plusflux[n], 1, numflux[n], 1, Jacvect[n],
1419 Vmath::Smul(nTracePts, oepsvar, Jacvect[n], 1, Jacvect[n], 1);
1421 for (
int j = 0; j < nTracePts; j++)
1423 tmpMatData = BJac->GetBlock(j, j)->GetPtr();
1424 for (
int n = 0; n < nFields; n++)
1426 tmpMatData[n + i * nFields] = DataType(Jacvect[n][j]);
1435 const int nConvectiveFields, [[maybe_unused]]
const int nDim,
1436 [[maybe_unused]]
const int nPts,
const int nTracePts,
1437 [[maybe_unused]]
const NekDouble PenaltyFactor2,
1452 auto advWeakDGObject =
1453 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
1456 "Use WeakDG for implicit compressible flow solver!");
1457 advWeakDGObject->AdvectTraceFlux(nConvectiveFields,
m_fields, AdvVel,
1463 for (
int i = 0; i < nConvectiveFields; i++)
1472 for (
int i = 0; i < nConvectiveFields; i++)
1478 m_session->LoadSolverInfo(
"DiffusionType", diffName,
"InteriorPenalty");
1479 if (diffName ==
"InteriorPenalty")
1481 m_diffusion->DiffuseTraceFlux(fields, inarray, qfield,
1483 vFwd, vBwd, nonZeroIndex);
1487 ASSERTL1(
false,
"LDGNS not yet validated for implicit compressible "
1492 for (
int i = 0; i < nConvectiveFields - 1; ++i)
1497 m_diffusion->DiffuseTraceFlux(fields, inarray, qfield,
1499 inFwd, inBwd, nonZeroIndex);
1501 for (
int i = 0; i < nConvectiveFields; i++)
1503 Vmath::Vsub(nTracePts, traceflux[i], 1, visflux[i], 1, traceflux[i],
1538 TraceJacDerivSign, TraceIPSymJacArray);
1553 [[maybe_unused]]
const int nConvectiveFields,
1554 [[maybe_unused]]
const int nElmtPnt,
1566template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1572 std::shared_ptr<LocalRegions::ExpansionVector> pexp = explist->GetExp();
1573 int nTotElmt = (*pexp).size();
1574 int nConvectiveFields =
m_fields.size();
1579 Vmath::Fill(nTotElmt, Negdtlamda, pseudotimefactor, 1);
1582 for (
int m = 0; m < nConvectiveFields; m++)
1584 for (
int n = 0; n < nConvectiveFields; n++)
1586 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1588 GMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1589 DataType factor = DataType(pseudotimefactor[nelmt]);
1602 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1607 explist->GetExp(nelmt)->DetShapeType();
1609 if (tmp.size() != nelmtcoef || (ElmtTypeNow != ElmtTypePrevious))
1612 stdExp = explist->GetExp(nelmt)->GetStdExp();
1614 stdExp->DetShapeType(), *stdExp);
1617 BwdMatData = BwdMat->GetPtr();
1619 if (nelmtcoef != tmp.size())
1623 nelmtcoef, nelmtcoef, 0.0);
1624 MassMatData = MassMat->GetPtr();
1625 MassMatDataDataType =
1629 ElmtTypePrevious = ElmtTypeNow;
1632 for (
int np = 0; np < nelmtcoef; np++)
1634 explist->GetExp(nelmt)->IProductWRTBase(BwdMatData + np * nelmtpnts,
1636 Vmath::Vcopy(nelmtcoef, tmp, 1, tmp2 = MassMatData + np * nelmtcoef,
1639 for (
int i = 0; i < MassMatData.size(); i++)
1641 MassMatDataDataType[i] = DataType(MassMatData[i]);
1644 for (
int m = 0; m < nConvectiveFields; m++)
1646 GMatData = gmtxarray[m][m]->GetBlock(nelmt, nelmt)->GetPtr();
1647 Vmath::Vadd(MassMatData.size(), MassMatDataDataType, 1, GMatData, 1,
1654template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1659 int nFwdBwd, nDiagBlks, nvar0Jac, nvar1Jac;
1663 nFwdBwd = TraceJac.size();
1664 TraceJac[0]->GetBlockSizes(rowSizes, colSizes);
1665 nDiagBlks = rowSizes.size();
1666 nvar0Jac = rowSizes[1] - rowSizes[0];
1667 nvar1Jac = colSizes[1] - colSizes[0];
1669 if (0 == TraceJacArray.size())
1672 for (
int nlr = 0; nlr < nFwdBwd; nlr++)
1675 for (
int m = 0; m < nvar0Jac; m++)
1677 TraceJacArray[nlr][m] =
1679 for (
int n = 0; n < nvar1Jac; n++)
1687 for (
int nlr = 0; nlr < nFwdBwd; nlr++)
1689 const TypeNekBlkMatSharedPtr tmpMat = TraceJac[nlr];
1700 [[maybe_unused]]
const int nDervDir,
1703 [[maybe_unused]]
const int nFluxDir)
1709 [[maybe_unused]]
const int nConvectiveFields,
1710 [[maybe_unused]]
const int nElmtPnt, [[maybe_unused]]
const int nDervDir,
1723 [[maybe_unused]]
const int nDervDir,
1730 const int nConvectiveFields,
const int nElmtPnt,
1737 int matsize = nConvectiveFields * nConvectiveFields;
1741 for (
int npnt = 0; npnt < nElmtPnt; npnt++)
1743 for (
int j = 0; j < nConvectiveFields; j++)
1745 pointVar[j] = locVars[j][npnt];
1750 Vmath::Vcopy(matsize, wspMatData, 1, PntJacArray[npnt], 1);
1759 int nvariables = conservVar.size();
1760 const int nvariables3D = 5;
1764 efix_StegerWarming = 0.0;
1766 if (nvariables > expDim + 2)
1773 fluxJacData = fluxJac->GetPtr();
1775 if (nConvectiveFields == nvariables3D)
1787 PointFJac3DData = PointFJac3D->GetPtr();
1793 index[nvariables - 1] = 4;
1794 for (
int i = 0; i < nvariables - 1; i++)
1801 for (
int j = 0; j < nvariables; j++)
1804 PointFwd[nj] = conservVar[j];
1808 efix_StegerWarming, fsw);
1810 for (
int j = 0; j < nvariables; j++)
1813 for (
int k = 0; k < nvariables; k++)
1816 fluxJacData[j + k * nConvectiveFields] =
1817 PointFJac3DData[nj + nk * nvariables3D];
1823template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1829 BlkMat->GetBlockSizes(rowSizes, colSizes);
1830 int nDiagBlks = rowSizes.size();
1831 int nvar0 = rowSizes[1] - rowSizes[0];
1832 int nvar1 = colSizes[1] - colSizes[0];
1836 for (
int i = 0; i < nDiagBlks; i++)
1838 ElmtMatData = BlkMat->GetBlock(i, i)->GetPtr();
1839 for (
int n = 0; n < nvar1; n++)
1841 int noffset = n * nvar0;
1842 for (
int m = 0; m < nvar0; m++)
1844 MatArray[m][n][i] = ElmtMatData[m + noffset];
1850template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1853 const DataType valu)
1855 int n1d = gmtxarray.size();
1857 for (
int n1 = 0; n1 < n1d; ++n1)
1863template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1867 int n1d = gmtxarray.size();
1874 for (
int n1 = 0; n1 < n1d; ++n1)
1876 gmtxarray[n1]->GetBlockSizes(rowSizes, colSizes);
1877 int nelmts = rowSizes.size();
1879 for (
int i = 0; i < nelmts; ++i)
1881 loc_mat_arr = gmtxarray[n1]->GetBlock(i, i)->GetPtr();
1883 int nrows = gmtxarray[n1]->GetBlock(i, i)->GetRows();
1884 int ncols = gmtxarray[n1]->GetBlock(i, i)->GetColumns();
1902 const int nvariables3D = 5;
1905 NekDouble a, a2, h, h0, v2, vn, eps, eps2;
1908 NekDouble l1, l4, l5, al1, al4, al5, x1, x2, x3, y1;
1909 NekDouble c1, d1, c2, d2, c3, d3, c4, d4, c5, d5;
1926 NekDouble eL = (EL - 0.5 * (rhouL * vx + rhovL * vy + rhowL * vz)) / rhoL;
1928 ps =
m_varConv->Geteos()->GetPressure(rhoL, eL);
1932 v2 = vx * vx + vy * vy + vz * vz;
1933 a2 = gama * ps / ro;
1942 vn = nx * vx + ny * vy + nz * vz;
1943 sn = std::max(
sqrt(nx * nx + ny * ny + nz * nz), sml_ssf);
1957 al1 =
sqrt(l1 * l1 + eps2);
1958 al4 =
sqrt(l4 * l4 + eps2);
1959 al5 =
sqrt(l5 * l5 + eps2);
1961 l1 = 0.5 * (fExactorSplt * l1 + fsw * al1);
1962 l4 = 0.5 * (fExactorSplt * l4 + fsw * al4);
1963 l5 = 0.5 * (fExactorSplt * l5 + fsw * al5);
1965 x1 = 0.5 * (l4 + l5);
1966 x2 = 0.5 * (l4 - l5);
1973 int nVar1 = nvariables3D;
1974 int nVar2 = 2 * nvariables3D;
1975 int nVar3 = 3 * nvariables3D;
1976 int nVar4 = 4 * nvariables3D;
1977 FJacData[nVar0] = c1 * y1 - d1 * vna + l1;
1978 FJacData[nVar1] = -c1 * vx + d1 * nxa;
1979 FJacData[nVar2] = -c1 * vy + d1 * nya;
1980 FJacData[nVar3] = -c1 * vz + d1 * nza;
1981 FJacData[nVar4] = c1;
1982 c2 = c1 * vx + d1 * nxa * ae;
1983 d2 = x3 * nxa + d1 * vx;
1984 FJacData[1 + nVar0] = c2 * y1 - d2 * vna;
1985 FJacData[1 + nVar1] = -c2 * vx + d2 * nxa + l1;
1986 FJacData[1 + nVar2] = -c2 * vy + d2 * nya;
1987 FJacData[1 + nVar3] = -c2 * vz + d2 * nza;
1988 FJacData[1 + nVar4] = c2;
1989 c3 = c1 * vy + d1 * nya * ae;
1990 d3 = x3 * nya + d1 * vy;
1991 FJacData[2 + nVar0] = c3 * y1 - d3 * vna;
1992 FJacData[2 + nVar1] = -c3 * vx + d3 * nxa;
1993 FJacData[2 + nVar2] = -c3 * vy + d3 * nya + l1;
1994 FJacData[2 + nVar3] = -c3 * vz + d3 * nza;
1995 FJacData[2 + nVar4] = c3;
1996 c4 = c1 * vz + d1 * nza * ae;
1997 d4 = x3 * nza + d1 * vz;
1998 FJacData[3 + nVar0] = c4 * y1 - d4 * vna;
1999 FJacData[3 + nVar1] = -c4 * vx + d4 * nxa;
2000 FJacData[3 + nVar2] = -c4 * vy + d4 * nya;
2001 FJacData[3 + nVar3] = -c4 * vz + d4 * nza + l1;
2002 FJacData[3 + nVar4] = c4;
2003 c5 = c1 * h0 + d1 * vna * ae;
2004 d5 = x3 * vna + d1 * h0;
2005 FJacData[4 + nVar0] = c5 * y1 - d5 * vna;
2006 FJacData[4 + nVar1] = -c5 * vx + d5 * nxa;
2007 FJacData[4 + nVar2] = -c5 * vy + d5 * nya;
2008 FJacData[4 + nVar3] = -c5 * vz + d5 * nza;
2009 FJacData[4 + nVar4] = c5 + l1;
2025 fields[0]->GetGraph()->GetMovement()->SetImplicitALEFlag(
2033 for (
int i = 0; i < spaceDim; ++i)
#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 NonlinSysEvaluatorCoeff(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &out, const bool &flag)
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)
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 NonlinSysEvaluatorCoeff1D(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out, const bool &flag)
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)
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)
void v_ALEInitObject(int spaceDim, Array< OneD, MultiRegions::ExpListSharedPtr > &fields) override
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
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)
void MatrixMultiplyMatrixFreeCoeff(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out, const bool ¢ralDifferenceFlag)
LibUtilities::NekNonlinSysIterSharedPtr m_nonlinsol
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 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_NekNonLinSysTolerance
NekDouble m_NonlinIterTolRelativeL2
int m_NekNonlinSysMaxIterations
NekDouble m_NekLinSysTolerance
bool m_NekLinSysLeftPrecon
bool m_GMRESCentralDifference
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.
Describes a matrix with ordering defined by a local to global map.
void DefineCalcPreconMatBRJCoeff(FuncPointerT func, ObjectPointerT obj)
Array< OneD, MultiRegions::ExpListSharedPtr > m_fieldsALE
SOLVER_UTILS_EXPORT void InitObject(int spaceDim, Array< OneD, MultiRegions::ExpListSharedPtr > &fields)
Array< OneD, Array< OneD, NekDouble > > m_gridVelocityTrace
SOLVER_UTILS_EXPORT void ALEDoElmtInvMassBwdTrans(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Array< OneD, Array< OneD, NekDouble > > m_gridVelocity
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].
NekNonlinSysIterFactory & GetNekNonlinSysIterFactory()
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< AssemblyMapDG > AssemblyMapDGSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
static const NekDouble kNekMachineEpsilon
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)