9 #ifndef Tempus_StepperRKButcherTableau_hpp
10 #define Tempus_StepperRKButcherTableau_hpp
14 #pragma clang system_header
17 #include "Tempus_config.hpp"
18 #include "Tempus_StepperExplicitRK.hpp"
19 #include "Tempus_StepperDIRK.hpp"
40 template<
class Scalar>
64 std::string ICConsistency,
65 bool ICConsistencyCheck,
72 this->
setup(appModel, useFSAL, ICConsistency,
73 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
78 std::ostringstream Description;
83 return Description.str();
111 template<
class Scalar>
120 if (pl != Teuchos::null) {
122 pl->
get<std::string>(
"Stepper Type", stepper->getStepperType());
125 stepperType != stepper->getStepperType() &&
126 stepperType !=
"RK1", std::logic_error,
127 " ParameterList 'Stepper Type' (='" + stepperType +
"')\n"
128 " does not match type for this Stepper (='" + stepper->getStepperType() +
129 "')\n or one of its aliases ('RK1').\n");
132 pl->
set<std::string>(
"Stepper Type", stepper->getStepperType());
135 stepper->setStepperRKValues(pl);
137 if (model != Teuchos::null) {
138 stepper->setModel(model);
139 stepper->initialize();
163 template<
class Scalar>
187 std::string ICConsistency,
188 bool ICConsistencyCheck,
195 this->
setup(appModel, useFSAL, ICConsistency,
196 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
201 std::ostringstream Description;
203 <<
"\"The\" Runge-Kutta Method (explicit):\n"
204 <<
"Solving Ordinary Differential Equations I:\n"
205 <<
"Nonstiff Problems, 2nd Revised Edition\n"
206 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
207 <<
"Table 1.2, pg 138\n"
208 <<
"c = [ 0 1/2 1/2 1 ]'\n"
213 <<
"b = [ 1/6 1/3 1/3 1/6 ]'";
214 return Description.str();
220 const Scalar one = ST::one();
221 const Scalar zero = ST::zero();
222 const Scalar onehalf = one/(2*one);
223 const Scalar onesixth = one/(6*one);
224 const Scalar onethird = one/(3*one);
232 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero;
233 A(1,0) = onehalf; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero;
234 A(2,0) = zero; A(2,1) = onehalf; A(2,2) = zero; A(2,3) = zero;
235 A(3,0) = zero; A(3,1) = zero; A(3,2) = one; A(3,3) = zero;
238 b(0) = onesixth; b(1) = onethird; b(2) = onethird; b(3) = onesixth;
241 c(0) = zero; c(1) = onehalf; c(2) = onehalf; c(3) = one;
253 template<
class Scalar>
260 stepper->setStepperRKValues(pl);
262 if (model != Teuchos::null) {
263 stepper->setModel(model);
264 stepper->initialize();
293 template<
class Scalar>
317 std::string ICConsistency,
318 bool ICConsistencyCheck,
325 this->
setup(appModel, useFSAL, ICConsistency,
326 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
331 std::ostringstream Description;
333 <<
"P. Bogacki and L.F. Shampine.\n"
334 <<
"A 3(2) pair of Runge–Kutta formulas.\n"
335 <<
"Applied Mathematics Letters, 2(4):321 – 325, 1989.\n"
336 <<
"c = [ 0 1/2 3/4 1 ]'\n"
340 <<
" [ 2/9 1/3 4/9 0 ]\n"
341 <<
"b = [ 2/9 1/3 4/9 0 ]'\n"
342 <<
"bstar = [ 7/24 1/4 1/3 1/8 ]'";
343 return Description.str();
360 const Scalar one = ST::one();
361 const Scalar zero = ST::zero();
362 const Scalar onehalf = one/(2*one);
363 const Scalar onethird = one/(3*one);
364 const Scalar threefourths = (3*one)/(4*one);
365 const Scalar twoninths = (2*one)/(9*one);
366 const Scalar fourninths = (4*one)/(9*one);
369 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero;
370 A(1,0) = onehalf; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero;
371 A(2,0) = zero; A(2,1) =threefourths; A(2,2) = zero; A(2,3) = zero;
372 A(3,0) =twoninths; A(3,1) = onethird; A(3,2) =fourninths; A(3,3) = zero;
375 b(0) = A(3,0); b(1) = A(3,1); b(2) = A(3,2); b(3) = A(3,3);
378 c(0) = zero; c(1) = onehalf; c(2) = threefourths; c(3) = one;
381 bstar(0) = as<Scalar>(7*one/(24*one));
382 bstar(1) = as<Scalar>(1*one/(4*one));
383 bstar(2) = as<Scalar>(1*one/(3*one));
384 bstar(3) = as<Scalar>(1*one/(8*one));
395 template<
class Scalar>
402 stepper->setStepperRKValues(pl);
404 if (model != Teuchos::null) {
405 stepper->setModel(model);
406 stepper->initialize();
438 template<
class Scalar>
462 std::string ICConsistency,
463 bool ICConsistencyCheck,
470 this->
setup(appModel, useFSAL, ICConsistency,
471 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
476 std::ostringstream Description;
478 <<
"Solving Ordinary Differential Equations I:\n"
479 <<
"Nonstiff Problems, 2nd Revised Edition\n"
480 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
481 <<
"Table 4.1, pg 167\n"
482 <<
"c = [ 0 1/3 1/3 1/2 1 ]'\n"
485 <<
" [ 1/6 1/6 0 ]\n"
486 <<
" [ 1/8 0 3/8 0 ]\n"
487 <<
" [ 1/2 0 -3/2 2 0 ]\n"
488 <<
"b = [ 1/6 0 0 2/3 1/6 ]'\n"
489 <<
"bstar = [ 1/10 0 3/10 2/5 1/5 ]'";
490 return Description.str();
506 const Scalar one = ST::one();
507 const Scalar zero = ST::zero();
510 A(1,0) = as<Scalar>(one/(3*one));;
512 A(2,0) = as<Scalar>(one/(6*one));;
513 A(2,1) = as<Scalar>(one/(6*one));;
515 A(3,0) = as<Scalar>(one/(8*one));;
516 A(3,2) = as<Scalar>(3*one/(8*one));;
518 A(4,0) = as<Scalar>(one/(2*one));;
519 A(4,2) = as<Scalar>(-3*one/(2*one));;
523 b(0) = as<Scalar>(one/(6*one));
524 b(3) = as<Scalar>(2*one/(3*one));
525 b(4) = as<Scalar>(one/(6*one));
529 c(1) = as<Scalar>(1*one/(3*one));
530 c(2) = as<Scalar>(1*one/(3*one));
531 c(3) = as<Scalar>(1*one/(2*one));
535 bstar(0) = as<Scalar>(1*one/(10*one));
536 bstar(2) = as<Scalar>(3*one/(10*one));
537 bstar(3) = as<Scalar>(2*one/(5*one));
538 bstar(4) = as<Scalar>(1*one/(5*one));
549 template<
class Scalar>
556 stepper->setStepperRKValues(pl);
558 if (model != Teuchos::null) {
559 stepper->setModel(model);
560 stepper->initialize();
588 template<
class Scalar>
608 std::string ICConsistency,
609 bool ICConsistencyCheck,
616 this->
setup(appModel, useFSAL, ICConsistency,
617 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
622 std::ostringstream Description;
624 <<
"Solving Ordinary Differential Equations I:\n"
625 <<
"Nonstiff Problems, 2nd Revised Edition\n"
626 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
627 <<
"Table 1.2, pg 138\n"
628 <<
"c = [ 0 1/3 2/3 1 ]'\n"
633 <<
"b = [ 1/8 3/8 3/8 1/8 ]'";
634 return Description.str();
649 const Scalar one = ST::one();
650 const Scalar zero = ST::zero();
651 const Scalar onethird = as<Scalar>(one/(3*one));
652 const Scalar twothirds = as<Scalar>(2*one/(3*one));
653 const Scalar oneeighth = as<Scalar>(one/(8*one));
654 const Scalar threeeighths = as<Scalar>(3*one/(8*one));
657 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero;
658 A(1,0) = onethird; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero;
659 A(2,0) = -onethird; A(2,1) = one; A(2,2) = zero; A(2,3) = zero;
660 A(3,0) = one; A(3,1) = -one; A(3,2) = one; A(3,3) = zero;
663 b(0) =oneeighth; b(1) =threeeighths; b(2) =threeeighths; b(3) =oneeighth;
666 c(0) = zero; c(1) = onethird; c(2) = twothirds; c(3) = one;
678 template<
class Scalar>
685 stepper->setStepperRKValues(pl);
687 if (model != Teuchos::null) {
688 stepper->setModel(model);
689 stepper->initialize();
717 template<
class Scalar>
741 std::string ICConsistency,
742 bool ICConsistencyCheck,
749 this->
setup(appModel, useFSAL, ICConsistency,
750 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
755 std::ostringstream Description;
757 <<
"Solving Ordinary Differential Equations I:\n"
758 <<
"Nonstiff Problems, 2nd Revised Edition\n"
759 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
760 <<
"Table 1.1, pg 135\n"
761 <<
"c = [ 0 1/2 1 1 ]'\n"
766 <<
"b = [ 1/6 2/3 0 1/6 ]'";
767 return Description.str();
779 const Scalar one = ST::one();
780 const Scalar onehalf = one/(2*one);
781 const Scalar onesixth = one/(6*one);
782 const Scalar twothirds = 2*one/(3*one);
783 const Scalar zero = ST::zero();
786 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero;
787 A(1,0) = onehalf; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero;
788 A(2,0) = zero; A(2,1) = one; A(2,2) = zero; A(2,3) = zero;
789 A(3,0) = zero; A(3,1) = zero; A(3,2) = one; A(3,3) = zero;
792 b(0) = onesixth; b(1) = twothirds; b(2) = zero; b(3) = onesixth;
795 c(0) = zero; c(1) = onehalf; c(2) = one; c(3) = one;
807 template<
class Scalar>
814 stepper->setStepperRKValues(pl);
816 if (model != Teuchos::null) {
817 stepper->setModel(model);
818 stepper->initialize();
845 template<
class Scalar>
857 this->
setStepperName(
"RK Explicit 5 Stage 3rd order by Kinnmark and Gray");
858 this->
setStepperType(
"RK Explicit 5 Stage 3rd order by Kinnmark and Gray");
869 std::string ICConsistency,
870 bool ICConsistencyCheck,
874 this->
setStepperName(
"RK Explicit 5 Stage 3rd order by Kinnmark and Gray");
875 this->
setStepperType(
"RK Explicit 5 Stage 3rd order by Kinnmark and Gray");
877 this->
setup(appModel, useFSAL, ICConsistency,
878 ICConsistencyCheck, useEmbedded,stepperRKAppAction);
883 std::ostringstream Description;
885 <<
"Kinnmark & Gray 5 stage, 3rd order scheme \n"
886 <<
"Modified by P. Ullrich. From the prim_advance_mod.F90 \n"
887 <<
"routine in the HOMME atmosphere model code.\n"
888 <<
"c = [ 0 1/5 1/5 1/3 2/3 ]'\n"
892 <<
" [ 0 0 1/3 0 ]\n"
893 <<
" [ 0 0 0 2/3 0 ]\n"
894 <<
"b = [ 1/4 0 0 0 3/4 ]'";
895 return Description.str();
908 const Scalar one = ST::one();
909 const Scalar onefifth = one/(5*one);
910 const Scalar onefourth = one/(4*one);
911 const Scalar onethird = one/(3*one);
912 const Scalar twothirds = 2*one/(3*one);
913 const Scalar threefourths = 3*one/(4*one);
914 const Scalar zero = ST::zero();
917 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero; A(0,4) = zero;
918 A(1,0) = onefifth; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero; A(1,4) = zero;
919 A(2,0) = zero; A(2,1) = onefifth; A(2,2) = zero; A(2,3) = zero; A(2,4) = zero;
920 A(3,0) = zero; A(3,1) = zero; A(3,2) = onethird; A(3,3) = zero; A(3,4) = zero;
921 A(4,0) = zero; A(4,1) = zero; A(4,2) = zero; A(4,3) = twothirds; A(4,4) = zero;
924 b(0) =onefourth; b(1) =zero; b(2) =zero; b(3) =zero; b(4) =threefourths;
927 c(0) =zero; c(1) =onefifth; c(2) =onefifth; c(3) =onethird; c(4) =twothirds;
939 template<
class Scalar>
946 stepper->setStepperRKValues(pl);
948 if (model != Teuchos::null) {
949 stepper->setModel(model);
950 stepper->initialize();
973 template<
class Scalar>
997 std::string ICConsistency,
998 bool ICConsistencyCheck,
1005 this->
setup(appModel, useFSAL, ICConsistency,
1006 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1011 std::ostringstream Description;
1013 <<
"c = [ 0 1/2 1 ]'\n"
1017 <<
"b = [ 1/6 4/6 1/6 ]'";
1018 return Description.str();
1026 const Scalar one = ST::one();
1027 const Scalar two = Teuchos::as<Scalar>(2*one);
1028 const Scalar zero = ST::zero();
1029 const Scalar onehalf = one/(2*one);
1030 const Scalar onesixth = one/(6*one);
1031 const Scalar foursixth = 4*one/(6*one);
1039 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero;
1040 A(1,0) = onehalf; A(1,1) = zero; A(1,2) = zero;
1041 A(2,0) = -one; A(2,1) = two; A(2,2) = zero;
1044 b(0) = onesixth; b(1) = foursixth; b(2) = onesixth;
1047 c(0) = zero; c(1) = onehalf; c(2) = one;
1059 template<
class Scalar>
1066 stepper->setStepperRKValues(pl);
1068 if (model != Teuchos::null) {
1069 stepper->setModel(model);
1070 stepper->initialize();
1104 template<
class Scalar>
1128 std::string ICConsistency,
1129 bool ICConsistencyCheck,
1136 this->
setup(appModel, useFSAL, ICConsistency,
1137 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1142 std::ostringstream Description;
1144 <<
"This Stepper is known as 'RK Explicit 3 Stage 3rd order TVD' or 'SSPERK33'.\n"
1145 <<
"Sigal Gottlieb and Chi-Wang Shu\n"
1146 <<
"`Total Variation Diminishing Runge-Kutta Schemes'\n"
1147 <<
"Mathematics of Computation\n"
1148 <<
"Volume 67, Number 221, January 1998, pp. 73-85\n"
1149 <<
"c = [ 0 1 1/2 ]'\n"
1152 <<
" [ 1/4 1/4 0 ]\n"
1153 <<
"b = [ 1/6 1/6 4/6 ]'\n"
1154 <<
"This is also written in the following set of updates.\n"
1155 <<
"u1 = u^n + dt L(u^n)\n"
1156 <<
"u2 = 3 u^n/4 + u1/4 + dt L(u1)/4\n"
1157 <<
"u^(n+1) = u^n/3 + 2 u2/2 + 2 dt L(u2)/3";
1158 return Description.str();
1167 const Scalar one = ST::one();
1168 const Scalar zero = ST::zero();
1169 const Scalar onehalf = one/(2*one);
1170 const Scalar onefourth = one/(4*one);
1171 const Scalar onesixth = one/(6*one);
1172 const Scalar foursixth = 4*one/(6*one);
1181 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero;
1182 A(1,0) = one; A(1,1) = zero; A(1,2) = zero;
1183 A(2,0) = onefourth; A(2,1) = onefourth; A(2,2) = zero;
1186 b(0) = onesixth; b(1) = onesixth; b(2) = foursixth;
1189 c(0) = zero; c(1) = one; c(2) = onehalf;
1192 bstar(0) = as<Scalar>(0.291485418878409);
1193 bstar(1) = as<Scalar>(0.291485418878409);
1194 bstar(2) = as<Scalar>(0.417029162243181);
1208 template<
class Scalar>
1217 if (pl != Teuchos::null) {
1219 pl->
get<std::string>(
"Stepper Type", stepper->getStepperType());
1222 stepperType != stepper->getStepperType() &&
1223 stepperType !=
"SSPERK33" && stepperType !=
"SSPRK3", std::logic_error,
1224 " ParameterList 'Stepper Type' (='" + stepperType +
"')\n"
1225 " does not match type for this Stepper (='" + stepper->getStepperType() +
1226 "')\n or one of its aliases ('SSPERK33' or 'SSPRK3').\n");
1229 pl->
set<std::string>(
"Stepper Type", stepper->getStepperType());
1232 stepper->setStepperRKValues(pl);
1234 if (model != Teuchos::null) {
1235 stepper->setModel(model);
1236 stepper->initialize();
1263 template<
class Scalar>
1287 std::string ICConsistency,
1288 bool ICConsistencyCheck,
1295 this->
setup(appModel, useFSAL, ICConsistency,
1296 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1301 std::ostringstream Description;
1303 <<
"Solving Ordinary Differential Equations I:\n"
1304 <<
"Nonstiff Problems, 2nd Revised Edition\n"
1305 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
1306 <<
"Table 1.1, pg 135\n"
1307 <<
"c = [ 0 1/3 2/3 ]'\n"
1311 <<
"b = [ 1/4 0 3/4 ]'";
1312 return Description.str();
1320 const Scalar one = ST::one();
1321 const Scalar zero = ST::zero();
1322 const Scalar onethird = one/(3*one);
1323 const Scalar twothirds = 2*one/(3*one);
1324 const Scalar onefourth = one/(4*one);
1325 const Scalar threefourths = 3*one/(4*one);
1333 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero;
1334 A(1,0) = onethird; A(1,1) = zero; A(1,2) = zero;
1335 A(2,0) = zero; A(2,1) = twothirds; A(2,2) = zero;
1338 b(0) = onefourth; b(1) = zero; b(2) = threefourths;
1341 c(0) = zero; c(1) = onethird; c(2) = twothirds;
1353 template<
class Scalar>
1360 stepper->setStepperRKValues(pl);
1362 if (model != Teuchos::null) {
1363 stepper->setModel(model);
1364 stepper->initialize();
1390 template<
class Scalar>
1414 std::string ICConsistency,
1415 bool ICConsistencyCheck,
1422 this->
setup(appModel, useFSAL, ICConsistency,
1423 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1428 std::ostringstream Description;
1430 <<
"Solving Ordinary Differential Equations I:\n"
1431 <<
"Nonstiff Problems, 2nd Revised Edition\n"
1432 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
1433 <<
"Table 1.1, pg 135\n"
1434 <<
"c = [ 0 1/2 ]'\n"
1438 return Description.str();
1446 const Scalar one = ST::one();
1447 const Scalar zero = ST::zero();
1448 const Scalar onehalf = one/(2*one);
1456 A(0,0) = zero; A(0,1) = zero;
1457 A(1,0) = onehalf; A(1,1) = zero;
1460 b(0) = zero; b(1) = one;
1463 c(0) = zero; c(1) = onehalf;
1475 template<
class Scalar>
1482 stepper->setStepperRKValues(pl);
1484 if (model != Teuchos::null) {
1485 stepper->setModel(model);
1486 stepper->initialize();
1508 template<
class Scalar>
1532 std::string ICConsistency,
1533 bool ICConsistencyCheck,
1540 this->
setup(appModel, useFSAL, ICConsistency,
1541 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1546 std::ostringstream Description;
1548 <<
"This Stepper is known as 'RK Explicit Ralston' or 'RK2'.\n"
1549 <<
"c = [ 0 2/3 ]'\n"
1552 <<
"b = [ 1/4 3/4 ]'";
1553 return Description.str();
1561 const Scalar one = ST::one();
1562 const Scalar zero = ST::zero();
1564 const int NumStages = 2;
1565 const int order = 2;
1571 A(0,0) = zero; A(0,1) = zero; A(1,1) = zero;
1572 A(1,0) = (2*one)/(3*one);
1575 b(0) = (1*one)/(4*one);
1576 b(1) = (3*one)/(4*one);
1580 c(1) = (2*one)/(3*one);
1593 template<
class Scalar>
1602 if (pl != Teuchos::null) {
1604 pl->
get<std::string>(
"Stepper Type", stepper->getStepperType());
1607 stepperType != stepper->getStepperType() &&
1608 stepperType !=
"RK2", std::logic_error,
1609 " ParameterList 'Stepper Type' (='" + stepperType +
"')\n"
1610 " does not match type for this Stepper (='" + stepper->getStepperType() +
1611 "')\n or one of its aliases ('RK2').\n");
1614 pl->
set<std::string>(
"Stepper Type", stepper->getStepperType());
1617 stepper->setStepperRKValues(pl);
1619 if (model != Teuchos::null) {
1620 stepper->setModel(model);
1621 stepper->initialize();
1644 template<
class Scalar>
1668 std::string ICConsistency,
1669 bool ICConsistencyCheck,
1676 this->
setup(appModel, useFSAL, ICConsistency,
1677 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1682 std::ostringstream Description;
1684 <<
"This Stepper is known as 'RK Explicit Trapezoidal' or 'Heuns Method' or 'SSPERK22'.\n"
1688 <<
"b = [ 1/2 1/2 ]\n"
1689 <<
"bstart = [ 3/4 1/4 ]'";
1690 return Description.str();
1699 const Scalar one = ST::one();
1700 const Scalar zero = ST::zero();
1701 const Scalar onehalf = one/(2*one);
1710 A(0,0) = zero; A(0,1) = zero;
1711 A(1,0) = one; A(1,1) = zero;
1714 b(0) = onehalf; b(1) = onehalf;
1717 c(0) = zero; c(1) = one;
1720 bstar(0) = as<Scalar>(3*one/(4*one));
1721 bstar(1) = as<Scalar>(1*one/(4*one));
1735 template<
class Scalar>
1744 if (pl != Teuchos::null) {
1746 pl->
get<std::string>(
"Stepper Type", stepper->getStepperType());
1749 stepperType != stepper->getStepperType() &&
1750 stepperType !=
"Heuns Method" && stepperType !=
"SSPERK22" &&
1751 stepperType !=
"SSPRK2", std::logic_error,
1752 " ParameterList 'Stepper Type' (='" + stepperType +
"')\n"
1753 " does not match type for this Stepper (='" + stepper->getStepperType() +
1754 "')\n or one of its aliases ('Heuns Method' or 'SSPERK22' or 'SSPRK2').\n");
1757 pl->
set<std::string>(
"Stepper Type", stepper->getStepperType());
1760 stepper->setStepperRKValues(pl);
1762 if (model != Teuchos::null) {
1763 stepper->setModel(model);
1764 stepper->initialize();
1789 template<
class Scalar>
1808 std::string ICConsistency,
1809 bool ICConsistencyCheck,
1816 this->
setup(appModel, useFSAL, ICConsistency,
1817 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1822 std::ostringstream Description;
1824 <<
"Strong Stability Preserving Explicit RK (stage=5, order=4)\n"
1826 return Description.str();
1836 const int NumStages = 5;
1837 const int order = 4;
1838 const Scalar sspcoef = 1.5082;
1843 const Scalar zero = ST::zero();
1846 A(0,0) = A(0,1) = A(0,2) = A(0,3) = A(0,4) = zero;
1848 A(1,0) = as<Scalar>(0.391752226571889);
1849 A(1,1) = A(1,2) = A(1,3) = A(0,4) = zero;
1851 A(2,0) = as<Scalar>(0.217669096261169);
1852 A(2,1) = as<Scalar>(0.368410593050372);
1853 A(2,2) = A(2,3) = A(2,4) = zero;
1855 A(3,0) = as<Scalar>(0.082692086657811);
1856 A(3,1) = as<Scalar>(0.139958502191896);
1857 A(3,2) = as<Scalar>(0.251891774271693);
1858 A(3,3) = A(2,4) = zero;
1860 A(4,0) = as<Scalar>(0.067966283637115);
1861 A(4,1) = as<Scalar>(0.115034698504632);
1862 A(4,2) = as<Scalar>(0.207034898597385);
1863 A(4,3) = as<Scalar>(0.544974750228520);
1867 b(0) = as<Scalar>(0.146811876084786);
1868 b(1) = as<Scalar>(0.248482909444976);
1869 b(2) = as<Scalar>(0.104258830331980);
1870 b(3) = as<Scalar>(0.274438900901350);
1871 b(4) = as<Scalar>(0.226007483236908);
1876 c(2) = A(2,0) + A(2,1);
1877 c(3) = A(3,0) + A(3,1) + A(3,2);
1878 c(4) = A(4,0) + A(4,1) + A(4,2) + A(4,3);
1881 bstar(0) = as<Scalar>(0.130649104813131);
1882 bstar(1) = as<Scalar>(0.317716031201302);
1883 bstar(2) = as<Scalar>(0.000000869337261);
1884 bstar(3) = as<Scalar>(0.304581512634772);
1885 bstar(4) = as<Scalar>(0.247052482013534);
1890 this->
tableau_->setTVDCoeff(sspcoef);
1897 template<
class Scalar>
1904 stepper->setStepperRKValues(pl);
1906 if (model != Teuchos::null) {
1907 stepper->setModel(model);
1908 stepper->initialize();
1943 template<
class Scalar>
1962 std::string ICConsistency,
1963 bool ICConsistencyCheck,
1976 this->
setTableau(A,b,c,order,orderMin,orderMax,bstar);
1979 this->
tableau_->isImplicit() ==
true, std::logic_error,
1980 "Error - General ERK received an implicit Butcher Tableau!\n");
1982 this->
setup(appModel, useFSAL, ICConsistency,
1983 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1988 std::stringstream Description;
1990 <<
"The format of the Butcher Tableau parameter list is\n"
1991 <<
" <Parameter name=\"A\" type=\"string\" value=\"# # # ;\n"
1994 <<
" <Parameter name=\"b\" type=\"string\" value=\"# # #\"/>\n"
1995 <<
" <Parameter name=\"c\" type=\"string\" value=\"# # #\"/>\n\n"
1996 <<
"Note the number of stages is implicit in the number of entries.\n"
1997 <<
"The number of stages must be consistent.\n"
1999 <<
"Default tableau is RK4 (order=4):\n"
2000 <<
"c = [ 0 1/2 1/2 1 ]'\n"
2005 <<
"b = [ 1/6 1/3 1/3 1/6 ]'";
2006 return Description.str();
2011 if (this->
tableau_ == Teuchos::null) {
2014 auto t = stepper->getTableau();
2017 t->A(),t->b(),t->c(),
2018 t->order(),t->orderMin(),t->orderMax(),
2052 std::ostringstream Astream;
2053 Astream.precision(15);
2054 for(
int i = 0; i < A.
numRows(); i++) {
2055 for(
int j = 0; j < A.
numCols()-1; j++) {
2056 Astream << A(i,j) <<
" ";
2058 Astream << A(i,A.
numCols()-1);
2059 if ( i != A.
numRows()-1 ) Astream <<
"; ";
2061 tableauPL->
set<std::string>(
"A", Astream.str());
2063 std::ostringstream bstream;
2064 bstream.precision(15);
2065 for(
int i = 0; i < b.
length()-1; i++) {
2066 bstream << b(i) <<
" ";
2068 bstream << b(b.
length()-1);
2069 tableauPL->
set<std::string>(
"b", bstream.str());
2071 std::ostringstream cstream;
2072 cstream.precision(15);
2073 for(
int i = 0; i < c.
length()-1; i++) {
2074 cstream << c(i) <<
" ";
2076 cstream << c(c.
length()-1);
2077 tableauPL->
set<std::string>(
"c", cstream.str());
2079 tableauPL->
set<
int>(
"order", this->
tableau_->order());
2081 if ( bstar.
length() == 0 ) {
2082 tableauPL->
set(
"bstar",
"");
2084 std::ostringstream bstarstream;
2085 bstarstream.precision(15);
2086 for(
int i = 0; i < bstar.
length()-1; i++) {
2087 bstarstream << bstar(i) <<
" ";
2089 bstarstream << bstar(bstar.
length()-1);
2090 tableauPL->
set<std::string>(
"bstar", bstarstream.str());
2093 pl->
set(
"Tableau", *tableauPL);
2102 template<
class Scalar>
2109 stepper->setStepperRKValues(pl);
2111 if (pl != Teuchos::null) {
2113 auto t = stepper->createTableau(pl);
2114 stepper->setTableau( t->A(),t->b(),t->c(),
2115 t->order(),t->orderMin(),t->orderMax(),
2120 stepper->getTableau()->isImplicit() ==
true, std::logic_error,
2121 "Error - General ERK received an implicit Butcher Tableau!\n");
2123 if (model != Teuchos::null) {
2124 stepper->setModel(model);
2125 stepper->initialize();
2146 template<
class Scalar>
2171 std::string ICConsistency,
2172 bool ICConsistencyCheck,
2174 bool zeroInitialGuess,
2180 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2181 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2186 std::ostringstream Description;
2191 return Description.str();
2199 const Scalar sspcoef = std::numeric_limits<Scalar>::max();
2219 this->
tableau_->setTVDCoeff(sspcoef);
2226 template<
class Scalar>
2233 stepper->setStepperDIRKValues(pl);
2235 if (model != Teuchos::null) {
2236 stepper->setModel(model);
2237 stepper->initialize();
2267 template<
class Scalar>
2280 const Scalar one = ST::one();
2281 gammaDefault_ = Teuchos::as<Scalar>((2*one-ST::squareroot(2*one))/(2*one));
2297 std::string ICConsistency,
2298 bool ICConsistencyCheck,
2300 bool zeroInitialGuess,
2302 Scalar gamma = Scalar(0.2928932188134524))
2305 const Scalar one = ST::one();
2306 gammaDefault_ = Teuchos::as<Scalar>((2*one-ST::squareroot(2*one))/(2*one));
2312 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2313 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2327 std::ostringstream Description;
2329 <<
"Computer Methods for ODEs and DAEs\n"
2330 <<
"U. M. Ascher and L. R. Petzold\n"
2332 <<
"gamma = (2+-sqrt(2))/2\n"
2333 <<
"c = [ gamma 1 ]'\n"
2334 <<
"A = [ gamma 0 ]\n"
2335 <<
" [ 1-gamma gamma ]\n"
2336 <<
"b = [ 1-gamma gamma ]'";
2337 return Description.str();
2344 pl->template set<double>(
"gamma", this->
getGamma(),
2345 "The default value is gamma = (2-sqrt(2))/2. "
2346 "This will produce an L-stable 2nd order method with the stage "
2347 "times within the timestep. Other values of gamma will still "
2348 "produce an L-stable scheme, but will only be 1st order accurate.");
2363 const Scalar one = ST::one();
2364 const Scalar zero = ST::zero();
2367 A(0,0) =
gamma_; A(0,1) = zero;
2368 A(1,0) = Teuchos::as<Scalar>( one -
gamma_ ); A(1,1) =
gamma_;
2371 b(0) = Teuchos::as<Scalar>( one -
gamma_ ); b(1) =
gamma_;
2374 c(0) =
gamma_; c(1) = one;
2391 template<
class Scalar>
2398 stepper->setStepperDIRKValues(pl);
2400 if (pl != Teuchos::null)
2401 stepper->setGamma(pl->
get<
double>(
"gamma", 0.2928932188134524));
2403 if (model != Teuchos::null) {
2404 stepper->setModel(model);
2405 stepper->initialize();
2439 template<
class Scalar>
2464 std::string ICConsistency,
2465 bool ICConsistencyCheck,
2467 bool zeroInitialGuess,
2474 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2475 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2480 std::ostringstream Description;
2482 <<
"Implicit-explicit Runge-Kutta schemes and applications to\n"
2483 <<
"hyperbolic systems with relaxation\n"
2484 <<
"L Pareschi, G Russo\n"
2485 <<
"Journal of Scientific computing, 2005 - Springer\n"
2487 <<
"gamma = 1/(2+sqrt(2))\n"
2488 <<
"c = [ gamma (1-gamma) 1/2 ]'\n"
2489 <<
"A = [ gamma 0 0 ]\n"
2490 <<
" [ 1-2gamma gamma 0 ]\n"
2491 <<
" [ 1/2-gamma 0 gamma ]\n"
2492 <<
"b = [ 1/6 1/6 2/3 ]'";
2493 return Description.str();
2502 const int NumStages = 3;
2503 const int order = 2;
2504 const Scalar sspcoef = 1.0529;
2508 const Scalar one = ST::one();
2509 const Scalar zero = ST::zero();
2510 const Scalar gamma = as<Scalar>(one - ( one / ST::squareroot(2*one) ) );
2513 A(0,0) = A(1,1) = A(2,2) = gamma;
2514 A(0,1) = A(0,2) = A(1,2) = A(2,1) = zero;
2515 A(1,0) = as<Scalar>(one - 2*gamma);
2516 A(2,0) = as<Scalar>( ( one/ (2.*one)) - gamma );
2519 b(0) = b(1) = ( one / (6*one) );
2520 b(2) = (2*one)/(3*one);
2525 c(2) = one / (2*one);
2530 this->
tableau_->setTVDCoeff(sspcoef);
2538 template<
class Scalar>
2545 stepper->setStepperDIRKValues(pl);
2547 if (model != Teuchos::null) {
2548 stepper->setModel(model);
2549 stepper->initialize();
2583 template<
class Scalar>
2597 const Scalar one = ST::one();
2598 gammaDefault_ = as<Scalar>((3*one+ST::squareroot(3*one))/(6*one));
2616 std::string ICConsistency,
2617 bool ICConsistencyCheck,
2619 bool zeroInitialGuess,
2621 std::string gammaType =
"3rd Order A-stable",
2622 Scalar gamma = Scalar(0.7886751345948128))
2626 const Scalar one = ST::one();
2627 gammaDefault_ = as<Scalar>((3*one+ST::squareroot(3*one))/(6*one));
2635 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2636 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2642 !(gammaType ==
"3rd Order A-stable" ||
2643 gammaType ==
"2nd Order L-stable" ||
2644 gammaType ==
"gamma"), std::logic_error,
2645 "gammaType needs to be '3rd Order A-stable', '2nd Order L-stable' "
2668 std::ostringstream Description;
2670 <<
"Solving Ordinary Differential Equations I:\n"
2671 <<
"Nonstiff Problems, 2nd Revised Edition\n"
2672 <<
"E. Hairer, S. P. Norsett, and G. Wanner\n"
2673 <<
"Table 7.2, pg 207\n"
2674 <<
"gamma = (3+sqrt(3))/6 -> 3rd order and A-stable\n"
2675 <<
"gamma = (2-sqrt(2))/2 -> 2nd order and L-stable\n"
2676 <<
"c = [ gamma 1-gamma ]'\n"
2677 <<
"A = [ gamma 0 ]\n"
2678 <<
" [ 1-2*gamma gamma ]\n"
2679 <<
"b = [ 1/2 1/2 ]'";
2680 return Description.str();
2688 pl->template set<std::string>(
"Gamma Type", this->
getGammaType(),
2689 "Valid values are '3rd Order A-stable' ((3+sqrt(3))/6.), "
2690 "'2nd Order L-stable' ((2-sqrt(2))/2) and 'gamma' (user defined). "
2691 "The default value is '3rd Order A-stable'.");
2692 pl->template set<double>(
"gamma", this->
getGamma(),
2693 "Equal to (3+sqrt(3))/6 if 'Gamma Type' = '3rd Order A-stable', or "
2694 "(2-sqrt(2))/2 if 'Gamma Type' = '2nd Order L-stable', or "
2695 "user-defined gamma value if 'Gamma Type = 'gamma'. "
2696 "The default value is gamma = (3+sqrt(3))/6, which matches "
2697 "the default 'Gamma Type' = '3rd Order A-stable'.");
2712 const Scalar one = ST::one();
2713 const Scalar zero = ST::zero();
2719 }
else if (
gammaType_ ==
"2nd Order L-stable") {
2721 gamma_ = as<Scalar>( (2*one - ST::squareroot(2*one))/(2*one) );
2727 A(0,0) =
gamma_; A(0,1) = zero;
2731 b(0) = as<Scalar>( one/(2*one) ); b(1) = as<Scalar>( one/(2*one) );
2750 template<
class Scalar>
2757 stepper->setStepperDIRKValues(pl);
2759 if (pl != Teuchos::null) {
2760 stepper->setGammaType(
2761 pl->
get<std::string>(
"Gamma Type",
"3rd Order A-stable"));
2762 stepper->setGamma(pl->
get<
double>(
"gamma", 0.7886751345948128));
2765 if (model != Teuchos::null) {
2766 stepper->setModel(model);
2767 stepper->initialize();
2793 template<
class Scalar>
2818 std::string ICConsistency,
2819 bool ICConsistencyCheck,
2821 bool zeroInitialGuess,
2827 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2828 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2833 std::ostringstream Description;
2835 <<
"Hammer & Hollingsworth method\n"
2836 <<
"Solving Ordinary Differential Equations I:\n"
2837 <<
"Nonstiff Problems, 2nd Revised Edition\n"
2838 <<
"E. Hairer, S. P. Norsett, and G. Wanner\n"
2839 <<
"Table 7.1, pg 205\n"
2840 <<
"c = [ 0 2/3 ]'\n"
2843 <<
"b = [ 1/4 3/4 ]'";
2844 return Description.str();
2857 const Scalar one = ST::one();
2858 const Scalar zero = ST::zero();
2861 A(0,0) = zero; A(0,1) = zero;
2862 A(1,0) = as<Scalar>( one/(3*one) ); A(1,1) = as<Scalar>( one/(3*one) );
2865 b(0) = as<Scalar>( one/(4*one) ); b(1) = as<Scalar>( 3*one/(4*one) );
2868 c(0) = zero; c(1) = as<Scalar>( 2*one/(3*one) );
2880 template<
class Scalar>
2887 stepper->setStepperDIRKValues(pl);
2889 if (model != Teuchos::null) {
2890 stepper->setModel(model);
2891 stepper->initialize();
2924 template<
class Scalar>
2953 std::string ICConsistency,
2954 bool ICConsistencyCheck,
2956 bool zeroInitialGuess,
2958 Scalar theta = Scalar(0.5))
2967 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2968 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2975 "'theta' can not be zero, as it makes this stepper explicit. \n"
2976 "Try using the 'RK Forward Euler' stepper.\n");
2986 std::ostringstream Description;
2988 <<
"Non-standard finite-difference methods\n"
2989 <<
"in dynamical systems, P. Kama,\n"
2990 <<
"Dissertation, University of Pretoria, pg. 49.\n"
2991 <<
"Comment: Generalized Implicit Midpoint Method\n"
2992 <<
"c = [ theta ]'\n"
2993 <<
"A = [ theta ]\n"
2995 return Description.str();
3003 pl->template set<double>(
"theta",
getTheta(),
3004 "Valid values are 0 <= theta <= 1, where theta = 0 "
3005 "implies Forward Euler, theta = 1/2 implies implicit midpoint "
3006 "method (default), and theta = 1 implies Backward Euler. "
3007 "For theta != 1/2, this method is first-order accurate, "
3008 "and with theta = 1/2, it is second-order accurate. "
3009 "This method is A-stable, but becomes L-stable with theta=1.");
3044 template<
class Scalar>
3051 stepper->setStepperDIRKValues(pl);
3053 if (pl != Teuchos::null) {
3054 stepper->setTheta(pl->
get<
double>(
"theta", 0.5));
3057 if (model != Teuchos::null) {
3058 stepper->setModel(model);
3059 stepper->initialize();
3091 template<
class Scalar>
3120 std::string ICConsistency,
3121 bool ICConsistencyCheck,
3123 bool zeroInitialGuess,
3125 Scalar theta = Scalar(0.5))
3134 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3135 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3142 "'theta' can not be zero, as it makes this stepper explicit. \n"
3143 "Try using the 'RK Forward Euler' stepper.\n");
3153 std::ostringstream Description;
3155 <<
"Computer Methods for ODEs and DAEs\n"
3156 <<
"U. M. Ascher and L. R. Petzold\n"
3160 <<
" [ 1-theta theta ]\n"
3161 <<
"b = [ 1-theta theta ]'";
3162 return Description.str();
3170 pl->template set<double>(
"theta",
getTheta(),
3171 "Valid values are 0 < theta <= 1, where theta = 0 "
3172 "implies Forward Euler, theta = 1/2 implies trapezoidal "
3173 "method (default), and theta = 1 implies Backward Euler. "
3174 "For theta != 1/2, this method is first-order accurate, "
3175 "and with theta = 1/2, it is second-order accurate. "
3176 "This method is A-stable, but becomes L-stable with theta=1.");
3188 const Scalar one = ST::one();
3189 const Scalar zero = ST::zero();
3197 A(0,0) = zero; A(0,1) = zero;
3198 A(1,0) = Teuchos::as<Scalar>( one -
theta_ ); A(1,1) =
theta_;
3201 b(0) = Teuchos::as<Scalar>( one -
theta_ );
3225 template<
class Scalar>
3232 stepper->setStepperDIRKValues(pl);
3234 if (pl != Teuchos::null) {
3235 stepper->setTheta(pl->
get<
double>(
"theta", 0.5));
3238 if (model != Teuchos::null) {
3239 stepper->setModel(model);
3240 stepper->initialize();
3266 template<
class Scalar>
3291 std::string ICConsistency,
3292 bool ICConsistencyCheck,
3294 bool zeroInitialGuess,
3300 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3301 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3306 std::ostringstream Description;
3308 <<
"Also known as Crank-Nicolson Method.\n"
3312 <<
"b = [ 1/2 1/2 ]'";
3313 return Description.str();
3323 const Scalar one = ST::one();
3324 const Scalar zero = ST::zero();
3325 const Scalar onehalf = ST::one()/(2*ST::one());
3333 A(0,0) = zero; A(0,1) = zero;
3334 A(1,0) = onehalf; A(1,1) = onehalf;
3356 template<
class Scalar>
3365 if (pl != Teuchos::null) {
3367 pl->
get<std::string>(
"Stepper Type", stepper->getStepperType());
3370 stepperType != stepper->getStepperType() &&
3371 stepperType !=
"RK Crank-Nicolson", std::logic_error,
3372 " ParameterList 'Stepper Type' (='" + stepperType +
"')\n"
3373 " does not match type for this Stepper (='" + stepper->getStepperType() +
3374 "')\n or one of its aliases ('RK Crank-Nicolson').\n");
3377 pl->
set<std::string>(
"Stepper Type", stepper->getStepperType());
3380 stepper->setStepperDIRKValues(pl);
3382 if (model != Teuchos::null) {
3383 stepper->setModel(model);
3384 stepper->initialize();
3416 template<
class Scalar>
3441 std::string ICConsistency,
3442 bool ICConsistencyCheck,
3444 bool zeroInitialGuess,
3450 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3451 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3456 std::ostringstream Description;
3459 <<
"Solving Ordinary Differential Equations II:\n"
3460 <<
"Stiff and Differential-Algebraic Problems,\n"
3461 <<
"2nd Revised Edition\n"
3462 <<
"E. Hairer and G. Wanner\n"
3463 <<
"Table 5.2, pg 72\n"
3464 <<
"Solving Ordinary Differential Equations I:\n"
3465 <<
"Nonstiff Problems, 2nd Revised Edition\n"
3466 <<
"E. Hairer, S. P. Norsett, and G. Wanner\n"
3467 <<
"Table 7.1, pg 205\n"
3471 return Description.str();
3483 const Scalar onehalf = ST::one()/(2*ST::one());
3484 const Scalar one = ST::one();
3507 template<
class Scalar>
3514 stepper->setStepperDIRKValues(pl);
3516 if (model != Teuchos::null) {
3517 stepper->setModel(model);
3518 stepper->initialize();
3544 template<
class Scalar>
3564 std::string ICConsistency,
3565 bool ICConsistencyCheck,
3567 bool zeroInitialGuess,
3573 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3574 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3579 std::ostringstream Description;
3581 <<
"Strong Stability Preserving Diagonally-Implicit RK (stage=2, order=2)\n"
3583 <<
"c = [ 1/4 3/4 ]'\n"
3586 <<
"b = [ 1/2 1/2 ]\n" << std::endl;
3587 return Description.str();
3596 const int NumStages = 2;
3597 const int order = 2;
3602 const Scalar one = ST::one();
3603 const Scalar zero = ST::zero();
3604 const Scalar onehalf = one/(2*one);
3605 const Scalar onefourth = one/(4*one);
3608 A(0,0) = A(1,1) = onefourth;
3613 b(0) = b(1) = onehalf;
3617 c(1) = A(1,0) + A(1,1);
3629 template<
class Scalar>
3636 stepper->setStepperDIRKValues(pl);
3638 if (model != Teuchos::null) {
3639 stepper->setModel(model);
3640 stepper->initialize();
3667 template<
class Scalar>
3687 std::string ICConsistency,
3688 bool ICConsistencyCheck,
3690 bool zeroInitialGuess,
3696 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3697 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3702 std::ostringstream Description;
3704 <<
"Strong Stability Preserving Diagonally-Implicit RK (stage=3, order=2)\n"
3706 <<
"c = [ 1/6 1/2 5/6 ]'\n"
3709 <<
" [ 1/3 1/3 1/6 ]\n"
3710 <<
"b = [ 1/3 1/3 1/3 ]\n" << std::endl;
3711 return Description.str();
3721 const int NumStages = 3;
3722 const int order = 2;
3727 const Scalar one = ST::one();
3728 const Scalar zero = ST::zero();
3729 const Scalar onethird = one/(3*one);
3730 const Scalar onesixth = one/(6*one);
3733 A(0,0) = A(1,1) = A(2,2) = onesixth;
3734 A(1,0) = A(2,0) = A(2,1) = onethird;
3735 A(0,1) = A(0,2) = A(1,2) = zero;
3738 b(0) = b(1) = b(2) = onethird;
3742 c(1) = A(1,0) + A(1,1);
3743 c(2) = A(2,0) + A(2,1) + A(2,2);
3755 template<
class Scalar>
3762 stepper->setStepperDIRKValues(pl);
3764 if (model != Teuchos::null) {
3765 stepper->setModel(model);
3766 stepper->initialize();
3792 template<
class Scalar>
3812 std::string ICConsistency,
3813 bool ICConsistencyCheck,
3815 bool zeroInitialGuess,
3821 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3822 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3827 std::ostringstream Description;
3829 <<
"Strong Stability Preserving Diagonally-Implicit RK (stage=2, order=3)\n"
3830 <<
"SSP-Coef = 1 + sqrt( 3 )\n"
3831 <<
"c = [ 1/(3 + sqrt( 3 )) (1/6)(3 + sqrt( 3 )) ] '\n"
3832 <<
"A = [ 1/(3 + sqrt( 3 )) ] \n"
3833 <<
" [ 1/sqrt( 3 ) 1/(3 + sqrt( 3 )) ] \n"
3834 <<
"b = [ 1/2 1/2 ] \n" << std::endl;
3835 return Description.str();
3845 const int NumStages = 2;
3846 const int order = 3;
3847 const Scalar sspcoef = 2.7321;
3852 const Scalar one = ST::one();
3853 const Scalar zero = ST::zero();
3854 const Scalar onehalf = one/(2*one);
3855 const Scalar rootthree = ST::squareroot(3*one);
3858 A(0,0) = A(1,1) = one/(3*one + rootthree);
3859 A(1,0) = one/rootthree;
3863 b(0) = b(1) = onehalf;
3867 c(1) = A(1,0) + A(1,1);
3872 this->
tableau_->setTVDCoeff(sspcoef);
3879 template<
class Scalar>
3886 stepper->setStepperDIRKValues(pl);
3888 if (model != Teuchos::null) {
3889 stepper->setModel(model);
3890 stepper->initialize();
3917 template<
class Scalar>
3937 std::string ICConsistency,
3938 bool ICConsistencyCheck,
3940 bool zeroInitialGuess,
3946 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3947 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3952 std::ostringstream Description;
3954 <<
"Strong Stability Preserving Diagonally-Implicit RK (stage=3, order=3)\n"
3955 <<
"SSP-Coef = 2 + 2 sqrt(2)\n"
3956 <<
"c = [ 1/( 4 + 2 sqrt(2) 1/2 (1/4)(2 + sqrt(2) ] '\n"
3957 <<
"A = [ 1/( 4 + 2 sqrt(2) ] \n"
3958 <<
" [ 1/(2 sqrt(2) 1/( 4 + 2 sqrt(2) ] \n"
3959 <<
" [ 1/(2 sqrt(2) 1/(2 sqrt(2) 1/( 4 + 2 sqrt(2) ] \n"
3960 <<
"b = [ 1/3 1/3 1/3 ] \n"
3962 return Description.str();
3972 const int NumStages = 3;
3973 const int order = 3;
3974 const Scalar sspcoef= 4.8284;
3979 const Scalar one = ST::one();
3980 const Scalar zero = ST::zero();
3981 const Scalar onethird = one/(3*one);
3982 const Scalar rootwo = ST::squareroot(2*one);
3985 A(0,0) = A(1,1) = A(2,2) = one / (4*one + 2*rootwo);
3986 A(1,0) = A(2,0) = A(2,1) = one / (2*rootwo);
3987 A(0,1) = A(0,2) = A(1,2) = zero;
3990 b(0) = b(1) = b(2) = onethird;
3994 c(1) = A(1,0) + A(1,1);
3995 c(2) = A(2,0) + A(2,1) + A(2,2);
4000 this->
tableau_->setTVDCoeff(sspcoef);
4007 template<
class Scalar>
4014 stepper->setStepperDIRKValues(pl);
4016 if (model != Teuchos::null) {
4017 stepper->setModel(model);
4018 stepper->initialize();
4044 template<
class Scalar>
4069 std::string ICConsistency,
4070 bool ICConsistencyCheck,
4072 bool zeroInitialGuess,
4078 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4079 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4084 std::ostringstream Description;
4087 <<
"Solving Ordinary Differential Equations II:\n"
4088 <<
"Stiff and Differential-Algebraic Problems,\n"
4089 <<
"2nd Revised Edition\n"
4090 <<
"E. Hairer and G. Wanner\n"
4091 <<
"Table 5.3, pg 73\n"
4095 return Description.str();
4107 const Scalar one = ST::one();
4108 const Scalar zero = ST::zero();
4116 this->
getStepperType(),A,b,c,order,order,order,emptyBStar,
false));
4123 template<
class Scalar>
4130 stepper->setStepperDIRKValues(pl);
4132 if (model != Teuchos::null) {
4133 stepper->setModel(model);
4134 stepper->initialize();
4162 template<
class Scalar>
4174 this->
setStepperName(
"RK Implicit 2 Stage 2nd order Lobatto IIIB");
4175 this->
setStepperType(
"RK Implicit 2 Stage 2nd order Lobatto IIIB");
4187 std::string ICConsistency,
4188 bool ICConsistencyCheck,
4190 bool zeroInitialGuess,
4193 this->
setStepperName(
"RK Implicit 2 Stage 2nd order Lobatto IIIB");
4194 this->
setStepperType(
"RK Implicit 2 Stage 2nd order Lobatto IIIB");
4196 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4197 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4202 std::ostringstream Description;
4205 <<
"Solving Ordinary Differential Equations II:\n"
4206 <<
"Stiff and Differential-Algebraic Problems,\n"
4207 <<
"2nd Revised Edition\n"
4208 <<
"E. Hairer and G. Wanner\n"
4209 <<
"Table 5.9, pg 76\n"
4211 <<
"A = [ 1/2 0 ]\n"
4213 <<
"b = [ 1/2 1/2 ]'";
4214 return Description.str();
4227 const Scalar zero = ST::zero();
4228 const Scalar one = ST::one();
4231 A(0,0) = as<Scalar>( one/(2*one) );
4233 A(1,0) = as<Scalar>( one/(2*one) );
4237 b(0) = as<Scalar>( one/(2*one) );
4238 b(1) = as<Scalar>( one/(2*one) );
4247 this->
getStepperType(),A,b,c,order,order,order,emptyBStar,
false));
4248 this->tableau_->setTVD(
true);
4249 this->tableau_->setTVDCoeff(2.0);
4258 template<
class Scalar>
4265 stepper->setStepperDIRKValues(pl);
4267 if (model != Teuchos::null) {
4268 stepper->setModel(model);
4269 stepper->initialize();
4300 template<
class Scalar>
4325 std::string ICConsistency,
4326 bool ICConsistencyCheck,
4328 bool zeroInitialGuess,
4334 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4335 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4340 std::ostringstream Description;
4343 <<
"Solving Ordinary Differential Equations II:\n"
4344 <<
"Stiff and Differential-Algebraic Problems,\n"
4345 <<
"2nd Revised Edition\n"
4346 <<
"E. Hairer and G. Wanner\n"
4348 <<
"c = [ 1/4 3/4 11/20 1/2 1 ]'\n"
4351 <<
" [ 17/50 -1/25 1/4 ]\n"
4352 <<
" [ 371/1360 -137/2720 15/544 1/4 ]\n"
4353 <<
" [ 25/24 -49/48 125/16 -85/12 1/4 ]\n"
4354 <<
"b = [ 25/24 -49/48 125/16 -85/12 1/4 ]'";
4356 return Description.str();
4369 const Scalar zero = ST::zero();
4370 const Scalar one = ST::one();
4371 const Scalar onequarter = as<Scalar>( one/(4*one) );
4374 A(0,0) = onequarter;
4380 A(1,0) = as<Scalar>( one / (2*one) );
4381 A(1,1) = onequarter;
4386 A(2,0) = as<Scalar>( 17*one/(50*one) );
4387 A(2,1) = as<Scalar>( -one/(25*one) );
4388 A(2,2) = onequarter;
4392 A(3,0) = as<Scalar>( 371*one/(1360*one) );
4393 A(3,1) = as<Scalar>( -137*one/(2720*one) );
4394 A(3,2) = as<Scalar>( 15*one/(544*one) );
4395 A(3,3) = onequarter;
4398 A(4,0) = as<Scalar>( 25*one/(24*one) );
4399 A(4,1) = as<Scalar>( -49*one/(48*one) );
4400 A(4,2) = as<Scalar>( 125*one/(16*one) );
4401 A(4,3) = as<Scalar>( -85*one/(12*one) );
4402 A(4,4) = onequarter;
4405 b(0) = as<Scalar>( 25*one/(24*one) );
4406 b(1) = as<Scalar>( -49*one/(48*one) );
4407 b(2) = as<Scalar>( 125*one/(16*one) );
4408 b(3) = as<Scalar>( -85*one/(12*one) );
4422 c(1) = as<Scalar>( 3*one/(4*one) );
4423 c(2) = as<Scalar>( 11*one/(20*one) );
4424 c(3) = as<Scalar>( one/(2*one) );
4437 template<
class Scalar>
4444 stepper->setStepperDIRKValues(pl);
4446 if (model != Teuchos::null) {
4447 stepper->setModel(model);
4448 stepper->initialize();
4478 template<
class Scalar>
4503 std::string ICConsistency,
4504 bool ICConsistencyCheck,
4506 bool zeroInitialGuess,
4512 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4513 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4518 std::ostringstream Description;
4521 <<
"Solving Ordinary Differential Equations II:\n"
4522 <<
"Stiff and Differential-Algebraic Problems,\n"
4523 <<
"2nd Revised Edition\n"
4524 <<
"E. Hairer and G. Wanner\n"
4526 <<
"gamma = (1/sqrt(3))*cos(pi/18)+1/2\n"
4527 <<
"delta = 1/(6*(2*gamma-1)^2)\n"
4528 <<
"c = [ gamma 1/2 1-gamma ]'\n"
4529 <<
"A = [ gamma ]\n"
4530 <<
" [ 1/2-gamma gamma ]\n"
4531 <<
" [ 2*gamma 1-4*gamma gamma ]\n"
4532 <<
"b = [ delta 1-2*delta delta ]'";
4533 return Description.str();
4546 const Scalar zero = ST::zero();
4547 const Scalar one = ST::one();
4548 const Scalar pi = as<Scalar>(4*one)*std::atan(one);
4549 const Scalar gamma = as<Scalar>( one/ST::squareroot(3*one)*std::cos(pi/(18*one))+one/(2*one) );
4550 const Scalar delta = as<Scalar>( one/(6*one*std::pow(2*gamma-one,2*one)) );
4557 A(1,0) = as<Scalar>( one/(2*one) - gamma );
4561 A(2,0) = as<Scalar>( 2*gamma );
4562 A(2,1) = as<Scalar>( one - 4*gamma );
4567 b(1) = as<Scalar>( one-2*delta );
4572 c(1) = as<Scalar>( one/(2*one) );
4573 c(2) = as<Scalar>( one - gamma );
4585 template<
class Scalar>
4592 stepper->setStepperDIRKValues(pl);
4594 if (model != Teuchos::null) {
4595 stepper->setModel(model);
4596 stepper->initialize();
4627 template<
class Scalar>
4652 std::string ICConsistency,
4653 bool ICConsistencyCheck,
4655 bool zeroInitialGuess,
4661 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4662 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4667 std::ostringstream Description;
4669 <<
"Solving Ordinary Differential Equations II:\n"
4670 <<
"Stiff and Differential-Algebraic Problems,\n"
4671 <<
"2nd Revised Edition\n"
4672 <<
"E. Hairer and G. Wanner\n"
4674 <<
"c = [ (6-sqrt(6))/10 ]\n"
4675 <<
" [ (6+9*sqrt(6))/35 ]\n"
4677 <<
" [ (4-sqrt(6))/10 ]\n"
4678 <<
" [ (4+sqrt(6))/10 ]\n"
4679 <<
"A = [ A1 A2 A3 A4 A5 ]\n"
4680 <<
" A1 = [ (6-sqrt(6))/10 ]\n"
4681 <<
" [ (-6+5*sqrt(6))/14 ]\n"
4682 <<
" [ (888+607*sqrt(6))/2850 ]\n"
4683 <<
" [ (3153-3082*sqrt(6))/14250 ]\n"
4684 <<
" [ (-32583+14638*sqrt(6))/71250 ]\n"
4686 <<
" [ (6-sqrt(6))/10 ]\n"
4687 <<
" [ (126-161*sqrt(6))/1425 ]\n"
4688 <<
" [ (3213+1148*sqrt(6))/28500 ]\n"
4689 <<
" [ (-17199+364*sqrt(6))/142500 ]\n"
4692 <<
" [ (6-sqrt(6))/10 ]\n"
4693 <<
" [ (-267+88*sqrt(6))/500 ]\n"
4694 <<
" [ (1329-544*sqrt(6))/2500 ]\n"
4698 <<
" [ (6-sqrt(6))/10 ]\n"
4699 <<
" [ (-96+131*sqrt(6))/625 ]\n"
4704 <<
" [ (6-sqrt(6))/10 ]\n"
4708 <<
" [ (16-sqrt(6))/36 ]\n"
4709 <<
" [ (16+sqrt(6))/36 ]'";
4710 return Description.str();
4723 const Scalar zero = ST::zero();
4724 const Scalar one = ST::one();
4725 const Scalar sqrt6 = ST::squareroot(as<Scalar>(6*one));
4726 const Scalar gamma = as<Scalar>( (6*one - sqrt6) / (10*one) );
4735 A(1,0) = as<Scalar>( (-6*one+5*one*sqrt6)/(14*one) );
4741 A(2,0) = as<Scalar>( (888*one+607*one*sqrt6)/(2850*one) );
4742 A(2,1) = as<Scalar>( (126*one-161*one*sqrt6)/(1425*one) );
4747 A(3,0) = as<Scalar>( (3153*one-3082*one*sqrt6)/(14250*one) );
4748 A(3,1) = as<Scalar>( (3213*one+1148*one*sqrt6)/(28500*one) );
4749 A(3,2) = as<Scalar>( (-267*one+88*one*sqrt6)/(500*one) );
4753 A(4,0) = as<Scalar>( (-32583*one+14638*one*sqrt6)/(71250*one) );
4754 A(4,1) = as<Scalar>( (-17199*one+364*one*sqrt6)/(142500*one) );
4755 A(4,2) = as<Scalar>( (1329*one-544*one*sqrt6)/(2500*one) );
4756 A(4,3) = as<Scalar>( (-96*one+131*sqrt6)/(625*one) );
4762 b(2) = as<Scalar>( one/(9*one) );
4763 b(3) = as<Scalar>( (16*one-sqrt6)/(36*one) );
4764 b(4) = as<Scalar>( (16*one+sqrt6)/(36*one) );
4768 c(1) = as<Scalar>( (6*one+9*one*sqrt6)/(35*one) );
4770 c(3) = as<Scalar>( (4*one-sqrt6)/(10*one) );
4771 c(4) = as<Scalar>( (4*one+sqrt6)/(10*one) );
4783 template<
class Scalar>
4790 stepper->setStepperDIRKValues(pl);
4792 if (model != Teuchos::null) {
4793 stepper->setModel(model);
4794 stepper->initialize();
4818 template<
class Scalar>
4843 std::string ICConsistency,
4844 bool ICConsistencyCheck,
4846 bool zeroInitialGuess,
4852 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4853 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4858 std::ostringstream Description;
4863 <<
"b = [ 1/2 1/2 ]'\n"
4864 <<
"bstar = [ 1 0 ]'";
4865 return Description.str();
4880 const Scalar one = ST::one();
4881 const Scalar zero = ST::zero();
4884 A(0,0) = one; A(0,1) = zero;
4885 A(1,0) = -one; A(1,1) = one;
4888 b(0) = as<Scalar>(one/(2*one));
4889 b(1) = as<Scalar>(one/(2*one));
4908 template<
class Scalar>
4915 stepper->setStepperDIRKValues(pl);
4917 if (model != Teuchos::null) {
4918 stepper->setModel(model);
4919 stepper->initialize();
4957 template<
class Scalar>
4982 std::string ICConsistency,
4983 bool ICConsistencyCheck,
4985 bool zeroInitialGuess,
4997 this->
setTableau(A,b,c,order,orderMin,orderMax,bstar);
5000 this->
tableau_->isImplicit() !=
true, std::logic_error,
5001 "Error - General DIRK did not receive a DIRK Butcher Tableau!\n");
5003 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
5004 useEmbedded, zeroInitialGuess, stepperRKAppAction);
5009 std::stringstream Description;
5011 <<
"The format of the Butcher Tableau parameter list is\n"
5012 <<
" <Parameter name=\"A\" type=\"string\" value=\"# # # ;\n"
5015 <<
" <Parameter name=\"b\" type=\"string\" value=\"# # #\"/>\n"
5016 <<
" <Parameter name=\"c\" type=\"string\" value=\"# # #\"/>\n\n"
5017 <<
"Note the number of stages is implicit in the number of entries.\n"
5018 <<
"The number of stages must be consistent.\n"
5020 <<
"Default tableau is 'SDIRK 2 Stage 2nd order':\n"
5021 <<
" Computer Methods for ODEs and DAEs\n"
5022 <<
" U. M. Ascher and L. R. Petzold\n"
5024 <<
" gamma = (2-sqrt(2))/2\n"
5025 <<
" c = [ gamma 1 ]'\n"
5026 <<
" A = [ gamma 0 ]\n"
5027 <<
" [ 1-gamma gamma ]\n"
5028 <<
" b = [ 1-gamma gamma ]'";
5029 return Description.str();
5034 if (this->
tableau_ == Teuchos::null) {
5037 auto t = stepper->getTableau();
5040 t->A(),t->b(),t->c(),
5041 t->order(),t->orderMin(),t->orderMax(),
5074 std::ostringstream Astream;
5075 Astream.precision(15);
5076 for(
int i = 0; i < A.
numRows(); i++) {
5077 for(
int j = 0; j < A.
numCols()-1; j++) {
5078 Astream << A(i,j) <<
" ";
5080 Astream << A(i,A.
numCols()-1);
5081 if ( i != A.
numRows()-1 ) Astream <<
"; ";
5083 tableauPL->
set<std::string>(
"A", Astream.str());
5085 std::ostringstream bstream;
5086 bstream.precision(15);
5087 for(
int i = 0; i < b.
length()-1; i++) {
5088 bstream << b(i) <<
" ";
5090 bstream << b(b.
length()-1);
5091 tableauPL->
set<std::string>(
"b", bstream.str());
5093 std::ostringstream cstream;
5094 cstream.precision(15);
5095 for(
int i = 0; i < c.
length()-1; i++) {
5096 cstream << c(i) <<
" ";
5098 cstream << c(c.
length()-1);
5099 tableauPL->
set<std::string>(
"c", cstream.str());
5101 tableauPL->
set<
int>(
"order", this->
tableau_->order());
5103 if ( bstar.
length() == 0 ) {
5104 tableauPL->
set(
"bstar",
"");
5106 std::ostringstream bstarstream;
5107 bstarstream.precision(15);
5108 for(
int i = 0; i < bstar.
length()-1; i++) {
5109 bstarstream << bstar(i) <<
" ";
5111 bstarstream << bstar(bstar.
length()-1);
5112 tableauPL->
set<std::string>(
"bstar", bstarstream.str());
5115 pl->
set(
"Tableau", *tableauPL);
5124 template<
class Scalar>
5131 stepper->setStepperDIRKValues(pl);
5133 if (pl != Teuchos::null) {
5135 auto t = stepper->createTableau(pl);
5136 stepper->setTableau( t->A(),t->b(),t->c(),
5137 t->order(),t->orderMin(),t->orderMax(),
5142 stepper->getTableau()->isDIRK() !=
true, std::logic_error,
5143 "Error - General DIRK did not receive a DIRK Butcher Tableau!\n");
5145 if (model != Teuchos::null) {
5146 stepper->setModel(model);
5147 stepper->initialize();
5157 #endif // Tempus_StepperRKButcherTableau_hpp
std::string getDescription() const
StepperERK_3Stage3rdOrderTVD(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperERK_Merson45(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Teuchos::RCP< StepperEDIRK_TrapezoidalRule< Scalar > > createStepperEDIRK_TrapezoidalRule(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
General Implicit Runge-Kutta Butcher Tableau.
StepperERK_3Stage3rdOrder()
Default constructor.
StepperEDIRK_TrapezoidalRule(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperERK_3Stage3rdOrderTVD()
Default constructor.
StepperERK_3Stage3rdOrderHeun(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
RK Implicit 2 Stage 2nd order Lobatto IIIB.
virtual std::string getDefaultICConsistency() const
std::string getStepperType() const
Get the stepper type. The stepper type is used as an identifier for the stepper, and can only be set ...
StepperERK_Ralston()
Default constructor.
Teuchos::RCP< StepperSDIRK_SSPDIRK33< Scalar > > createStepperSDIRK_SSPDIRK33(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
std::string getDescription() const
Explicit Runge-Kutta time stepper.
virtual void setupDefault()
Default setup for constructor.
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
Teuchos::RCP< Teuchos::ParameterList > getValidParametersBasicDIRK() const
StepperSDIRK_SSPDIRK33(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperDIRK_BackwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperSDIRK_3Stage2ndOrder()
Default constructor.
Teuchos::RCP< StepperEDIRK_2Stage3rdOrder< Scalar > > createStepperEDIRK_2Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperERK_SSPERK54(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Teuchos::RCP< StepperSDIRK_5Stage4thOrder< Scalar > > createStepperSDIRK_5Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperSDIRK_ImplicitMidpoint()
Default constructor.
StepperEDIRK_2StageTheta(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction, Scalar theta=Scalar(0.5))
Backward Euler Runge-Kutta Butcher Tableau.
StepperSDIRK_3Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperERK_Midpoint()
Default constructor.
Teuchos::RCP< RKButcherTableau< Scalar > > tableau_
T & get(const std::string &name, T def_value)
StepperSDIRK_2Stage2ndOrder()
Default constructor.
Teuchos::RCP< StepperERK_SSPERK54< Scalar > > createStepperERK_SSPERK54(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperSDIRK_ImplicitMidpoint(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
General Explicit Runge-Kutta Butcher Tableau.
std::string getDescription() const
StepperDIRK_General(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction, const Teuchos::SerialDenseMatrix< int, Scalar > &A, const Teuchos::SerialDenseVector< int, Scalar > &b, const Teuchos::SerialDenseVector< int, Scalar > &c, const int order, const int orderMin, const int orderMax, const Teuchos::SerialDenseVector< int, Scalar > &bstar)
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Teuchos::RCP< StepperERK_3Stage3rdOrderHeun< Scalar > > createStepperERK_3Stage3rdOrderHeun(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
RK Explicit 5 Stage 3rd order by Kinnmark and Gray.
Teuchos::RCP< StepperERK_Merson45< Scalar > > createStepperERK_Merson45(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< StepperEDIRK_2StageTheta< Scalar > > createStepperEDIRK_2StageTheta(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
StepperSDIRK_SSPDIRK23(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
std::string getDescription() const
StepperSDIRK_3Stage2ndOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
void setStepperName(std::string s)
Set the stepper name.
StepperDIRK_1StageTheta()
Default constructor.
std::string getDescription() const
StepperEDIRK_2Stage3rdOrder()
Default constructor.
Strong Stability Preserving Explicit RK Butcher Tableau.
RK Explicit 4 Stage 3rd order by Runge.
std::string getDescription() const
StepperERK_5Stage3rdOrderKandG(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
std::string gammaTypeDefault_
std::string getDescription() const
StepperEDIRK_2Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
std::string getDescription() const
Teuchos::RCP< StepperERK_3_8Rule< Scalar > > createStepperERK_3_8Rule(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< StepperERK_BogackiShampine32< Scalar > > createStepperERK_BogackiShampine32(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< StepperSDIRK_5Stage5thOrder< Scalar > > createStepperSDIRK_5Stage5thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< StepperERK_3Stage3rdOrder< Scalar > > createStepperERK_3Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperDIRK_2Stage2ndOrderLobattoIIIB(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperERK_5Stage3rdOrderKandG()
Default constructor.
RK Trapezoidal Rule (A.K.A. RK Crank-Nicolson)
Teuchos::RCP< StepperDIRK_2Stage2ndOrderLobattoIIIB< Scalar > > createStepperDIRK_2Stage2ndOrderLobattoIIIB(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< StepperERK_ForwardEuler< Scalar > > createStepperERK_ForwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::RCP< StepperSDIRK_21Pair< Scalar > > createStepperSDIRK_21Pair(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperERK_BogackiShampine32()
Default constructor.
bool isInitialized_
True if stepper's member data is initialized.
std::string getDescription() const
std::string getDescription() const
Teuchos::RCP< StepperSDIRK_SSPDIRK23< Scalar > > createStepperSDIRK_SSPDIRK23(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperERK_4Stage3rdOrderRunge(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Teuchos::RCP< StepperERK_3Stage3rdOrderTVD< Scalar > > createStepperERK_3Stage3rdOrderTVD(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
void setGamma(Scalar gamma)
Teuchos::RCP< StepperSDIRK_3Stage4thOrder< Scalar > > createStepperSDIRK_3Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Explicit RK 3/8th Rule Butcher Tableau.
std::string getDescription() const
StepperSDIRK_2Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction, std::string gammaType="3rd Order A-stable", Scalar gamma=Scalar(0.7886751345948128))
bool isParameter(const std::string &name) const
StepperERK_Midpoint(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
void setTheta(Scalar theta)
Diagonally Implicit Runge-Kutta (DIRK) time stepper.
void setTheta(Scalar theta)
std::string getDescription() const
StepperERK_4Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperERK_Trapezoidal()
Default constructor.
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
StepperERK_Merson45()
Default constructor.
std::string getDescription() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
StepperSDIRK_5Stage4thOrder()
Default constructor.
Application Action for StepperRKBase.
Teuchos::RCP< StepperDIRK_1Stage1stOrderRadauIA< Scalar > > createStepperDIRK_1Stage1stOrderRadauIA(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
bool useFSAL_
Use First-Same-As-Last (FSAL) principle.
std::string getDescription() const
virtual void setupDefault()
Default setup for constructor.
Explicit RK Bogacki-Shampine Butcher Tableau.
StepperSDIRK_5Stage5thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
EDIRK 2 Stage Theta Method.
std::string getDescription() const
void setICConsistencyCheck(bool c)
std::string getDescription() const
Teuchos::RCP< StepperSDIRK_3Stage2ndOrder< Scalar > > createStepperSDIRK_3Stage2ndOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< StepperERK_5Stage3rdOrderKandG< Scalar > > createStepperERK_5Stage3rdOrderKandG(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
OrdinalType length() const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
StepperSDIRK_21Pair(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
std::string getDescription() const
Teuchos::RCP< StepperDIRK_BackwardEuler< Scalar > > createStepperDIRK_BackwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperERK_Trapezoidal(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperDIRK_1Stage1stOrderRadauIA(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
std::string getDescription() const
std::string getGammaType() const
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
std::string getDescription() const
Teuchos::RCP< StepperSDIRK_2Stage3rdOrder< Scalar > > createStepperSDIRK_2Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< Teuchos::ParameterList > getValidParametersBasicERK() const
std::string getDescription() const
StepperSDIRK_SSPDIRK22(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperSDIRK_21Pair()
Default constructor.
std::string getDescription() const
StepperSDIRK_2Stage3rdOrder()
Default constructor.
std::string getDescription() const
std::string getDescription() const
StepperDIRK_1Stage1stOrderRadauIA()
Default constructor.
void setTableau(const Teuchos::SerialDenseMatrix< int, Scalar > &A, const Teuchos::SerialDenseVector< int, Scalar > &b, const Teuchos::SerialDenseVector< int, Scalar > &c, const int order, const int orderMin, const int orderMax, const Teuchos::SerialDenseVector< int, Scalar > &bstar=Teuchos::SerialDenseVector< int, Scalar >())
Teuchos::RCP< StepperERK_Midpoint< Scalar > > createStepperERK_Midpoint(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
RK Explicit 3 Stage 3rd order TVD.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
std::string getDescription() const
OrdinalType numCols() const
StepperEDIRK_2StageTheta()
Default constructor.
Teuchos::RCP< StepperSDIRK_SSPDIRK22< Scalar > > createStepperSDIRK_SSPDIRK22(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
StepperERK_ForwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
std::string getDescription() const
std::string getDescription() const
StepperDIRK_General()
Default constructor.
Teuchos::RCP< StepperERK_Trapezoidal< Scalar > > createStepperERK_Trapezoidal(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Forward Euler Runge-Kutta Butcher Tableau.
StepperDIRK_1StageTheta(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction, Scalar theta=Scalar(0.5))
std::string getDescription() const
StepperERK_BogackiShampine32(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Teuchos::RCP< StepperSDIRK_ImplicitMidpoint< Scalar > > createStepperSDIRK_ImplicitMidpoint(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperERK_3Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Teuchos::RCP< StepperERK_General< Scalar > > createStepperERK_General(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperDIRK_BackwardEuler()
Default constructor.
virtual std::string getDescription() const
TypeTo as(const TypeFrom &t)
void setGammaType(std::string gammaType)
StepperERK_3Stage3rdOrderHeun()
Default constructor.
Teuchos::RCP< StepperSDIRK_2Stage2ndOrder< Scalar > > createStepperSDIRK_2Stage2ndOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Explicit RK Merson Butcher Tableau.
std::string getDescription() const
Runge-Kutta 4th order Butcher Tableau.
std::string getDescription() const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
RK Explicit 3 Stage 3rd order.
StepperERK_4Stage4thOrder()
Default constructor.
void setGamma(Scalar gamma)
std::string getDescription() const
StepperSDIRK_5Stage5thOrder()
Default constructor.
void setTableau(const Teuchos::SerialDenseMatrix< int, Scalar > &A, const Teuchos::SerialDenseVector< int, Scalar > &b, const Teuchos::SerialDenseVector< int, Scalar > &c, const int order, const int orderMin, const int orderMax, const Teuchos::SerialDenseVector< int, Scalar > &bstar=Teuchos::SerialDenseVector< int, Scalar >())
RK Implicit 1 Stage 1st order Radau IA.
StepperERK_Ralston(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperSDIRK_3Stage4thOrder()
Default constructor.
virtual void setup(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &wrapperModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Setup for constructor.
StepperSDIRK_5Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Teuchos::RCP< StepperERK_Ralston< Scalar > > createStepperERK_Ralston(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperDIRK_2Stage2ndOrderLobattoIIIB()
Default constructor.
std::string getDescription() const
virtual void setUseFSAL(bool a)
StepperSDIRK_2Stage2ndOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction, Scalar gamma=Scalar(0.2928932188134524))
StepperERK_ForwardEuler()
Default constructor.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
StepperSDIRK_SSPDIRK32(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
StepperERK_3_8Rule(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
std::string getDescription() const
std::string getDescription() const
void setStepperType(std::string s)
Set the stepper type.
StepperEDIRK_TrapezoidalRule()
Default constructor.
RK Explicit 3 Stage 3rd order by Heun.
StepperERK_General(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::SerialDenseMatrix< int, Scalar > &A, const Teuchos::SerialDenseVector< int, Scalar > &b, const Teuchos::SerialDenseVector< int, Scalar > &c, const int order, const int orderMin, const int orderMax, const Teuchos::SerialDenseVector< int, Scalar > &bstar, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction=Teuchos::null)
Teuchos::RCP< StepperERK_4Stage4thOrder< Scalar > > createStepperERK_4Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
OrdinalType numRows() const
virtual void setup(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
Setup for constructor.
Teuchos::RCP< StepperSDIRK_SSPDIRK32< Scalar > > createStepperSDIRK_SSPDIRK32(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
Teuchos::RCP< StepperDIRK_1StageTheta< Scalar > > createStepperDIRK_1StageTheta(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
void setICConsistency(std::string s)
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
Teuchos::RCP< StepperERK_4Stage3rdOrderRunge< Scalar > > createStepperERK_4Stage3rdOrderRunge(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
StepperERK_4Stage3rdOrderRunge()
Default constructor.
std::string getDescription() const
Teuchos::RCP< StepperDIRK_General< Scalar > > createStepperDIRK_General(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.