35#include <boost/core/ignore_unused.hpp>
62 m_session->MatchSolverInfo(
"FLAGIMPLICITITSSTATISTICS",
"True",
68 m_session->LoadParameter(
"AdvectionJacFlag", ntmp, 1);
71 m_session->LoadParameter(
"ViscousJacFlag", ntmp, 1);
83 if (
m_session->DefinesSolverInfo(
"NonlinSysIterSolver"))
88 "NekNonlinSys '" +
SolverType +
"' is not defined.\n");
110 m_fields[0]->GetLocTraceToTraceMap();
112 locTraceToTraceMap->CalcLocTracePhysToTraceIDMap(
m_fields[0]->GetTrace(),
114 for (
int i = 1; i < nvariables; i++)
116 m_fields[i]->GetLocTraceToTraceMap()->SetLocTracePhysToTraceIDMap(
117 locTraceToTraceMap->GetLocTracephysToTraceIDMap());
173 if (
m_session->GetComm()->GetRank() == 0)
177 cout <<
"-------------------------------------------" << endl
181 <<
"-------------------------------------------" << endl;
200 boost::ignore_unused(flag);
201 unsigned int nvariables =
m_fields.size();
202 unsigned int npoints =
m_fields[0]->GetNcoeffs();
206 for (
int i = 0; i < nvariables; ++i)
208 int offset = i * npoints;
209 in2D[i] = inarray + offset;
210 out2D[i] = out + offset;
211 source2D[i] = source + offset;
226 unsigned int nvariable = inarray.size();
227 unsigned int ncoeffs = inarray[nvariable - 1].size();
228 unsigned int npoints =
m_fields[0]->GetNpoints();
232 for (
int i = 0; i < nvariable; ++i)
235 m_fields[i]->BwdTrans(inarray[i], inpnts[i]);
248 for (
int i = 0; i < nvariable; ++i)
256 for (
int i = 0; i < nvariable; ++i)
258 Vmath::Vsub(ncoeffs, out[i], 1, source[i], 1, out[i], 1);
273 int nvariables = inarray.size();
287 for (
int i = 0; i < nvariables; ++i)
291 m_fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
302 for (
int i = 0; i < nvariables; ++i)
315 x->ApplyCoeff(
m_fields, inarray, outarray, time);
320 int nElements =
m_fields[0]->GetExpSize();
329 for (
int n = 0; n < nElements; ++n)
331 nq =
m_fields[0]->GetExp(n)->GetNcoeffs();
332 offset =
m_fields[0]->GetCoeff_Offset(n);
334 for (
int i = 0; i < nvariables; ++i)
337 tmp = outarray[i] + offset, 1);
352 int nvariables = inarray.size();
355 auto advWeakDGObject =
356 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
m_advObject);
358 "Use WeakDG for implicit compressible flow solver!");
359 advWeakDGObject->AdvectCoeffs(nvariables,
m_fields, advVel, inarray,
360 outarray, time, pFwd, pBwd);
368 unsigned int nvariables = inpnts.size();
369 unsigned int ncoeffs =
m_fields[0]->GetNcoeffs();
370 unsigned int ntotal = nvariables * ncoeffs;
379 for (
int i = 0; i < nvariables; ++i)
381 int noffset = i * ncoeffs;
382 tmpArray = inarray + noffset;
383 m_fields[i]->FwdTrans(inpnts[i], tmpArray);
388 for (
int i = 0; i < nvariables; ++i)
390 int noffset = i * ncoeffs;
391 tmpArray = out + noffset;
392 m_fields[i]->BwdTrans(tmpArray, outpnt[i]);
401 boost::ignore_unused(inpnts);
406 unsigned int ntotal = inarray.size();
415 m_nonlinsol->SetupNekNonlinSystem(ntotal, inarray, inarray, 0);
426 unsigned int nvariables =
m_fields.size();
427 unsigned int ntotal = inarray.size();
428 unsigned int npoints = ntotal / nvariables;
430 unsigned int nTotalGlobal = ntotal;
431 m_comm->GetSpaceComm()->AllReduce(nTotalGlobal,
433 unsigned int nTotalDOF = nTotalGlobal / nvariables;
439 for (
int i = 0; i < nvariables; ++i)
441 int offset = i * npoints;
443 Vmath::Dot(npoints, inarray + offset, inarray + offset);
448 for (
int i = 0; i < nvariables; ++i)
453 for (
int i = 2; i < nvariables - 1; ++i)
457 for (
int i = 2; i < nvariables - 1; ++i)
462 for (
int i = 0; i < nvariables; ++i)
468 for (
int i = 0; i < nvariables; ++i)
491 for (
int i = 0; i < nvariables; i++)
517template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
525 if (StdMatDataDBB.size() == 0)
530 int nSpaceDim =
m_graph->GetSpaceDimension();
531 int nvariable = inarray.size();
532 int npoints =
m_fields[0]->GetTotPoints();
533 int nVar2 = nvariable * nvariable;
534 std::shared_ptr<LocalRegions::ExpansionVector> expvect =
536 int nTotElmt = (*expvect).size();
547 for (
int i = 0; i < 3; i++)
551 normal3D[0][0] = 1.0;
552 normal3D[1][1] = 1.0;
553 normal3D[2][2] = 1.0;
559 nvariable - 1, nvariable, 0.0);
596 int nElmtCoefOld = -1;
597 for (
int ne = 0; ne < nTotElmt; ne++)
599 int nElmtCoef = (*expvect)[ne]->GetNcoeffs();
600 int nElmtCoef2 = nElmtCoef * nElmtCoef;
601 int nElmtPnt = (*expvect)[ne]->GetTotPoints();
605 int nQuotPlus = nQuot;
612 if (nElmtPnt > PntJacCons[0].size() || nElmtCoef > nElmtCoefOld)
614 nElmtCoefOld = nElmtCoef;
615 for (
int ndir = 0; ndir < 3; ndir++)
627 PntJacConsStd[ndir] =
629 for (
int i = 0; i < nElmtPnt; i++)
635 for (
int ndir1 = 0; ndir1 <
m_spacedim; ndir1++)
637 PntJacDerv[ndir][ndir1] =
639 PntJacDervStd[ndir][ndir1] =
643 for (
int i = 0; i < nElmtPnt; i++)
645 PntJacDerv[ndir][ndir1][i] =
647 PntJacDervStd[ndir][ndir1][i] =
655 for (
int j = 0; j < nvariable; j++)
657 locVars[j] = inarray[j] + noffset;
662 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
664 normals = normal3D[nFluxDir];
666 wspMat, PntJacCons[nFluxDir]);
672 for (
int j = 0; j < nSpaceDim; j++)
674 for (
int k = 0; k < nvariable; k++)
676 locDerv[j][k] = qfield[j][k] + noffset;
679 locmu = mu + noffset;
680 locDmuDT = DmuDT + noffset;
681 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
683 normals = normal3D[nFluxDir];
685 locDerv, locmu, locDmuDT, normals,
686 wspMatDrv, PntJacCons[nFluxDir]);
692 locmu = mu + noffset;
693 for (
int nFluxDir = 0; nFluxDir < nSpaceDim; nFluxDir++)
696 for (
int nDervDir = 0; nDervDir < nSpaceDim; nDervDir++)
699 nvariable, nElmtPnt, nDervDir, locVars, locmu,
700 normalPnt, wspMatDrv, PntJacDerv[nFluxDir][nDervDir]);
706 for (
int n = 0; n < nvariable; n++)
708 for (
int m = 0; m < nvariable; m++)
710 int nVarOffset = m + n * nvariable;
711 GmatxData = gmtxarray[m][n]->GetBlock(ne, ne)->GetPtr();
713 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
719 for (
int i = 0; i < nElmtPnt; i++)
721 tmppnts[i] = PntJacCons[ndir][i][nVarOffset];
723 (*expvect)[ne]->AlignVectorToCollapsedDir(ndir, tmppnts,
727 Vmath::Vadd(nElmtPnt, ConsCurv[nd], 1, ConsStdd[nd], 1,
734 (*expvect)[ne]->MultiplyByQuadratureMetric(
735 ConsStdd[ndir], ConsStdd[ndir]);
736 for (
int i = 0; i < nElmtPnt; i++)
738 PntJacConsStd[ndir][i][nVarOffset] =
739 DataType(ConsStdd[ndir][i]);
747 for (
int m = 0; m < nvariable; m++)
749 for (
int n = 0; n < nvariable; n++)
751 int nVarOffset = m + n * nvariable;
752 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
754 for (
int ndStd1 = 0; ndStd1 <
m_spacedim; ndStd1++)
756 Vmath::Zero(nElmtPnt, DervStdd[ndStd0][ndStd1], 1);
763 for (
int i = 0; i < nElmtPnt; i++)
766 PntJacDerv[nd0][nd1][i][nVarOffset];
769 (*expvect)[ne]->AlignVectorToCollapsedDir(
770 nd0, tmppnts, ConsCurv);
773 (*expvect)[ne]->AlignVectorToCollapsedDir(
774 nd1, ConsCurv[nd], DervCurv[nd]);
777 for (
int ndStd0 = 0; ndStd0 <
m_spacedim; ndStd0++)
783 DervCurv[ndStd0][ndStd1], 1,
784 DervStdd[ndStd0][ndStd1], 1,
785 DervStdd[ndStd0][ndStd1], 1);
794 (*expvect)[ne]->MultiplyByQuadratureMetric(
797 for (
int i = 0; i < nElmtPnt; i++)
799 PntJacDervStd[nd0][nd1][i][nVarOffset] =
800 -DataType(DervStdd[nd0][nd1][i]);
812 for (
int i = 0; i < nElmtPnt; i++)
815 &StdMatDataDBB[ne][ndir][i][0], 1,
816 &PntJacConsStd[ndir][i][0], 1, &MatData[0],
827 for (
int i = 0; i < nElmtPnt; i++)
830 &StdMatDataDBDB[ne][nd0][nd1][i][0], 1,
831 &PntJacDervStd[nd0][nd1][i][0], 1,
832 &MatData[0], nElmtCoef2Paded);
840 for (
int n = 0; n < nvariable; n++)
842 for (
int m = 0; m < nvariable; m++)
844 int nVarOffset = m + n * nvariable;
845 GmatxData = gmtxarray[m][n]->GetBlock(ne, ne)->GetPtr();
847 tmpA = MatData + nVarOffset * nElmtCoef2Paded, 1,
854template <
typename DataType>
858 std::shared_ptr<LocalRegions::ExpansionVector> expvect =
860 int nTotElmt = (*expvect).size();
865 vector<DNekMatSharedPtr> VectStdDerivBase0;
866 vector<TensorOfArray3D<DataType>> VectStdDerivBase_Base;
867 vector<TensorOfArray4D<DataType>> VectStdDervBase_DervBase;
871 for (
int ne = 0; ne < nTotElmt; ne++)
874 stdExp = (*expvect)[ne]->GetStdExp();
876 stdExp->DetShapeType(), *stdExp);
877 MatStdDerivBase0 = stdExp->GetStdMatrix(matkey);
879 int nTotStdExp = VectStdDerivBase0.size();
880 int nFoundStdExp = -1;
881 for (
int i = 0; i < nTotStdExp; i++)
883 if ((*VectStdDerivBase0[i]) == (*MatStdDerivBase0))
888 if (nFoundStdExp >= 0)
890 StdMatDataDBB[ne] = VectStdDerivBase_Base[nFoundStdExp];
891 StdMatDataDBDB[ne] = VectStdDervBase_DervBase[nFoundStdExp];
895 int nElmtCoef = (*expvect)[ne]->GetNcoeffs();
896 int nElmtCoef2 = nElmtCoef * nElmtCoef;
897 int nElmtPnt = (*expvect)[ne]->GetTotPoints();
901 int nQuotPlus = nQuot;
908 ArrayStdMat[0] = MatStdDerivBase0;
913 ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
918 stdExp->DetShapeType(),
920 ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
925 ArrayStdMatData[nd0] = ArrayStdMat[nd0]->GetPtr();
929 stdExp->DetShapeType(), *stdExp);
939 for (
int i = 0; i < nElmtPnt; i++)
942 for (
int nc1 = 0; nc1 < nElmtCoef; nc1++)
944 int noffset = nc1 * nElmtCoef;
945 for (
int nc0 = 0; nc0 < nElmtCoef; nc0++)
947 tmpStdDBB[nd0][i][nc0 + noffset] = DataType(
948 ArrayStdMatData[nd0][i * nElmtCoef + nc0] *
949 BwdMatData[i * nElmtCoef + nc1]);
957 tmpStdDBDB[nd0][nd1] =
959 for (
int i = 0; i < nElmtPnt; i++)
961 tmpStdDBDB[nd0][nd1][i] =
963 for (
int nc1 = 0; nc1 < nElmtCoef; nc1++)
965 int noffset = nc1 * nElmtCoef;
966 for (
int nc0 = 0; nc0 < nElmtCoef; nc0++)
968 tmpStdDBDB[nd0][nd1][i][nc0 + noffset] =
971 [i * nElmtCoef + nc0] *
973 [i * nElmtCoef + nc1]);
979 VectStdDerivBase0.push_back(MatStdDerivBase0);
980 VectStdDerivBase_Base.push_back(tmpStdDBB);
981 VectStdDervBase_DervBase.push_back(tmpStdDBDB);
983 StdMatDataDBB[ne] = tmpStdDBB;
984 StdMatDataDBDB[ne] = tmpStdDBDB;
989template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
999 int nvariables = inarray.size();
1003 GetTraceJac(inarray, qfield, TraceJac, TraceJacDeriv, TraceJacDerivSign,
1004 TraceIPSymJacArray);
1013 gmtxarray, tmpJac, tmpSign);
1018template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1021 TypeNekBlkMatSharedPtr &gmtVar,
const DataType &tmpDataType)
1023 boost::ignore_unused(tmpDataType);
1025 int n1d = gmtxarray.size();
1026 int n2d = gmtxarray[0].size();
1027 int nConvectiveFields = n1d;
1029 ASSERTL0(n1d == n2d,
"ElmtVarInvMtrx requires n1d==n2d");
1034 gmtxarray[0][0]->GetBlockSizes(rowSizes, colSizes);
1035 int nTotElmt = rowSizes.size();
1036 int nElmtCoef = rowSizes[0] - 1;
1037 int nElmtCoef0 = -1;
1041 TypeNekBlkMatSharedPtr tmpGmtx;
1046 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1048 int nrows = gmtxarray[0][0]->GetBlock(nelmt, nelmt)->GetRows();
1049 int ncols = gmtxarray[0][0]->GetBlock(nelmt, nelmt)->GetColumns();
1050 ASSERTL0(nrows == ncols,
"ElmtVarInvMtrx requires nrows==ncols");
1054 if (nElmtCoef0 != nElmtCoef)
1056 nElmtCoef0 = nElmtCoef;
1057 int nElmtCoefVar = nElmtCoef0 * nConvectiveFields;
1058 blocksize = nElmtCoefVar * nElmtCoefVar;
1059 tmprow[0] = nElmtCoefVar;
1061 GMatData = tmpGmtx->GetBlock(0, 0)->GetPtr();
1064 for (
int n = 0; n < nConvectiveFields; n++)
1066 for (
int m = 0; m < nConvectiveFields; m++)
1068 ElmtMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1070 for (
int ncl = 0; ncl < nElmtCoef; ncl++)
1073 (n * nElmtCoef + ncl) * nConvectiveFields * nElmtCoef +
1075 int Eoffset = ncl * nElmtCoef;
1077 Vmath::Vcopy(nElmtCoef, tmpArray1 = ElmtMatData + Eoffset,
1078 1, tmpArray2 = GMatData + Goffset, 1);
1083 tmpGmtx->GetBlock(0, 0)->Invert();
1085 for (
int m = 0; m < nConvectiveFields; m++)
1087 for (
int n = 0; n < nConvectiveFields; n++)
1089 ElmtMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1091 for (
int ncl = 0; ncl < nElmtCoef; ncl++)
1094 (n * nElmtCoef + ncl) * nConvectiveFields * nElmtCoef +
1096 int Eoffset = ncl * nElmtCoef;
1098 Vmath::Vcopy(nElmtCoef, tmpArray1 = GMatData + Goffset, 1,
1099 tmpArray2 = ElmtMatData + Eoffset, 1);
1103 ElmtMatData = gmtVar->GetBlock(nelmt, nelmt)->GetPtr();
1109template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1118 boost::ignore_unused(TraceJacDeriv, TraceJacDerivSign);
1120 int nvariables = inarray.size();
1127 TypeNekBlkMatSharedPtr FJac, BJac;
1130 if (TraceJac.size() > 0)
1150 for (
int i = 0; i < nvariables; ++i)
1154 m_fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
1162 TraceIPSymJacArray);
1168template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1170 const int nConvectiveFields,
1177 TypeNekBlkMatSharedPtr &FJac, TypeNekBlkMatSharedPtr &BJac,
1180 boost::ignore_unused(TraceIPSymJacArray);
1183 int nvariables = nConvectiveFields;
1192 for (
int i = 0; i < nvariables; i++)
1204 for (
int i = 0; i < nvariables; ++i)
1210 fields[0]->GetTraceMap();
1215 for (
int nd = 0; nd < nDim; ++nd)
1219 for (
int i = 0; i < nConvectiveFields; ++i)
1224 fields[i]->GetFwdBwdTracePhys(qfield[nd][i], qFwd[nd][i],
1225 qBwd[nd][i],
true,
true,
false);
1226 TraceMap->GetAssemblyCommDG()->PerformExchange(qFwd[nd][i],
1233 PenaltyFactor2, fields, AdvVel, inarray, time,
1234 qfield, Fwd, Bwd, qFwd, qBwd, MuVarTrace,
1235 nonZeroIndex, numflux);
1237 int nFields = nvariables;
1242 for (
int i = 0; i < nFields; i++)
1251 for (
int i = 0; i < nFields; i++)
1261 for (
int i = 0; i < nFields; i++)
1265 Vmath::Sadd(nTracePts, epsvar, Fwd[i], 1, plusFwd[i], 1);
1269 for (
int i = 0; i < nFields; i++)
1276 x->Apply(FwdBnd, tmpinarry, time);
1280 for (
int j = 0; j < nFields; j++)
1282 m_fields[j]->FillBwdWithBoundCond(plusFwd[j], plusBwd[j]);
1286 PenaltyFactor2, fields, AdvVel, inarray, time,
1287 qfield, plusFwd, plusBwd, qFwd, qBwd, MuVarTrace,
1288 nonZeroIndex, plusflux);
1290 for (
int n = 0; n < nFields; n++)
1292 Vmath::Vsub(nTracePts, plusflux[n], 1, numflux[n], 1, Jacvect[n],
1294 Vmath::Smul(nTracePts, oepsvar, Jacvect[n], 1, Jacvect[n], 1);
1296 for (
int j = 0; j < nTracePts; j++)
1298 tmpMatData = FJac->GetBlock(j, j)->GetPtr();
1299 for (
int n = 0; n < nFields; n++)
1301 tmpMatData[n + i * nFields] = DataType(Jacvect[n][j]);
1311 for (
int i = 0; i < nFields; i++)
1318 x->Apply(FwdBnd, tmpinarry, time);
1322 for (
int i = 0; i < nFields; i++)
1327 for (
int i = 0; i < nFields; i++)
1332 Vmath::Sadd(nTracePts, epsvar, Bwd[i], 1, plusBwd[i], 1);
1334 for (
int j = 0; j < nFields; j++)
1336 m_fields[j]->FillBwdWithBoundCond(Fwd[j], plusBwd[j]);
1340 PenaltyFactor2, fields, AdvVel, inarray, time,
1341 qfield, Fwd, 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 = BJac->GetBlock(j, j)->GetPtr();
1353 for (
int n = 0; n < nFields; n++)
1355 tmpMatData[n + i * nFields] = DataType(Jacvect[n][j]);
1364 const int nConvectiveFields,
const int nDim,
const int nPts,
1365 const int nTracePts,
const NekDouble PenaltyFactor2,
1377 boost::ignore_unused(nDim, nPts, PenaltyFactor2, time, qFwd, qBwd,
1382 auto advWeakDGObject =
1383 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
1386 "Use WeakDG for implicit compressible flow solver!");
1387 advWeakDGObject->AdvectTraceFlux(nConvectiveFields,
m_fields, AdvVel,
1393 for (
int i = 0; i < nConvectiveFields; i++)
1402 for (
int i = 0; i < nConvectiveFields; i++)
1408 m_session->LoadSolverInfo(
"DiffusionType", diffName,
"InteriorPenalty");
1409 if (diffName ==
"InteriorPenalty")
1411 m_diffusion->DiffuseTraceFlux(fields, inarray, qfield,
1413 vFwd, vBwd, nonZeroIndex);
1417 ASSERTL1(
false,
"LDGNS not yet validated for implicit compressible "
1422 for (
int i = 0; i < nConvectiveFields - 1; ++i)
1427 m_diffusion->DiffuseTraceFlux(fields, inarray, qfield,
1429 inFwd, inBwd, nonZeroIndex);
1431 for (
int i = 0; i < nConvectiveFields; i++)
1433 Vmath::Vsub(nTracePts, traceflux[i], 1, visflux[i], 1, traceflux[i],
1468 TraceJacDerivSign, TraceIPSymJacArray);
1480 TraceJacDerivArray);
1484 const int nConvectiveFields,
const int nElmtPnt,
1491 boost::ignore_unused(nConvectiveFields, nElmtPnt, locVars, locDerv, locmu,
1492 locDmuDT, normals, wspMat, PntJacArray);
1496template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1499 const NekDouble dtlamda,
const DataType tmpDataType)
1501 boost::ignore_unused(tmpDataType);
1504 std::shared_ptr<LocalRegions::ExpansionVector> pexp = explist->GetExp();
1505 int nTotElmt = (*pexp).size();
1506 int nConvectiveFields =
m_fields.size();
1511 Vmath::Fill(nTotElmt, Negdtlamda, pseudotimefactor, 1);
1514 for (
int m = 0; m < nConvectiveFields; m++)
1516 for (
int n = 0; n < nConvectiveFields; n++)
1518 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1520 GMatData = gmtxarray[m][n]->GetBlock(nelmt, nelmt)->GetPtr();
1521 DataType factor = DataType(pseudotimefactor[nelmt]);
1534 for (
int nelmt = 0; nelmt < nTotElmt; nelmt++)
1539 explist->GetExp(nelmt)->DetShapeType();
1541 if (tmp.size() != nelmtcoef || (ElmtTypeNow != ElmtTypePrevious))
1544 stdExp = explist->GetExp(nelmt)->GetStdExp();
1546 stdExp->DetShapeType(), *stdExp);
1549 BwdMatData = BwdMat->GetPtr();
1551 if (nelmtcoef != tmp.size())
1555 nelmtcoef, nelmtcoef, 0.0);
1556 MassMatData = MassMat->GetPtr();
1557 MassMatDataDataType =
1561 ElmtTypePrevious = ElmtTypeNow;
1564 for (
int np = 0; np < nelmtcoef; np++)
1566 explist->GetExp(nelmt)->IProductWRTBase(BwdMatData + np * nelmtpnts,
1568 Vmath::Vcopy(nelmtcoef, tmp, 1, tmp2 = MassMatData + np * nelmtcoef,
1571 for (
int i = 0; i < MassMatData.size(); i++)
1573 MassMatDataDataType[i] = DataType(MassMatData[i]);
1576 for (
int m = 0; m < nConvectiveFields; m++)
1578 GMatData = gmtxarray[m][m]->GetBlock(nelmt, nelmt)->GetPtr();
1579 Vmath::Vadd(MassMatData.size(), MassMatDataDataType, 1, GMatData, 1,
1586template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1593 boost::ignore_unused(TraceJacArray, TraceJacDeriv, TraceJacDerivArray);
1595 int nFwdBwd, nDiagBlks, nvar0Jac, nvar1Jac;
1599 nFwdBwd = TraceJac.size();
1600 TraceJac[0]->GetBlockSizes(rowSizes, colSizes);
1601 nDiagBlks = rowSizes.size();
1602 nvar0Jac = rowSizes[1] - rowSizes[0];
1603 nvar1Jac = colSizes[1] - colSizes[0];
1605 if (0 == TraceJacArray.size())
1608 for (
int nlr = 0; nlr < nFwdBwd; nlr++)
1611 for (
int m = 0; m < nvar0Jac; m++)
1613 TraceJacArray[nlr][m] =
1615 for (
int n = 0; n < nvar1Jac; n++)
1623 for (
int nlr = 0; nlr < nFwdBwd; nlr++)
1625 const TypeNekBlkMatSharedPtr tmpMat = TraceJac[nlr];
1640 boost::ignore_unused(explist, normals, nDervDir, inarray, ElmtJacArray,
1646 const int nConvectiveFields,
const int nElmtPnt,
const int nDervDir,
1652 boost::ignore_unused(nConvectiveFields, nElmtPnt, nDervDir, locVars, locmu,
1653 locnormal, wspMat, PntJacArray);
1664 boost::ignore_unused(explist, normals, nDervDir, inarray, ElmtJac);
1668 const int nConvectiveFields,
const int nElmtPnt,
1675 int matsize = nConvectiveFields * nConvectiveFields;
1679 for (
int npnt = 0; npnt < nElmtPnt; npnt++)
1681 for (
int j = 0; j < nConvectiveFields; j++)
1683 pointVar[j] = locVars[j][npnt];
1688 Vmath::Vcopy(matsize, wspMatData, 1, PntJacArray[npnt], 1);
1697 int nvariables = conservVar.size();
1698 const int nvariables3D = 5;
1702 efix_StegerWarming = 0.0;
1704 if (nvariables > expDim + 2)
1711 fluxJacData = fluxJac->GetPtr();
1713 if (nConvectiveFields == nvariables3D)
1725 PointFJac3DData = PointFJac3D->GetPtr();
1731 index[nvariables - 1] = 4;
1732 for (
int i = 0; i < nvariables - 1; i++)
1739 for (
int j = 0; j < nvariables; j++)
1742 PointFwd[nj] = conservVar[j];
1746 efix_StegerWarming, fsw);
1748 for (
int j = 0; j < nvariables; j++)
1751 for (
int k = 0; k < nvariables; k++)
1754 fluxJacData[j + k * nConvectiveFields] =
1755 PointFJac3DData[nj + nk * nvariables3D];
1778 boost::ignore_unused(flag);
1785 unsigned int nTotalGlobal = inarray.size();
1787 m_comm->GetSpaceComm()->AllReduce(magninarray,
1792 unsigned int ntotal = inarray.size();
1796 Vmath::Svtvp(ntotal, eps, inarray, 1, refsol, 1, solplus, 1);
1800 Vmath::Vsub(ntotal, resplus, 1, refres, 1, out, 1);
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)
1839 int n1d = gmtxarray.size();
1841 for (
int n1 = 0; n1 < n1d; ++n1)
1847template <
typename DataType,
typename TypeNekBlkMatSharedPtr>
1851 int n1d = gmtxarray.size();
1858 for (
int n1 = 0; n1 < n1d; ++n1)
1860 gmtxarray[n1]->GetBlockSizes(rowSizes, colSizes);
1861 int nelmts = rowSizes.size();
1863 for (
int i = 0; i < nelmts; ++i)
1865 loc_mat_arr = gmtxarray[n1]->GetBlock(i, i)->GetPtr();
1867 int nrows = gmtxarray[n1]->GetBlock(i, i)->GetRows();
1868 int ncols = gmtxarray[n1]->GetBlock(i, i)->GetColumns();
1886 const int nvariables3D = 5;
1889 NekDouble a, a2, h, h0, v2, vn, eps, eps2;
1892 NekDouble l1, l4, l5, al1, al4, al5, x1, x2, x3, y1;
1893 NekDouble c1, d1, c2, d2, c3, d3, c4, d4, c5, d5;
1910 NekDouble eL = (EL - 0.5 * (rhouL * vx + rhovL * vy + rhowL * vz)) / rhoL;
1912 ps =
m_varConv->Geteos()->GetPressure(rhoL, eL);
1916 v2 = vx * vx + vy * vy + vz * vz;
1917 a2 = gama * ps / ro;
1926 vn = nx * vx + ny * vy + nz * vz;
1927 sn = std::max(
sqrt(nx * nx + ny * ny + nz * nz), sml_ssf);
1941 al1 =
sqrt(l1 * l1 + eps2);
1942 al4 =
sqrt(l4 * l4 + eps2);
1943 al5 =
sqrt(l5 * l5 + eps2);
1945 l1 = 0.5 * (fExactorSplt * l1 + fsw * al1);
1946 l4 = 0.5 * (fExactorSplt * l4 + fsw * al4);
1947 l5 = 0.5 * (fExactorSplt * l5 + fsw * al5);
1949 x1 = 0.5 * (l4 + l5);
1950 x2 = 0.5 * (l4 - l5);
1957 int nVar1 = nvariables3D;
1958 int nVar2 = 2 * nvariables3D;
1959 int nVar3 = 3 * nvariables3D;
1960 int nVar4 = 4 * nvariables3D;
1961 FJacData[nVar0] = c1 * y1 - d1 * vna + l1;
1962 FJacData[nVar1] = -c1 * vx + d1 * nxa;
1963 FJacData[nVar2] = -c1 * vy + d1 * nya;
1964 FJacData[nVar3] = -c1 * vz + d1 * nza;
1965 FJacData[nVar4] = c1;
1966 c2 = c1 * vx + d1 * nxa * ae;
1967 d2 = x3 * nxa + d1 * vx;
1968 FJacData[1 + nVar0] = c2 * y1 - d2 * vna;
1969 FJacData[1 + nVar1] = -c2 * vx + d2 * nxa + l1;
1970 FJacData[1 + nVar2] = -c2 * vy + d2 * nya;
1971 FJacData[1 + nVar3] = -c2 * vz + d2 * nza;
1972 FJacData[1 + nVar4] = c2;
1973 c3 = c1 * vy + d1 * nya * ae;
1974 d3 = x3 * nya + d1 * vy;
1975 FJacData[2 + nVar0] = c3 * y1 - d3 * vna;
1976 FJacData[2 + nVar1] = -c3 * vx + d3 * nxa;
1977 FJacData[2 + nVar2] = -c3 * vy + d3 * nya + l1;
1978 FJacData[2 + nVar3] = -c3 * vz + d3 * nza;
1979 FJacData[2 + nVar4] = c3;
1980 c4 = c1 * vz + d1 * nza * ae;
1981 d4 = x3 * nza + d1 * vz;
1982 FJacData[3 + nVar0] = c4 * y1 - d4 * vna;
1983 FJacData[3 + nVar1] = -c4 * vx + d4 * nxa;
1984 FJacData[3 + nVar2] = -c4 * vy + d4 * nya;
1985 FJacData[3 + nVar3] = -c4 * vz + d4 * nza + l1;
1986 FJacData[3 + nVar4] = c4;
1987 c5 = c1 * h0 + d1 * vna * ae;
1988 d5 = x3 * vna + d1 * h0;
1989 FJacData[4 + nVar0] = c5 * y1 - d5 * vna;
1990 FJacData[4 + nVar1] = -c5 * vx + d5 * nxa;
1991 FJacData[4 + nVar2] = -c5 * vy + d5 * nya;
1992 FJacData[4 + nVar3] = -c5 * vz + d5 * nza;
1993 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 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.
virtual bool v_UpdateTimeStepCheck() override
void MultiplyElmtInvMassPlusSource(Array< OneD, Array< OneD, TypeNekBlkMatSharedPtr > > &gmtxarray, const NekDouble dtlamda, const DataType tmpDataType)
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 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)
virtual 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 NonlinSysEvaluatorCoeff1D(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out, const bool &flag)
void CalcRefValues(const Array< OneD, const NekDouble > &inarray)
virtual 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)
TensorOfArray4D< NekSingle > m_stdSMatDataDBB
void NonlinSysEvaluatorCoeff(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out, const bool &flag=true, const Array< OneD, const NekDouble > &source=NullNekDouble1DArray)
void TranSamesizeBlkDiagMatIntoArray(const TypeNekBlkMatSharedPtr &BlkMat, TensorOfArray3D< DataType > &MatArray)
NekDouble m_newtonAbsoluteIteTol
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)
virtual void v_PrintSummaryStatistics(const NekDouble intTime) override
Print Summary Statistics.
virtual ~CFSImplicit()
Destructor for CFSImplicit class.
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 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 TransTraceJacMatToArray(const Array< OneD, TypeNekBlkMatSharedPtr > &TraceJac, const Array< OneD, TypeNekBlkMatSharedPtr > &TraceJacDeriv, TensorOfArray4D< DataType > &TraceJacArray, TensorOfArray4D< DataType > &TraceJacDerivArray)
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 Fill1DArrayOfBlkDiagonalMat(Array< OneD, TypeNekBlkMatSharedPtr > &gmtxarray, const DataType valu)
void InitialiseNonlinSysSolver()
virtual 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
virtual 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
NekDouble m_LinSysRelativeTolInNonlin
int m_NekLinSysMaxIterations
void DefineNekSysResEval(FuncPointerT func, ObjectPointerT obj)
void DefineNekSysLhsEval(FuncPointerT func, ObjectPointerT obj)
void DefineNekSysPrecon(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.
virtual 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< LocTraceToTraceMap > LocTraceToTraceMapSharedPtr
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
The above copyright notice and this permission notice shall be included.
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 (vector times vector): z = w*x
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 scalar 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)