42 namespace LibUtilities
79 m_solVector(m_scheme->GetNsteps()),
80 m_t(m_scheme->GetNsteps())
86 int nvar = y.num_elements();
87 int npoints = y[0].num_elements();
88 int nMultiStepVals =
m_scheme->GetNmultiStepValues();
90 for(
int i = 1; i < nsteps; i++)
93 for(
int j = 0; j < nvar; j++)
97 if(i < nMultiStepVals)
99 m_t[i] = time - i*timestep*timeLevels[i];
115 ASSERTL1(y.num_elements()==
m_scheme->GetNsteps(),
"Amount of Entries does not match number of (multi-) steps");
120 unsigned int npoints):
125 for(
int i = 0; i <
m_scheme->GetNsteps(); i++)
128 for(
int j = 0; j < nvar; j++)
189 m_B[0][0][0] = 3.0/2.0;
202 m_timeLevelOffset[1] = 1;
221 m_U[0][1] = 23.0/12.0;
222 m_U[0][2] = -4.0/3.0;
223 m_U[0][3] = 5.0/12.0;
226 m_V[0][1] = 23.0/12.0;
227 m_V[0][2] = -4.0/3.0;
228 m_V[0][3] = 5.0/12.0;
237 m_timeLevelOffset[1] = 1;
238 m_timeLevelOffset[2] = 2;
239 m_timeLevelOffset[3] = 3;
258 m_U[0][1] = 55.0/24.0;
259 m_U[0][2] = -59.0/24.0;
260 m_U[0][3] = 37.0/24.0;
261 m_U[0][4] = -9.0/24.0;
264 m_V[0][1] = 55.0/24.0;
265 m_V[0][2] = -59.0/24.0;
266 m_V[0][3] = 37.0/24.0;
267 m_V[0][4] = -9.0/24.0;
277 m_timeLevelOffset[1] = 1;
278 m_timeLevelOffset[2] = 2;
279 m_timeLevelOffset[3] = 3;
280 m_timeLevelOffset[4] = 4;
330 m_timeLevelOffset[1] = 0;
349 m_B[0][0][0] = 2*third;
352 m_U[0][3] = -2*third;
357 m_V[0][3] = -2*third;
366 m_timeLevelOffset[1] = 1;
367 m_timeLevelOffset[2] = 0;
368 m_timeLevelOffset[3] = 1;
387 m_B[0][0][0] = 6*eleventh;
389 m_U[0][1] = -9*eleventh;
390 m_U[0][2] = 2*eleventh;
391 m_U[0][4] = -18*eleventh;
392 m_U[0][5] = 6*eleventh;
394 m_V[0][0] = 18*eleventh;
395 m_V[0][1] = -9*eleventh;
396 m_V[0][2] = 2*eleventh;
397 m_V[0][3] = 18*eleventh;
398 m_V[0][4] = -18*eleventh;
399 m_V[0][5] = 6*eleventh;
410 m_timeLevelOffset[1] = 1;
411 m_timeLevelOffset[2] = 2;
412 m_timeLevelOffset[3] = 0;
413 m_timeLevelOffset[4] = 1;
414 m_timeLevelOffset[5] = 2;
433 m_B[0][0][0] = 12*twentyfifth;
435 m_U[0][1] = -36*twentyfifth;
436 m_U[0][2] = 16*twentyfifth;
437 m_U[0][3] = -3*twentyfifth;
438 m_U[0][5] = -72*twentyfifth;
439 m_U[0][7] = -12*twentyfifth;
441 m_V[0][0] = 48*twentyfifth;
442 m_V[0][1] = -36*twentyfifth;
443 m_V[0][2] = 16*twentyfifth;
444 m_V[0][3] = -3*twentyfifth;
445 m_V[0][4] = 48*twentyfifth;
446 m_V[0][5] = -72*twentyfifth;
447 m_V[0][6] = 48*twentyfifth;
448 m_V[0][7] = -12*twentyfifth;
461 m_timeLevelOffset[1] = 1;
462 m_timeLevelOffset[2] = 2;
463 m_timeLevelOffset[3] = 3;
464 m_timeLevelOffset[4] = 0;
465 m_timeLevelOffset[5] = 1;
466 m_timeLevelOffset[6] = 2;
467 m_timeLevelOffset[7] = 3;
497 m_timeLevelOffset[1] = 0;
514 m_B[0][0][0] = 2*third;
529 m_timeLevelOffset[1] = 1;
599 m_B[0][0][0] = 1.0/6.0;
600 m_B[0][0][1] = 1.0/6.0;
601 m_B[0][0][2] = 2.0/3.0;
628 m_B[0][0][0] = 1.0/6.0;
629 m_B[0][0][1] = 1.0/3.0;
630 m_B[0][0][2] = 1.0/3.0;
631 m_B[0][0][3] = 1.0/6.0;
653 m_A[0][1][0] = 1.0/4.0;
654 m_A[0][2][0] = 1.0/8.0;
655 m_A[0][2][1] = 1.0/8.0;
656 m_A[0][3][2] = 1.0/2.0;
657 m_A[0][4][0] = 3.0/16.0;
658 m_A[0][4][1] = -3.0/8.0;
659 m_A[0][4][2] = 3.0/8.0;
660 m_A[0][4][3] = 9.0/16.0;
661 m_A[0][5][0] = -3.0/7.0;
662 m_A[0][5][1] = 8.0/7.0;
663 m_A[0][5][2] = 6.0/7.0;
664 m_A[0][5][3] = -12.0/7.0;
665 m_A[0][5][4] = 8.0/7.0;
667 m_B[0][0][0] = 7.0/90.0;
668 m_B[0][0][2] = 32.0/90.0;
669 m_B[0][0][3] = 12.0/90.0;
670 m_B[0][0][4] = 32.0/90.0;
671 m_B[0][0][5] = 7.0/90.0;
695 m_A[0][0][0] = lambda;
696 m_A[0][1][0] = 1.0 - lambda;
697 m_A[0][1][1] = lambda;
699 m_B[0][0][0] = 1.0 - lambda;
700 m_B[0][0][1] = lambda;
724 m_A[0][0][0] = lambda;
725 m_A[0][1][0] = 0.5 * (1.0 - lambda);
726 m_A[0][2][0] = 0.25 * (-6.0*lambda*lambda + 16.0*lambda - 1.0);
727 m_A[0][1][1] = lambda;
728 m_A[0][2][1] = 0.25 * ( 6.0*lambda*lambda - 20.0*lambda + 5.0);
729 m_A[0][2][2] = lambda;
731 m_B[0][0][0] = 0.25 * (-6.0*lambda*lambda + 16.0*lambda - 1.0);
732 m_B[0][0][1] = 0.25 * ( 6.0*lambda*lambda - 20.0*lambda + 5.0);
733 m_B[0][0][2] = lambda;
760 m_A[0][1][1] = lambda;
761 m_A[0][2][1] = 1.0 - lambda;
762 m_A[0][2][2] = lambda;
764 m_B[0][0][1] = 1.0 - lambda;
765 m_B[0][0][2] = lambda;
767 m_A[1][1][0] = lambda;
768 m_A[1][2][0] = delta;
769 m_A[1][2][1] = 1.0 - delta;
771 m_B[1][0][1] = 1.0 - lambda;
772 m_B[1][0][2] = lambda;
798 m_A[0][1][1] = lambda;
799 m_A[0][2][1] = 0.5 * (1.0 - lambda);
800 m_A[0][3][1] = 0.25 * (-6.0*lambda*lambda + 16.0*lambda - 1.0);
801 m_A[0][2][2] = lambda;
802 m_A[0][3][2] = 0.25 * ( 6.0*lambda*lambda - 20.0*lambda + 5.0);
803 m_A[0][3][3] = lambda;
805 m_B[0][0][1] = 0.25 * (-6.0*lambda*lambda + 16.0*lambda - 1.0);
806 m_B[0][0][2] = 0.25 * ( 6.0*lambda*lambda - 20.0*lambda + 5.0);
807 m_B[0][0][3] = lambda;
809 m_A[1][1][0] = 0.4358665215;
810 m_A[1][2][0] = 0.3212788860;
811 m_A[1][2][1] = 0.3966543747;
812 m_A[1][3][0] =-0.105858296;
813 m_A[1][3][1] = 0.5529291479;
814 m_A[1][3][2] = 0.5529291479;
816 m_B[1][0][1] = 0.25 * (-6.0*lambda*lambda + 16.0*lambda - 1.0);
817 m_B[1][0][2] = 0.25 * ( 6.0*lambda*lambda - 20.0*lambda + 5.0);
818 m_B[1][0][3] = lambda;
843 m_B[0][0][0] = secondth;
846 m_U[0][0] = 2*secondth;
847 m_U[0][2] = 3*secondth;
848 m_U[0][3] = -1*secondth;
850 m_V[0][0] = 2*secondth;
851 m_V[0][1] = secondth;
852 m_V[0][2] = 3*secondth;
853 m_V[0][3] = -1*secondth;
861 m_timeLevelOffset[1] = 0;
862 m_timeLevelOffset[2] = 0;
863 m_timeLevelOffset[3] = 1;
882 m_B[0][0][0] = twothirdth;
884 m_U[0][0] = 2*twothirdth;
885 m_U[0][1] = -0.5*twothirdth;
886 m_U[0][2] = twothirdth;
888 m_V[0][0] = 2*twothirdth;
889 m_V[0][1] = -0.5*twothirdth;
890 m_V[0][2] = twothirdth;
898 m_timeLevelOffset[1] = 1;
899 m_timeLevelOffset[2] = 0;
918 m_B[0][0][0] = sixthx;
922 m_U[0][1] = 6.0/16.0;
923 m_U[0][2] = 1.0/16.0;
928 m_V[0][1] = 6.0/16.0;
929 m_V[0][2] = 1.0/16.0;
940 m_timeLevelOffset[1] = 0;
941 m_timeLevelOffset[2] = 1;
942 m_timeLevelOffset[3] = 0;
943 m_timeLevelOffset[4] = 1;
961 NekDouble glambda = 0.2928932188134524756;
962 NekDouble gdelta = -0.7071067811865475244;
964 m_A[0][1][1] = glambda;
965 m_A[0][2][1] = 1.0 - glambda;
966 m_A[0][2][2] = glambda;
968 m_B[0][0][1] = 1.0 - glambda;
969 m_B[0][0][2] = glambda;
971 m_A[1][1][0] = glambda;
972 m_A[1][2][0] = gdelta;
973 m_A[1][2][1] = 1.0 - gdelta;
975 m_B[1][0][0] = gdelta;
976 m_B[1][0][1] = 1.0 - gdelta;
1000 NekDouble glambda = 0.78867513459481288226;
1002 m_A[0][1][1] = glambda;
1003 m_A[0][2][1] = 1.0 - 2.0*glambda;
1004 m_A[0][2][2] = glambda;
1009 m_A[1][1][0] = glambda;
1010 m_A[1][2][0] = glambda - 1.0;
1011 m_A[1][2][1] = 2.0*(1-glambda);
1098 m_A[0][1][1] = 1.0/2.0;
1102 m_A[1][1][0] = 1.0/2.0;
1128 m_A[0][1][1] = 1.0/2.0;
1129 m_A[0][2][1] = 1.0/6.0;
1130 m_A[0][2][2] = 1.0/2.0;
1131 m_A[0][3][1] = -1.0/2.0;
1132 m_A[0][3][2] = 1.0/2.0;
1133 m_A[0][3][3] = 1.0/2.0;
1134 m_A[0][4][1] = 3.0/2.0;
1135 m_A[0][4][2] = -3.0/2.0;
1136 m_A[0][4][3] = 1.0/2.0;
1137 m_A[0][4][4] = 1.0/2.0;
1139 m_B[0][0][1] = 3.0/2.0;
1140 m_B[0][0][2] = -3.0/2.0;
1141 m_B[0][0][3] = 1.0/2.0;
1142 m_B[0][0][4] = 1.0/2.0;
1144 m_A[1][1][0] = 1.0/2.0;
1145 m_A[1][2][0] = 11.0/18.0;
1146 m_A[1][2][1] = 1.0/18.0;
1147 m_A[1][3][0] = 5.0/6.0;
1148 m_A[1][3][1] = -5.0/6.0;
1149 m_A[1][3][2] = 1.0/2.0;
1150 m_A[1][4][0] = 1.0/4.0;
1151 m_A[1][4][1] = 7.0/4.0;
1152 m_A[1][4][2] = 3.0/4.0;
1153 m_A[1][4][3] = -7.0/4.0;
1155 m_B[1][0][0] = 1.0/4.0;
1156 m_B[1][0][1] = 7.0/4.0;
1157 m_B[1][0][2] = 3.0/4.0;
1158 m_B[1][0][3] = -7.0/4.0;
1177 "Time integration scheme coefficients do not match its type");
1188 boost::ignore_unused(
B, U, V);
1193 int IMEXdim =
A.num_elements();
1194 int dim =
A[0].GetRows();
1198 for(m = 0; m < IMEXdim; m++)
1200 for(i = 0; i < dim; i++)
1208 for(i = 0; i < dim; i++)
1210 for(j = i+1; j < dim; j++)
1215 ASSERTL1(
false,
"Fully Implicit schemes cannnot be handled by the TimeIntegrationScheme class");
1223 ASSERTL1(
B.num_elements()==2,
"Coefficient Matrix B should have an implicit and explicit part for IMEX schemes");
1231 ASSERTL1(
false,
"This is not a proper IMEX scheme");
1235 return (vertype[0] == type);
1263 int nvar = y_0.num_elements();
1264 int npoints = y_0[0].num_elements();
1266 for(i = 0; i < nvar; i++)
1274 for(i = 0; i < nvar; i++)
1278 y_out->SetDerivative(0,f_y_0,timestep);
1291 "Fully Implicit integration scheme cannot be handled by this routine.");
1293 int nvar = solvector->GetFirstDim ();
1294 int npoints = solvector->GetSecondDim();
1296 if( (solvector->GetIntegrationScheme()).
get() != this )
1332 unsigned int nMasterSchemeVals = solvector->GetNvalues();
1333 unsigned int nMasterSchemeDers = solvector->GetNderivs();
1346 for(n = 0; n < nCurSchemeVals; n++)
1352 y_n = solvector->GetValue ( curTimeLevels[n] );
1353 t_n = solvector->GetValueTime( curTimeLevels[n] );
1357 solvector_in->SetValue(curTimeLevels[n],y_n,t_n);
1359 for(n = nCurSchemeVals; n < nCurSchemeSteps; n++)
1364 dtFy_n = solvector->GetDerivative ( curTimeLevels[n] );
1368 solvector_in->SetDerivative(curTimeLevels[n],dtFy_n,timestep);
1377 solvector_in->GetTimeVector(),
1378 solvector_out->UpdateSolutionVector(),
1379 solvector_out->UpdateTimeVector(),op);
1393 bool CalcNewDeriv =
false;
1395 if( nMasterSchemeDers > 0 )
1397 if(nCurSchemeDers == 0)
1399 CalcNewDeriv =
true;
1403 if( masterTimeLevels[nMasterSchemeVals] < curTimeLevels[nCurSchemeVals] )
1405 CalcNewDeriv =
true;
1412 int newDerivTimeLevel = masterTimeLevels[nMasterSchemeVals];
1419 if (newDerivTimeLevel == 0)
1421 y_n = solvector_out->GetValue(0);
1422 t_n = solvector_out->GetValueTime(0);
1426 else if( newDerivTimeLevel == 1 )
1428 y_n = solvector->GetValue(0);
1429 t_n = solvector->GetValueTime(0);
1433 ASSERTL1(
false,
"Problems with initialising scheme");
1437 for(j = 0; j < nvar; j++)
1446 for(j = 0; j < nvar; j++)
1454 solvector->RotateSolutionVector();
1456 solvector->SetDerivative(newDerivTimeLevel,f_n,timestep);
1462 solvector->RotateSolutionVector();
1469 for(n = 0; n < nCurSchemeVals; n++)
1475 y_n = solvector_out->GetValue ( curTimeLevels[n] );
1476 t_n = solvector_out->GetValueTime( curTimeLevels[n] );
1479 solvector->SetValue(curTimeLevels[n],y_n,t_n);
1482 for(n = nCurSchemeVals; n < nCurSchemeSteps; n++)
1488 dtFy_n = solvector_out->GetDerivative ( curTimeLevels[n] );
1492 solvector->SetDerivative(curTimeLevels[n],dtFy_n,timestep);
1502 solvector->GetTimeVector(),
1503 solvector_new->UpdateSolutionVector(),
1504 solvector_new->UpdateTimeVector(),op);
1506 solvector = solvector_new;
1508 return solvector->GetSolution();
1528 for(j = 0; j <
m_nvar; j++)
1552 for(j = 0; j <
m_nvar; j++)
1566 for(j = 0; j <
m_nvar; j++)
1578 for(j = 0; j <
m_nvar; j++)
1590 for(j = 0; j <
m_nvar; j++)
1606 for(k = 0; k <
m_nvar; k++)
1619 for(k = 0; k <
m_nvar; k++)
1632 m_T =
A(i,0)*timestep;
1634 for( j = 1; j < i; j++ )
1636 for(k = 0; k <
m_nvar; k++)
1648 m_T +=
A(i,j)*timestep;
1655 for(k = 0; k <
m_nvar; k++)
1660 m_T +=
U(i,j)*t_old[j];
1669 m_T= t_old[0]+timestep;
1674 for(
int j=0; j<=i; ++j)
1676 m_T +=
A(i,j)*timestep;
1682 for(k = 0; k <
m_nvar; k++)
1688 else if(type ==
eIMEX)
1692 m_T= t_old[0]+timestep;
1697 for(
int j=0; j<=i; ++j)
1699 m_T +=
A(i,j)*timestep;
1707 for(k = 0; k <
m_nvar; k++)
1711 m_F[i][k],1,
m_F[i][k],1);
1743 for(k = 0; k <
m_nvar; k++)
1748 if (m_numstages==1 && type ==
eIMEX)
1750 t_new[0] = t_old[0]+timestep;
1754 t_new[0] =
B(0,0)*timestep;
1757 t_new[0] +=
B(0,j)*timestep;
1761 t_new[0] +=
V(0,j)*t_old[j];
1772 for(k = 0; k <
m_nvar; k++)
1784 if(m_numstages != 1 || type !=
eIMEX)
1786 t_new[i] =
B(i,0)*timestep;
1792 for(k = 0; k <
m_nvar; k++)
1795 y_new[i][k],1,y_new[i][k],1);
1804 if(m_numstages != 1 || type !=
eIMEX)
1806 t_new[i] +=
B(i,j)*timestep;
1814 for(k = 0; k <
m_nvar; k++)
1817 y_new[i][k],1,y_new[i][k],1);
1819 if(m_numstages != 1 || type !=
eIMEX)
1821 t_new[i] +=
V(i,j)*t_old[j];
1838 boost::ignore_unused(
B, V);
1846 for(m = 0; m <
A.num_elements(); m++)
1884 for(m = 0; m <
A.num_elements(); m++)
1914 boost::ignore_unused(timestep, y_old, t_old, y_new, t_new, op);
1920 ASSERTL1(y_old[0]. num_elements()==y_new[0]. num_elements(),
"Non-matching number of variables.");
1921 ASSERTL1(y_old[0][0].num_elements()==y_new[0][0].num_elements(),
"Non-matching number of coefficients.");
1942 int osprecision = 6;
1945 os <<
"- number of steps: " << r << std::endl;
1946 os <<
"- number of stages: " << s << std::endl;
1948 os <<
"General linear method tableau: " << std::endl;
1950 for(i = 0; i < s; i++)
1952 for(j = 0; j < s; j++)
1955 os.precision(osprecision);
1956 os << std::right << rhs.
A(i,j) <<
" ";
1961 for(j = 0; j < s; j++)
1964 os.precision(osprecision);
1965 os << std::right << rhs.
A_IMEX(i,j) <<
" ";
1970 for(j = 0; j < r; j++)
1973 os.precision(osprecision);
1974 os << std::right << rhs.
U(i,j);
1978 int imexflag = (type ==
eIMEX)?2:1;
1979 for(
int i = 0; i < (r+imexflag*s)*(oswidth+1)+imexflag*2-1; i++)
1984 for(i = 0; i < r; i++)
1986 for(j = 0; j < s; j++)
1989 os.precision(osprecision);
1990 os << std::right << rhs.
B(i,j) <<
" ";
1995 for(j = 0; j < s; j++)
1998 os.precision(osprecision);
1999 os << std::right << rhs.
B_IMEX(i,j) <<
" ";
2004 for(j = 0; j < r; j++)
2007 os.precision(osprecision);
2008 os << std::right << rhs.
V(i,j);
NekDouble A(const unsigned int i, const unsigned int j) const
bool CheckIfLastStageEqualsNewSolution(const Array< OneD, const Array< TwoD, NekDouble > > &A, const Array< OneD, const Array< TwoD, NekDouble > > &B, const Array< TwoD, const NekDouble > &U, const Array< TwoD, const NekDouble > &V) const
unsigned int GetNsteps(void) const
NekDouble B(const unsigned int i, const unsigned int j) const
std::shared_ptr< TimeIntegrationScheme > TimeIntegrationSchemeSharedPtr
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
bool m_firstStageEqualsOldSolution
BDF multi-step scheme of order 1 (implicit)
Array< OneD, unsigned int > m_timeLevelOffset
Adams-Bashforth Forward multi-step scheme of order 2.
Array< OneD, Array< TwoD, NekDouble > > m_B
void DoImplicitSolve(InArrayType &inarray, OutArrayType &outarray, const NekDouble time, const NekDouble lambda) const
int m_nvar
bool to identify if array has been initialised
Runge-Kutta multi-stage scheme 4th order explicit (old name)
Implicit-Explicit Midpoint IMEX DIRK(1,2,2)
bool CheckTimeIntegrateArguments(const NekDouble timestep, ConstTripleArray &y_old, ConstSingleArray &t_old, TripleArray &y_new, SingleArray &t_new, const TimeIntegrationSchemeOperators &op) const
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
const char *const TimeIntegrationSchemeTypeMap[]
void DoOdeRhs(InArrayType &inarray, OutArrayType &outarray, const NekDouble time) const
DoubleArray m_tmp
Array containing the stage values.
NekDouble V(const unsigned int i, const unsigned int j) const
Classical RungeKutta4 method (new name for eClassicalRungeKutta4)
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
Formally explicit scheme.
TimeIntegrationSolutionSharedPtr InitializeScheme(const NekDouble timestep, ConstDoubleArray &y_0, const NekDouble time, const TimeIntegrationSchemeOperators &op)
This function initialises the time integration scheme.
L-stable, four stage, third order IMEX DIRK(4,4,3)
Forward-Backward Euler IMEX DIRK(1,2,1)
Implicit Explicit General Linear Method.
const char *const TimeIntegrationMethodMap[]
TimeIntegrationSchemeKey m_schemeKey
Nonlinear SSP RungeKutta3 explicit.
TimeIntegrationMethod GetIntegrationMethod() const
DoubleArray m_Y
The size of inner data which is stored for reuse.
TimeIntegrationSchemeManagerT & TimeIntegrationSchemeManager(void)
Adams-Moulton Forward multi-step scheme of order 2.
Adams-Bashforth Forward multi-step scheme of order 3.
NekDouble A_IMEX(const unsigned int i, const unsigned int j) const
bool operator==(const BasisKey &x, const BasisKey &y)
Crank-Nicolson/Adams-Bashforth Order 2 (CNAB)
TimeIntegrationSchemeSharedPtr m_scheme
IMEX 2nd order scheme using Backward Different Formula & Extrapolation.
std::ostream & operator<<(std::ostream &os, const BasisKey &rhs)
TripleArray m_F
explicit right hand side of each stage equation
Diagonally implicit scheme (e.g. the DIRK schemes)
Classical RungeKutta2 method (new name for eMidpoint)
TimeIntegrationSchemeType m_schemeType
static const NekDouble kNekZeroTol
bool VerifyIntegrationSchemeType(TimeIntegrationSchemeType type, const Array< OneD, const Array< TwoD, NekDouble > > &A, const Array< OneD, const Array< TwoD, NekDouble > > &B, const Array< TwoD, const NekDouble > &U, const Array< TwoD, const NekDouble > &V) const
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Adams-Moulton Forward multi-step scheme of order 1.
Adams-Bashforth Forward multi-step scheme of order 1.
TimeIntegrationSolution(const TimeIntegrationSchemeKey &key, const DoubleArray &y, const NekDouble time, const NekDouble timestep)
NekDouble U(const unsigned int i, const unsigned int j) const
L-stable, three stage, third order IMEX DIRK(3,4,3)
void DoProjection(InArrayType &inarray, OutArrayType &outarray, const NekDouble time) const
int m_npoints
The number of variables in integration scheme.
Nonlinear SSP RungeKutta2 explicit (surrogate for eRungeKutta2_ImprovedEuler)
ConstDoubleArray & TimeIntegrate(const NekDouble timestep, TimeIntegrationSolutionSharedPtr &y, const TimeIntegrationSchemeOperators &op)
Explicit integration of an ODE.
Improved RungeKutta2 explicit (old name meaning Heun's method)
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
unsigned int GetNstages(void) const
Forward-Backward Euler IMEX DIRK(1,1,1)
Array< OneD, Array< OneD, NekDouble > > DoubleArray
NekDouble B_IMEX(const unsigned int i, const unsigned int j) const
bool CheckIfFirstStageEqualsOldSolution(const Array< OneD, const Array< TwoD, NekDouble > > &A, const Array< OneD, const Array< TwoD, NekDouble > > &B, const Array< TwoD, const NekDouble > &U, const Array< TwoD, const NekDouble > &V) const
bool operator<(const BasisKey &lhs, const BasisKey &rhs)
TimeIntegrationSchemeType GetIntegrationSchemeType() const
unsigned int m_numMultiStepDerivs
static std::shared_ptr< TimeIntegrationScheme > Create(const TimeIntegrationSchemeKey &key)
unsigned int m_numMultiStepValues
bool operator()(const TimeIntegrationSchemeKey &lhs, const TimeIntegrationSchemeKey &rhs) const
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.
Array< OneD, NekDouble > m_t
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
BDF multi-step scheme of order 2 (implicit)
L-stable, two stage, second order IMEX DIRK(2,2,2)
TimeIntegrationMethod m_method
integration method
Diagonally Implicit Runge Kutta scheme of order 2.
IMEX 3rd order scheme using Backward Different Formula & Extrapolation.
L-stable, three stage, third order IMEX DIRK(3,4,3)
Diagonally Implicit Runge Kutta scheme of order 3.
bool RegisterGlobalCreator(const CreateFuncType &createFunc)
Register the Global Create Function. The return value is just to facilitate calling statically...
const TimeIntegrationSchemeKey & GetIntegrationSchemeKey() const
TimeIntegrationMethod GetIntegrationMethod() const
L-stable, two stage, third order IMEX DIRK(2,3,3)
IMEX 4th order scheme using Backward Different Formula & Extrapolation.
bool m_lastStageEqualsNewSolution
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs
int GetSecondDim(ConstTripleArray &y) const
Array< OneD, Array< TwoD, NekDouble > > m_A
Modified Crank-Nicolson/Adams-Bashforth Order 2 (MCNAB)
IMEX 1st order scheme using Euler Backwards/Euler Forwards.
midpoint method (old name)
const Array< OneD, const unsigned int > & GetTimeLevelOffset()
void Zero(int n, T *x, const int incx)
Zero vector.
NekDouble m_T
Used to store the Explicit stage derivative of IMEX schemes.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > TripleArray
std::shared_ptr< TimeIntegrationSolution > TimeIntegrationSolutionSharedPtr
Array< TwoD, NekDouble > m_U
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Adams-Bashforth Forward multi-step scheme of order 4.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
TripleArray m_F_IMEX
Array corresponding to the stage Derivatives.
int GetFirstDim(ConstTripleArray &y) const
TimeIntegrationSchemeType
Array< TwoD, NekDouble > m_V