59 m_session->MatchSolverInfo(
"FLAGIMPLICITITSSTATISTICS",
"True",
68 m_session->LoadParameter(
"AdvectionJacFlag", ntmp, 1);
71 m_session->LoadParameter(
"ViscousJacFlag", ntmp, 1);
84 int ntotal =
m_fields[0]->GetNcoeffs() * nvariables;
87 if (
m_session->DefinesSolverInfo(
"NonlinSysIterSolver"))
93 "NekNonlinSys '" +
SolverType +
"' is not defined.\n");
98 m_session->LoadParameter(
"NekLinSysMaxIterations",
101 m_session->LoadParameter(
"LinSysRelativeTolInNonlin",
105 m_session->MatchSolverInfo(
"GMRESLeftPrecon",
"True",
107 m_session->MatchSolverInfo(
"GMRESRightPrecon",
"True",
109 int GMRESCentralDifference = 0;
110 m_session->LoadParameter(
"GMRESCentralDifference", GMRESCentralDifference,
114 m_session->LoadParameter(
"NekNonlinSysMaxIterations",
116 m_session->LoadParameter(
"NewtonRelativeIteTol",
119 "Please specify NewtonRelativeIteTol instead of "
120 "NewtonAbsoluteIteTol in XML session file");
121 m_session->LoadParameter(
"NonlinIterTolRelativeL2",
123 m_session->LoadSolverInfo(
"LinSysIterSolverTypeInNonlin",
134 const auto locTraceToTraceMap =
m_fields[0]->GetLocTraceToTraceMap();
135 locTraceToTraceMap->CalcLocTracePhysToTraceIDMap(
m_fields[0]->GetTrace(),
137 for (
int i = 1; i < nvariables; i++)
139 m_fields[i]->GetLocTraceToTraceMap()->SetLocTracePhysToTraceIDMap(
140 locTraceToTraceMap->GetLocTracephysToTraceIDMap());
186 std::cout <<
"-------------------------------------------" << std::endl
189 <<
"Total Linear Its : " <<
m_TotLinIts << std::endl
190 <<
"-------------------------------------------" << std::endl;
199 unsigned int nvariables =
m_fields.size();
200 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
203 for (
int i = 0; i < nvariables; ++i)
205 int offset = i * ncoeffs;
206 in2D[i] = inarray + offset;
207 out2D[i] = out + offset;
221 unsigned int nvariable = inarray.size();
222 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
223 unsigned int npoints =
m_fields[0]->GetNpoints();
227 for (
int i = 0; i < nvariable; ++i)
230 m_fields[i]->BwdTrans(inarray[i], inpnts[i]);
243 for (
int i = 0; i < nvariable; ++i)
250 m_nonlinsol->GetRefSourceVec() + i * ncoeffs, 1, out[i],
260 int nvariables = inarray.size();
261 int ncoeffs =
m_fields[0]->GetNcoeffs();
264 for (
int i = 0; i < nvariables; ++i)
271 for (
int i = 0; i < nvariables; ++i)
273 m_fields[i]->BwdTrans(tmpOut[i], outarray[i]);
286 "Do not use Local Time-Stepping with implicit time-discretization");
290 int nvariables = inarray.size();
307 for (
int i = 0; i < nvariables; ++i)
311 m_fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
314 if (
m_fields[0]->GetGraph()->GetMovement()->GetSectorRotateFlag())
326 for (
int i = 0; i < nvariables; ++i)
340 x->ApplyCoeff(
m_fields, inarray, outarray, time);
353 int nvariables = inarray.size();
356 auto advWeakDGObject =
357 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
m_advObject);
359 "Use WeakDG for implicit compressible flow solver!");
360 advWeakDGObject->AdvectCoeffs(nvariables,
m_fields, advVel, inarray,
361 outarray, time, pFwd, pBwd);
382 unsigned int nvariables = inpnts.size();
383 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
384 unsigned int ntotal = nvariables * ncoeffs;
405 for (
int i = 0; i < nvariables; ++i)
407 int noffset = i * ncoeffs;
408 tmpArray = inarray + noffset;
409 m_fields[i]->FwdTrans(tmpIn[i], tmpArray);
417 for (
int i = 0; i < nvariables; ++i)
422 for (
int i = 0; i < nvariables; ++i)
424 int noffset = i * ncoeffs;
425 tmpArray = outarray + noffset;
426 m_fields[i]->BwdTrans(tmpArray, tmpOut[i]);
429 for (
int i = 0; i < nvariables; ++i)
431 m_fields[i]->FwdTrans(tmpOut[i], tmpoutarray[i]);
432 m_fields[i]->GeneralMatrixOp(mkey, tmpoutarray[i], outpnt[i]);
437 for (
int i = 0; i < nvariables; ++i)
439 int noffset = i * ncoeffs;
440 tmpArray = outarray + noffset;
441 m_fields[i]->BwdTrans(tmpArray, outpnt[i]);
454 unsigned int ntotal = inarray.size();
472 unsigned int nvariables =
m_fields.size();
473 unsigned int ntotal = inarray.size();
474 unsigned int npoints = ntotal / nvariables;
476 unsigned int nTotalGlobal = ntotal;
477 m_comm->GetSpaceComm()->AllReduce(nTotalGlobal,
479 unsigned int nTotalDOF = nTotalGlobal / nvariables;
485 for (
int i = 0; i < nvariables; ++i)
487 int offset = i * npoints;
489 Vmath::Dot(npoints, inarray + offset, inarray + offset);
494 for (
int i = 0; i < nvariables; ++i)
499 for (
int i = 2; i < nvariables - 1; ++i)
504 for (
int i = 2; i < nvariables - 1; ++i)
509 for (
int i = 0; i < nvariables; ++i)
515 for (
int i = 0; i < nvariables; ++i)
517 std::cout <<
"m_magnitdEstimat[" << i
520 std::cout <<
"m_inArrayNorm = " <<
m_inArrayNorm << std::endl;
526 const bool ¢ralDifferenceFlag)
530 unsigned int ntotal = inarray.size();
532 m_comm->GetSpaceComm()->AllReduce(magninarray,
539 Vmath::Svtvp(ntotal, eps, inarray, 1, solref, 1, solplus, 1);
542 if (centralDifferenceFlag)
546 Vmath::Svtvp(ntotal, -1.0 * eps, inarray, 1, solref, 1, solminus, 1);
548 Vmath::Vsub(ntotal, resplus, 1, resminus, 1, out, 1);
556 Vmath::Vsub(ntotal, resplus, 1, resref, 1, out, 1);
574 for (
int i = 0; i < nvariables; i++)
600template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
608 if (StdMatDataDBB.size() == 0)
613 int nSpaceDim =
m_graph->GetSpaceDimension();
614 int nvariable = inarray.size();
615 int npoints =
m_fields[0]->GetTotPoints();
616 int nVar2 = nvariable * nvariable;
617 std::shared_ptr<LocalRegions::ExpansionVector> expvect =
619 int nTotElmt = (*expvect).size();
630 for (
int i = 0; i < 3; i++)
634 normal3D[0][0] = 1.0;
635 normal3D[1][1] = 1.0;
636 normal3D[2][2] = 1.0;
642 nvariable - 1, nvariable, 0.0);
679 int nElmtCoefOld = -1;
680 for (
int ne = 0; ne < nTotElmt; ne++)
682 int nElmtCoef = (*expvect)[ne]->GetNcoeffs();
683 int nElmtCoef2 = nElmtCoef * nElmtCoef;
684 int nElmtPnt = (*expvect)[ne]->GetTotPoints();
688 int nQuotPlus = nQuot;
695 if (nElmtPnt > PntJacCons[0].size() || nElmtCoef > nElmtCoefOld)
697 nElmtCoefOld = nElmtCoef;
698 for (
int ndir = 0; ndir < 3; ndir++)
710 PntJacConsStd[ndir] =
712 for (
int i = 0; i < nElmtPnt; i++)
718 for (
int ndir1 = 0; ndir1 <
m_spacedim; ndir1++)
720 PntJacDerv[ndir][ndir1] =
722 PntJacDervStd[ndir][ndir1] =
726 for (
int i = 0; i < nElmtPnt; i++)
728 PntJacDerv[ndir][ndir1][i] =
730 PntJacDervStd[ndir][ndir1][i] =
738 for (
int j = 0; j < nvariable; j++)
740 locVars[j] = inarray[j] + noffset;
745 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
747 normals = normal3D[nFluxDir];
749 wspMat, PntJacCons[nFluxDir]);
755 for (
int j = 0; j < nSpaceDim; j++)
757 for (
int k = 0; k < nvariable; k++)
759 locDerv[j][k] = qfield[j][k] + noffset;
762 locmu = mu + noffset;
763 locDmuDT = DmuDT + noffset;
764 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
766 normals = normal3D[nFluxDir];
768 locDerv, locmu, locDmuDT, normals,
769 wspMatDrv, PntJacCons[nFluxDir]);
775 locmu = mu + noffset;
776 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
779 for (
int nDervDir = 0; nDervDir < nSpaceDim; nDervDir++)
782 nvariable, nElmtPnt, nDervDir, locVars, locmu,
783 normalPnt, wspMatDrv, PntJacDerv[nFluxDir][nDervDir]);
789 for (
int n = 0; n < nvariable; n++)
791 for (
int m = 0; m < nvariable; m++)
793 int nVarOffset = m + n * nvariable;
794 GmatxData = gmtxarray[m][n]->GetBlock(ne, ne)->GetPtr();
796 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
802 for (
int i = 0; i < nElmtPnt; i++)
804 tmppnts[i] = PntJacCons[ndir][i][nVarOffset];
806 (*expvect)[ne]->AlignVectorToCollapsedDir(ndir, tmppnts,
810 Vmath::Vadd(nElmtPnt, ConsCurv[nd], 1, ConsStdd[nd], 1,
817 (*expvect)[ne]->MultiplyByQuadratureMetric(
818 ConsStdd[ndir], ConsStdd[ndir]);
819 for (
int i = 0; i < nElmtPnt; i++)
821 PntJacConsStd[ndir][i][nVarOffset] =
822 DataType(ConsStdd[ndir][i]);
830 for (
int m = 0; m < nvariable; m++)
832 for (
int n = 0; n < nvariable; n++)
834 int nVarOffset = m + n * nvariable;
835 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
837 for (
int ndStd1 = 0; ndStd1 <
m_spacedim; ndStd1++)
839 Vmath::Zero(nElmtPnt, DervStdd[ndStd0][ndStd1], 1);
846 for (
int i = 0; i < nElmtPnt; i++)
849 PntJacDerv[nd0][nd1][i][nVarOffset];
852 (*expvect)[ne]->AlignVectorToCollapsedDir(
853 nd0, tmppnts, ConsCurv);
856 (*expvect)[ne]->AlignVectorToCollapsedDir(
857 nd1, ConsCurv[nd], DervCurv[nd]);
860 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
866 DervCurv[ndStd0][ndStd1], 1,
867 DervStdd[ndStd0][ndStd1], 1,
868 DervStdd[ndStd0][ndStd1], 1);
877 (*expvect)[ne]->MultiplyByQuadratureMetric(
880 for (
int i = 0; i < nElmtPnt; i++)
882 PntJacDervStd[nd0][nd1][i][nVarOffset] =
883 -DataType(DervStdd[nd0][nd1][i]);
895 for (
int i = 0; i < nElmtPnt; i++)
898 &StdMatDataDBB[ne][ndir][i][0], 1,
899 &PntJacConsStd[ndir][i][0], 1, &MatData[0],
910 for (
int i = 0; i < nElmtPnt; i++)
913 &StdMatDataDBDB[ne][nd0][nd1][i][0], 1,
914 &PntJacDervStd[nd0][nd1][i][0], 1,
915 &MatData[0], nElmtCoef2Paded);
923 for (
int n = 0; n < nvariable; n++)
925 for (
int m = 0; m < nvariable; m++)
927 int nVarOffset = m + n * nvariable;
928 GmatxData = gmtxarray[m][n]->GetBlock(ne, ne)->GetPtr();
930 tmpA = MatData + nVarOffset * nElmtCoef2Paded, 1,
937template <
typename DataType>
941 std::shared_ptr<LocalRegions::ExpansionVector> expvect =
943 int nTotElmt = (*expvect).size();
948 std::vector<DNekMatSharedPtr> VectStdDerivBase0;
949 std::vector<TensorOfArray3D<DataType>> VectStdDerivBase_Base;
950 std::vector<TensorOfArray4D<DataType>> VectStdDervBase_DervBase;
954 for (
int ne = 0; ne < nTotElmt; ne++)
957 stdExp = (*expvect)[ne]->GetStdExp();
959 stdExp->DetShapeType(), *stdExp);
960 MatStdDerivBase0 = stdExp->GetStdMatrix(matkey);
962 int nTotStdExp = VectStdDerivBase0.size();
963 int nFoundStdExp = -1;
964 for (
int i = 0; i < nTotStdExp; i++)
966 if ((*VectStdDerivBase0[i]) == (*MatStdDerivBase0))
971 if (nFoundStdExp >= 0)
973 StdMatDataDBB[ne] = VectStdDerivBase_Base[nFoundStdExp];
974 StdMatDataDBDB[ne] = VectStdDervBase_DervBase[nFoundStdExp];
978 int nElmtCoef = (*expvect)[ne]->GetNcoeffs();
979 int nElmtCoef2 = nElmtCoef * nElmtCoef;
980 int nElmtPnt = (*expvect)[ne]->GetTotPoints();
984 int nQuotPlus = nQuot;
991 ArrayStdMat[0] = MatStdDerivBase0;
996 ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
1001 stdExp->DetShapeType(),
1003 ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
1008 ArrayStdMatData[nd0] = ArrayStdMat[nd0]->GetPtr();
1012 stdExp->DetShapeType(), *stdExp);
1022 for (
int i = 0; i < nElmtPnt; i++)
1025 for (
int nc1 = 0; nc1 < nElmtCoef; nc1++)
1027 int noffset = nc1 * nElmtCoef;
1028 for (
int nc0 = 0; nc0 < nElmtCoef; nc0++)
1030 tmpStdDBB[nd0][i][nc0 + noffset] = DataType(
1031 ArrayStdMatData[nd0][i * nElmtCoef + nc0] *
1032 BwdMatData[i * nElmtCoef + nc1]);
1040 tmpStdDBDB[nd0][nd1] =
1042 for (
int i = 0; i < nElmtPnt; i++)
1044 tmpStdDBDB[nd0][nd1][i] =
1046 for (
int nc1 = 0; nc1 < nElmtCoef; nc1++)
1048 int noffset = nc1 * nElmtCoef;
1049 for (
int nc0 = 0; nc0 < nElmtCoef; nc0++)
1051 tmpStdDBDB[nd0][nd1][i][nc0 + noffset] =
1053 ArrayStdMatData[nd0]
1054 [i * nElmtCoef + nc0] *
1055 ArrayStdMatData[nd1]
1056 [i * nElmtCoef + nc1]);
1062 VectStdDerivBase0.push_back(MatStdDerivBase0);
1063 VectStdDerivBase_Base.push_back(tmpStdDBB);
1064 VectStdDervBase_DervBase.push_back(tmpStdDBDB);
1066 StdMatDataDBB[ne] = tmpStdDBB;
1067 StdMatDataDBDB[ne] = tmpStdDBDB;
1072template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1082 int nvariables = inarray.size();
1086 GetTraceJac(inarray, qfield, TraceJac, TraceJacDeriv, TraceJacDerivSign,
1087 TraceIPSymJacArray);
1096 gmtxarray, tmpJac, tmpSign);
1101template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1104 TypeNekBlkMatSharedPtr &gmtVar,
1105 [[maybe_unused]]
const DataType &tmpDataType)
1107 int n1d = gmtxarray.size();
1108 int n2d = gmtxarray[0].size();
1109 int nConvectiveFields = n1d;
1111 ASSERTL0(n1d == n2d,
"ElmtVarInvMtrx requires n1d==n2d");
1116 gmtxarray[0][0]->GetBlockSizes(rowSizes, colSizes);
1117 int nTotElmt = rowSizes.size();
1118 int nElmtCoef = rowSizes[0] - 1;
1119 int nElmtCoef0 = -1;
1123 TypeNekBlkMatSharedPtr tmpGmtx;
1128 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1130 int nrows = gmtxarray[0][0]->GetBlock(nelmt, nelmt)->GetRows();
1131 int ncols = gmtxarray[0][0]->GetBlock(nelmt, nelmt)->GetColumns();
1132 ASSERTL0(nrows == ncols,
"ElmtVarInvMtrx requires nrows==ncols");
1136 if (nElmtCoef0 != nElmtCoef)
1138 nElmtCoef0 = nElmtCoef;
1139 int nElmtCoefVar = nElmtCoef0 * nConvectiveFields;
1140 blocksize = nElmtCoefVar * nElmtCoefVar;
1141 tmprow[0] = nElmtCoefVar;
1143 GMatData = tmpGmtx->GetBlock(0, 0)->GetPtr();
1146 for (
int n = 0; n < nConvectiveFields; n++)
1148 for (
int m = 0; m < nConvectiveFields; m++)
1150 ElmtMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1152 for (
int ncl = 0; ncl < nElmtCoef; ncl++)
1155 (n * nElmtCoef + ncl) * nConvectiveFields * nElmtCoef +
1157 int Eoffset = ncl * nElmtCoef;
1159 Vmath::Vcopy(nElmtCoef, tmpArray1 = ElmtMatData + Eoffset,
1160 1, tmpArray2 = GMatData + Goffset, 1);
1165 tmpGmtx->GetBlock(0, 0)->Invert();
1167 for (
int m = 0; m < nConvectiveFields; m++)
1169 for (
int n = 0; n < nConvectiveFields; n++)
1171 ElmtMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1173 for (
int ncl = 0; ncl < nElmtCoef; ncl++)
1176 (n * nElmtCoef + ncl) * nConvectiveFields * nElmtCoef +
1178 int Eoffset = ncl * nElmtCoef;
1180 Vmath::Vcopy(nElmtCoef, tmpArray1 = GMatData + Goffset, 1,
1181 tmpArray2 = ElmtMatData + Eoffset, 1);
1185 ElmtMatData = gmtVar->GetBlock(nelmt, nelmt)->GetPtr();
1191template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1200 int nvariables = inarray.size();
1207 TypeNekBlkMatSharedPtr FJac, BJac;
1210 if (TraceJac.size() > 0)
1230 for (
int i = 0; i < nvariables; ++i)
1234 m_fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
1242 TraceIPSymJacArray);
1248template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1250 const int nConvectiveFields,
1257 TypeNekBlkMatSharedPtr &FJac, TypeNekBlkMatSharedPtr &BJac,
1261 int nvariables = nConvectiveFields;
1269 for (
int i = 0; i < nvariables; i++)
1281 for (
int i = 0; i < nvariables; ++i)
1287 fields[0]->GetTraceMap();
1289 fields[0]->GetInterfaceMap();
1294 for (
int nd = 0; nd < nDim; ++nd)
1298 for (
int i = 0; i < nConvectiveFields; ++i)
1303 fields[i]->GetFwdBwdTracePhys(qfield[nd][i], qFwd[nd][i],
1304 qBwd[nd][i],
true,
true,
false);
1305 TraceMap->GetAssemblyCommDG()->PerformExchange(qFwd[nd][i],
1307 InterfaceMap->ExchangeTrace(qFwd[nd][i], qBwd[nd][i]);
1313 PenaltyFactor2, fields, AdvVel, inarray, time,
1314 qfield, Fwd, Bwd, qFwd, qBwd, MuVarTrace,
1315 nonZeroIndex, numflux);
1317 int nFields = nvariables;
1322 for (
int i = 0; i < nFields; i++)
1331 for (
int i = 0; i < nFields; i++)
1341 for (
int i = 0; i < nFields; i++)
1345 Vmath::Sadd(nTracePts, epsvar, Fwd[i], 1, plusFwd[i], 1);
1349 for (
int i = 0; i < nFields; i++)
1356 x->Apply(FwdBnd, tmpinarry, time);
1360 for (
int j = 0; j < nFields; j++)
1362 m_fields[j]->FillBwdWithBoundCond(plusFwd[j], plusBwd[j]);
1366 PenaltyFactor2, fields, AdvVel, inarray, time,
1367 qfield, plusFwd, plusBwd, qFwd, qBwd, MuVarTrace,
1368 nonZeroIndex, plusflux);
1370 for (
int n = 0; n < nFields; n++)
1372 Vmath::Vsub(nTracePts, plusflux[n], 1, numflux[n], 1, Jacvect[n],
1374 Vmath::Smul(nTracePts, oepsvar, Jacvect[n], 1, Jacvect[n], 1);
1376 for (
int j = 0; j < nTracePts; j++)
1378 tmpMatData = FJac->GetBlock(j, j)->GetPtr();
1379 for (
int n = 0; n < nFields; n++)
1381 tmpMatData[n + i * nFields] = DataType(Jacvect[n][j]);
1391 for (
int i = 0; i < nFields; i++)
1398 x->Apply(FwdBnd, tmpinarry, time);
1402 for (
int i = 0; i < nFields; i++)
1407 for (
int i = 0; i < nFields; i++)
1412 Vmath::Sadd(nTracePts, epsvar, Bwd[i], 1, plusBwd[i], 1);
1414 for (
int j = 0; j < nFields; j++)
1416 m_fields[j]->FillBwdWithBoundCond(Fwd[j], plusBwd[j]);
1420 PenaltyFactor2, fields, AdvVel, inarray, time,
1421 qfield, Fwd, plusBwd, qFwd, qBwd, MuVarTrace,
1422 nonZeroIndex, plusflux);
1424 for (
int n = 0; n < nFields; n++)
1426 Vmath::Vsub(nTracePts, plusflux[n], 1, numflux[n], 1, Jacvect[n],
1428 Vmath::Smul(nTracePts, oepsvar, Jacvect[n], 1, Jacvect[n], 1);
1430 for (
int j = 0; j < nTracePts; j++)
1432 tmpMatData = BJac->GetBlock(j, j)->GetPtr();
1433 for (
int n = 0; n < nFields; n++)
1435 tmpMatData[n + i * nFields] = DataType(Jacvect[n][j]);
1444 const int nConvectiveFields, [[maybe_unused]]
const int nDim,
1445 [[maybe_unused]]
const int nPts,
const int nTracePts,
1446 [[maybe_unused]]
const NekDouble PenaltyFactor2,
1461 auto advWeakDGObject =
1462 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
1465 "Use WeakDG for implicit compressible flow solver!");
1466 advWeakDGObject->AdvectTraceFlux(nConvectiveFields,
m_fields, AdvVel,
1472 for (
int i = 0; i < nConvectiveFields; i++)
1481 for (
int i = 0; i < nConvectiveFields; i++)
1486 std::string diffName;
1487 m_session->LoadSolverInfo(
"DiffusionType", diffName,
"InteriorPenalty");
1488 if (diffName ==
"InteriorPenalty")
1490 m_diffusion->DiffuseTraceFlux(fields, inarray, qfield,
1492 vFwd, vBwd, nonZeroIndex);
1496 ASSERTL1(
false,
"LDGNS not yet validated for implicit compressible "
1501 for (
int i = 0; i < nConvectiveFields - 1; ++i)
1506 m_diffusion->DiffuseTraceFlux(fields, inarray, qfield,
1508 inFwd, inBwd, nonZeroIndex);
1510 for (
int i = 0; i < nConvectiveFields; i++)
1512 Vmath::Vsub(nTracePts, traceflux[i], 1, visflux[i], 1, traceflux[i],
1547 TraceJacDerivSign, TraceIPSymJacArray);
1562 [[maybe_unused]]
const int nConvectiveFields,
1563 [[maybe_unused]]
const int nElmtPnt,
1575template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1581 std::shared_ptr<LocalRegions::ExpansionVector> pexp = explist->GetExp();
1582 int nTotElmt = (*pexp).size();
1583 int nConvectiveFields =
m_fields.size();
1588 Vmath::Fill(nTotElmt, Negdtlamda, pseudotimefactor, 1);
1591 for (
int m = 0; m < nConvectiveFields; m++)
1593 for (
int n = 0; n < nConvectiveFields; n++)
1595 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1597 GMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1598 DataType factor = DataType(pseudotimefactor[nelmt]);
1600 Vmath::Smul(GMatData.size(), factor, GMatData, 1, GMatData, 1);
1611 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1616 explist->GetExp(nelmt)->DetShapeType();
1618 if (tmp.size() != nelmtcoef || (ElmtTypeNow != ElmtTypePrevious))
1621 stdExp = explist->GetExp(nelmt)->GetStdExp();
1623 stdExp->DetShapeType(), *stdExp);
1626 BwdMatData = BwdMat->GetPtr();
1628 if (nelmtcoef != tmp.size())
1632 nelmtcoef, nelmtcoef, 0.0);
1633 MassMatData = MassMat->GetPtr();
1634 MassMatDataDataType =
1638 ElmtTypePrevious = ElmtTypeNow;
1641 for (
int np = 0; np < nelmtcoef; np++)
1643 explist->GetExp(nelmt)->IProductWRTBase(BwdMatData + np * nelmtpnts,
1645 Vmath::Vcopy(nelmtcoef, tmp, 1, tmp2 = MassMatData + np * nelmtcoef,
1648 for (
int i = 0; i < MassMatData.size(); i++)
1650 MassMatDataDataType[i] = DataType(MassMatData[i]);
1653 for (
int m = 0; m < nConvectiveFields; m++)
1655 GMatData = gmtxarray[m][m]->GetBlock(nelmt, nelmt)->GetPtr();
1656 Vmath::Vadd(MassMatData.size(), MassMatDataDataType, 1, GMatData, 1,
1663template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1668 int nFwdBwd, nDiagBlks, nvar0Jac, nvar1Jac;
1672 nFwdBwd = TraceJac.size();
1673 TraceJac[0]->GetBlockSizes(rowSizes, colSizes);
1674 nDiagBlks = rowSizes.size();
1675 nvar0Jac = rowSizes[1] - rowSizes[0];
1676 nvar1Jac = colSizes[1] - colSizes[0];
1678 if (0 == TraceJacArray.size())
1681 for (
int nlr = 0; nlr < nFwdBwd; nlr++)
1684 for (
int m = 0; m < nvar0Jac; m++)
1686 TraceJacArray[nlr][m] =
1688 for (
int n = 0; n < nvar1Jac; n++)
1696 for (
int nlr = 0; nlr < nFwdBwd; nlr++)
1698 const TypeNekBlkMatSharedPtr tmpMat = TraceJac[nlr];
1709 [[maybe_unused]]
const int nDervDir,
1712 [[maybe_unused]]
const int nFluxDir)
1718 [[maybe_unused]]
const int nConvectiveFields,
1719 [[maybe_unused]]
const int nElmtPnt, [[maybe_unused]]
const int nDervDir,
1732 [[maybe_unused]]
const int nDervDir,
1739 const int nConvectiveFields,
const int nElmtPnt,
1746 int matsize = nConvectiveFields * nConvectiveFields;
1750 for (
int npnt = 0; npnt < nElmtPnt; npnt++)
1752 for (
int j = 0; j < nConvectiveFields; j++)
1754 pointVar[j] = locVars[j][npnt];
1759 Vmath::Vcopy(matsize, wspMatData, 1, PntJacArray[npnt], 1);
1768 int nvariables = conservVar.size();
1769 const int nvariables3D = 5;
1773 efix_StegerWarming = 0.0;
1775 if (nvariables > expDim + 2)
1782 fluxJacData = fluxJac->GetPtr();
1784 if (nConvectiveFields == nvariables3D)
1796 PointFJac3DData = PointFJac3D->GetPtr();
1802 index[nvariables - 1] = 4;
1803 for (
int i = 0; i < nvariables - 1; i++)
1810 for (
int j = 0; j < nvariables; j++)
1813 PointFwd[nj] = conservVar[j];
1817 efix_StegerWarming, fsw);
1819 for (
int j = 0; j < nvariables; j++)
1822 for (
int k = 0; k < nvariables; k++)
1825 fluxJacData[j + k * nConvectiveFields] =
1826 PointFJac3DData[nj + nk * nvariables3D];
1832template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1838 BlkMat->GetBlockSizes(rowSizes, colSizes);
1839 int nDiagBlks = rowSizes.size();
1840 int nvar0 = rowSizes[1] - rowSizes[0];
1841 int nvar1 = colSizes[1] - colSizes[0];
1845 for (
int i = 0; i < nDiagBlks; i++)
1847 ElmtMatData = BlkMat->GetBlock(i, i)->GetPtr();
1848 for (
int n = 0; n < nvar1; n++)
1850 int noffset = n * nvar0;
1851 for (
int m = 0; m < nvar0; m++)
1853 MatArray[m][n][i] = ElmtMatData[m + noffset];
1859template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1862 const DataType valu)
1864 int n1d = gmtxarray.size();
1866 for (
int n1 = 0; n1 < n1d; ++n1)
1872template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1876 int n1d = gmtxarray.size();
1883 for (
int n1 = 0; n1 < n1d; ++n1)
1885 gmtxarray[n1]->GetBlockSizes(rowSizes, colSizes);
1886 int nelmts = rowSizes.size();
1888 for (
int i = 0; i < nelmts; ++i)
1890 loc_mat_arr = gmtxarray[n1]->GetBlock(i, i)->GetPtr();
1892 int nrows = gmtxarray[n1]->GetBlock(i, i)->GetRows();
1893 int ncols = gmtxarray[n1]->GetBlock(i, i)->GetColumns();
1911 const int nvariables3D = 5;
1914 NekDouble a, a2, h, h0, v2, vn, eps, eps2;
1917 NekDouble l1, l4, l5, al1, al4, al5, x1, x2, x3, y1;
1918 NekDouble c1, d1, c2, d2, c3, d3, c4, d4, c5, d5;
1935 NekDouble eL = (EL - 0.5 * (rhouL * vx + rhovL * vy + rhowL * vz)) / rhoL;
1937 ps =
m_varConv->Geteos()->GetPressure(rhoL, eL);
1941 v2 = vx * vx + vy * vy + vz * vz;
1942 a2 = gama * ps / ro;
1951 vn = nx * vx + ny * vy + nz * vz;
1952 sn = std::max(
sqrt(nx * nx + ny * ny + nz * nz), sml_ssf);
1966 al1 =
sqrt(l1 * l1 + eps2);
1967 al4 =
sqrt(l4 * l4 + eps2);
1968 al5 =
sqrt(l5 * l5 + eps2);
1970 l1 = 0.5 * (fExactorSplt * l1 + fsw * al1);
1971 l4 = 0.5 * (fExactorSplt * l4 + fsw * al4);
1972 l5 = 0.5 * (fExactorSplt * l5 + fsw * al5);
1974 x1 = 0.5 * (l4 + l5);
1975 x2 = 0.5 * (l4 - l5);
1982 int nVar1 = nvariables3D;
1983 int nVar2 = 2 * nvariables3D;
1984 int nVar3 = 3 * nvariables3D;
1985 int nVar4 = 4 * nvariables3D;
1986 FJacData[nVar0] = c1 * y1 - d1 * vna + l1;
1987 FJacData[nVar1] = -c1 * vx + d1 * nxa;
1988 FJacData[nVar2] = -c1 * vy + d1 * nya;
1989 FJacData[nVar3] = -c1 * vz + d1 * nza;
1990 FJacData[nVar4] = c1;
1991 c2 = c1 * vx + d1 * nxa * ae;
1992 d2 = x3 * nxa + d1 * vx;
1993 FJacData[1 + nVar0] = c2 * y1 - d2 * vna;
1994 FJacData[1 + nVar1] = -c2 * vx + d2 * nxa + l1;
1995 FJacData[1 + nVar2] = -c2 * vy + d2 * nya;
1996 FJacData[1 + nVar3] = -c2 * vz + d2 * nza;
1997 FJacData[1 + nVar4] = c2;
1998 c3 = c1 * vy + d1 * nya * ae;
1999 d3 = x3 * nya + d1 * vy;
2000 FJacData[2 + nVar0] = c3 * y1 - d3 * vna;
2001 FJacData[2 + nVar1] = -c3 * vx + d3 * nxa;
2002 FJacData[2 + nVar2] = -c3 * vy + d3 * nya + l1;
2003 FJacData[2 + nVar3] = -c3 * vz + d3 * nza;
2004 FJacData[2 + nVar4] = c3;
2005 c4 = c1 * vz + d1 * nza * ae;
2006 d4 = x3 * nza + d1 * vz;
2007 FJacData[3 + nVar0] = c4 * y1 - d4 * vna;
2008 FJacData[3 + nVar1] = -c4 * vx + d4 * nxa;
2009 FJacData[3 + nVar2] = -c4 * vy + d4 * nya;
2010 FJacData[3 + nVar3] = -c4 * vz + d4 * nza + l1;
2011 FJacData[3 + nVar4] = c4;
2012 c5 = c1 * h0 + d1 * vna * ae;
2013 d5 = x3 * vna + d1 * h0;
2014 FJacData[4 + nVar0] = c5 * y1 - d5 * vna;
2015 FJacData[4 + nVar1] = -c5 * vx + d5 * nxa;
2016 FJacData[4 + nVar2] = -c5 * vy + d5 * nya;
2017 FJacData[4 + nVar3] = -c5 * vz + d5 * nza;
2018 FJacData[4 + nVar4] = c5 + l1;
2035 if (fields[0]->GetGraph() !=
nullptr)
2037 fields[0]->GetGraph()->GetMovement()->SetImplicitALEFlag(
2039 fields[0]->GetGraph()->GetMovement()->SetMeshDistortedFlag(
2049 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....
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
Virtual function for solve implementation.
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.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT int GetNpoints()
NekDouble m_fintime
Finish time of the simulation.
NekDouble m_lastCheckTime
SOLVER_UTILS_EXPORT int GetNcoeffs()
NekDouble m_checktime
Time between checkpoints.
SOLVER_UTILS_EXPORT int GetPhys_Offset(int n)
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
enum HomogeneousType m_HomogeneousType
SOLVER_UTILS_EXPORT int GetTotPoints()
SOLVER_UTILS_EXPORT int GetTraceTotPoints()
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< InterfaceMapDG > InterfaceMapDGSharedPtr
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)