9 #ifndef Tempus_StepperRKButcherTableau_hpp
10 #define Tempus_StepperRKButcherTableau_hpp
14 #pragma clang system_header
17 #include "Tempus_StepperExplicitRK.hpp"
18 #include "Tempus_StepperDIRK.hpp"
39 template<
class Scalar>
56 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
58 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
61 std::string ICConsistency,
62 bool ICConsistencyCheck,
67 this->
setup(appModel, obs, useFSAL, ICConsistency,
68 ICConsistencyCheck, useEmbedded);
72 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
74 std::string ICConsistency,
75 bool ICConsistencyCheck,
81 this->
setup(appModel, useFSAL, ICConsistency,
82 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
87 std::ostringstream Description;
92 return Description.str();
99 typedef Teuchos::ScalarTraits<Scalar> ST;
100 Teuchos::SerialDenseMatrix<int,Scalar> A(1,1);
101 Teuchos::SerialDenseVector<int,Scalar> b(1);
102 Teuchos::SerialDenseVector<int,Scalar> c(1);
131 template<
class Scalar>
148 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
150 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
153 std::string ICConsistency,
154 bool ICConsistencyCheck,
159 this->
setup(appModel, obs, useFSAL, ICConsistency,
160 ICConsistencyCheck, useEmbedded);
164 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
166 std::string ICConsistency,
167 bool ICConsistencyCheck,
173 this->
setup(appModel, useFSAL, ICConsistency,
174 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
179 std::ostringstream Description;
181 <<
"\"The\" Runge-Kutta Method (explicit):\n"
182 <<
"Solving Ordinary Differential Equations I:\n"
183 <<
"Nonstiff Problems, 2nd Revised Edition\n"
184 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
185 <<
"Table 1.2, pg 138\n"
186 <<
"c = [ 0 1/2 1/2 1 ]'\n"
191 <<
"b = [ 1/6 1/3 1/3 1/6 ]'";
192 return Description.str();
197 typedef Teuchos::ScalarTraits<Scalar> ST;
198 const Scalar one = ST::one();
199 const Scalar zero = ST::zero();
200 const Scalar onehalf = one/(2*one);
201 const Scalar onesixth = one/(6*one);
202 const Scalar onethird = one/(3*one);
205 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
206 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
207 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
210 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero;
211 A(1,0) = onehalf; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero;
212 A(2,0) = zero; A(2,1) = onehalf; A(2,2) = zero; A(2,3) = zero;
213 A(3,0) = zero; A(3,1) = zero; A(3,2) = one; A(3,3) = zero;
216 b(0) = onesixth; b(1) = onethird; b(2) = onethird; b(3) = onesixth;
219 c(0) = zero; c(1) = onehalf; c(2) = onehalf; c(3) = one;
251 template<
class Scalar>
268 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
270 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
273 std::string ICConsistency,
274 bool ICConsistencyCheck,
279 this->
setup(appModel, obs, useFSAL, ICConsistency,
280 ICConsistencyCheck, useEmbedded);
284 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
286 std::string ICConsistency,
287 bool ICConsistencyCheck,
293 this->
setup(appModel, useFSAL, ICConsistency,
294 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
299 std::ostringstream Description;
301 <<
"P. Bogacki and L.F. Shampine.\n"
302 <<
"A 3(2) pair of Runge–Kutta formulas.\n"
303 <<
"Applied Mathematics Letters, 2(4):321 – 325, 1989.\n"
304 <<
"c = [ 0 1/2 3/4 1 ]'\n"
308 <<
" [ 2/9 1/3 4/9 0 ]\n"
309 <<
"b = [ 2/9 1/3 4/9 0 ]'\n"
310 <<
"bstar = [ 7/24 1/4 1/3 1/8 ]'";
311 return Description.str();
318 typedef Teuchos::ScalarTraits<Scalar> ST;
321 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
322 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
323 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
324 Teuchos::SerialDenseVector<int,Scalar> bstar(NumStages);
326 const Scalar one = ST::one();
327 const Scalar zero = ST::zero();
328 const Scalar onehalf = one/(2*one);
329 const Scalar onethird = one/(3*one);
330 const Scalar threefourths = (3*one)/(4*one);
331 const Scalar twoninths = (2*one)/(9*one);
332 const Scalar fourninths = (4*one)/(9*one);
335 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero;
336 A(1,0) = onehalf; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero;
337 A(2,0) = zero; A(2,1) =threefourths; A(2,2) = zero; A(2,3) = zero;
338 A(3,0) =twoninths; A(3,1) = onethird; A(3,2) =fourninths; A(3,3) = zero;
341 b(0) = A(3,0); b(1) = A(3,1); b(2) = A(3,2); b(3) = A(3,3);
344 c(0) = zero; c(1) = onehalf; c(2) = threefourths; c(3) = one;
347 bstar(0) = as<Scalar>(7*one/(24*one));
348 bstar(1) = as<Scalar>(1*one/(4*one));
349 bstar(2) = as<Scalar>(1*one/(3*one));
350 bstar(3) = as<Scalar>(1*one/(8*one));
384 template<
class Scalar>
401 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
403 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
406 std::string ICConsistency,
407 bool ICConsistencyCheck,
412 this->
setup(appModel, obs, useFSAL, ICConsistency,
413 ICConsistencyCheck, useEmbedded);
417 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
419 std::string ICConsistency,
420 bool ICConsistencyCheck,
426 this->
setup(appModel, useFSAL, ICConsistency,
427 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
432 std::ostringstream Description;
434 <<
"Solving Ordinary Differential Equations I:\n"
435 <<
"Nonstiff Problems, 2nd Revised Edition\n"
436 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
437 <<
"Table 4.1, pg 167\n"
438 <<
"c = [ 0 1/3 1/3 1/2 1 ]'\n"
441 <<
" [ 1/6 1/6 0 ]\n"
442 <<
" [ 1/8 0 3/8 0 ]\n"
443 <<
" [ 1/2 0 -3/2 2 0 ]\n"
444 <<
"b = [ 1/6 0 0 2/3 1/6 ]'\n"
445 <<
"bstar = [ 1/10 0 3/10 2/5 1/5 ]'";
446 return Description.str();
454 typedef Teuchos::ScalarTraits<Scalar> ST;
457 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages,
true);
458 Teuchos::SerialDenseVector<int,Scalar> b(NumStages,
true);
459 Teuchos::SerialDenseVector<int,Scalar> c(NumStages,
true);
460 Teuchos::SerialDenseVector<int,Scalar> bstar(NumStages,
true);
462 const Scalar one = ST::one();
463 const Scalar zero = ST::zero();
466 A(1,0) = as<Scalar>(one/(3*one));;
468 A(2,0) = as<Scalar>(one/(6*one));;
469 A(2,1) = as<Scalar>(one/(6*one));;
471 A(3,0) = as<Scalar>(one/(8*one));;
472 A(3,2) = as<Scalar>(3*one/(8*one));;
474 A(4,0) = as<Scalar>(one/(2*one));;
475 A(4,2) = as<Scalar>(-3*one/(2*one));;
479 b(0) = as<Scalar>(one/(6*one));
480 b(3) = as<Scalar>(2*one/(3*one));
481 b(4) = as<Scalar>(one/(6*one));
485 c(1) = as<Scalar>(1*one/(3*one));
486 c(2) = as<Scalar>(1*one/(3*one));
487 c(3) = as<Scalar>(1*one/(2*one));
491 bstar(0) = as<Scalar>(1*one/(10*one));
492 bstar(2) = as<Scalar>(3*one/(10*one));
493 bstar(3) = as<Scalar>(2*one/(5*one));
494 bstar(4) = as<Scalar>(1*one/(5*one));
524 template<
class Scalar>
537 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
539 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
542 std::string ICConsistency,
543 bool ICConsistencyCheck,
548 this->
setup(appModel, obs, useFSAL, ICConsistency,
549 ICConsistencyCheck, useEmbedded);
553 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
555 std::string ICConsistency,
556 bool ICConsistencyCheck,
562 this->
setup(appModel, useFSAL, ICConsistency,
563 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
568 std::ostringstream Description;
570 <<
"Solving Ordinary Differential Equations I:\n"
571 <<
"Nonstiff Problems, 2nd Revised Edition\n"
572 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
573 <<
"Table 1.2, pg 138\n"
574 <<
"c = [ 0 1/3 2/3 1 ]'\n"
579 <<
"b = [ 1/8 3/8 3/8 1/8 ]'";
580 return Description.str();
588 typedef Teuchos::ScalarTraits<Scalar> ST;
591 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
592 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
593 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
595 const Scalar one = ST::one();
596 const Scalar zero = ST::zero();
597 const Scalar onethird = as<Scalar>(one/(3*one));
598 const Scalar twothirds = as<Scalar>(2*one/(3*one));
599 const Scalar oneeighth = as<Scalar>(one/(8*one));
600 const Scalar threeeighths = as<Scalar>(3*one/(8*one));
603 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero;
604 A(1,0) = onethird; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero;
605 A(2,0) = -onethird; A(2,1) = one; A(2,2) = zero; A(2,3) = zero;
606 A(3,0) = one; A(3,1) = -one; A(3,2) = one; A(3,3) = zero;
609 b(0) =oneeighth; b(1) =threeeighths; b(2) =threeeighths; b(3) =oneeighth;
612 c(0) = zero; c(1) = onethird; c(2) = twothirds; c(3) = one;
643 template<
class Scalar>
660 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
662 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
665 std::string ICConsistency,
666 bool ICConsistencyCheck,
671 this->
setup(appModel, obs, useFSAL, ICConsistency,
672 ICConsistencyCheck, useEmbedded);
676 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
678 std::string ICConsistency,
679 bool ICConsistencyCheck,
685 this->
setup(appModel, useFSAL, ICConsistency,
686 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
691 std::ostringstream Description;
693 <<
"Solving Ordinary Differential Equations I:\n"
694 <<
"Nonstiff Problems, 2nd Revised Edition\n"
695 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
696 <<
"Table 1.1, pg 135\n"
697 <<
"c = [ 0 1/2 1 1 ]'\n"
702 <<
"b = [ 1/6 2/3 0 1/6 ]'";
703 return Description.str();
709 typedef Teuchos::ScalarTraits<Scalar> ST;
711 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
712 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
713 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
715 const Scalar one = ST::one();
716 const Scalar onehalf = one/(2*one);
717 const Scalar onesixth = one/(6*one);
718 const Scalar twothirds = 2*one/(3*one);
719 const Scalar zero = ST::zero();
722 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero;
723 A(1,0) = onehalf; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero;
724 A(2,0) = zero; A(2,1) = one; A(2,2) = zero; A(2,3) = zero;
725 A(3,0) = zero; A(3,1) = zero; A(3,2) = one; A(3,3) = zero;
728 b(0) = onesixth; b(1) = twothirds; b(2) = zero; b(3) = onesixth;
731 c(0) = zero; c(1) = onehalf; c(2) = one; c(3) = one;
761 template<
class Scalar>
773 this->
setStepperType(
"RK Explicit 5 Stage 3rd order by Kinnmark and Gray");
778 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
780 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
783 std::string ICConsistency,
784 bool ICConsistencyCheck,
787 this->
setStepperType(
"RK Explicit 5 Stage 3rd order by Kinnmark and Gray");
789 this->
setup(appModel, obs, useFSAL, ICConsistency,
790 ICConsistencyCheck, useEmbedded);
794 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
796 std::string ICConsistency,
797 bool ICConsistencyCheck,
801 this->
setStepperType(
"RK Explicit 5 Stage 3rd order by Kinnmark and Gray");
803 this->
setup(appModel, useFSAL, ICConsistency,
804 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
809 std::ostringstream Description;
811 <<
"Kinnmark & Gray 5 stage, 3rd order scheme \n"
812 <<
"Modified by P. Ullrich. From the prim_advance_mod.F90 \n"
813 <<
"routine in the HOMME atmosphere model code.\n"
814 <<
"c = [ 0 1/5 1/5 1/3 2/3 ]'\n"
818 <<
" [ 0 0 1/3 0 ]\n"
819 <<
" [ 0 0 0 2/3 0 ]\n"
820 <<
"b = [ 1/4 0 0 0 3/4 ]'";
821 return Description.str();
828 typedef Teuchos::ScalarTraits<Scalar> ST;
830 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
831 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
832 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
834 const Scalar one = ST::one();
835 const Scalar onefifth = one/(5*one);
836 const Scalar onefourth = one/(4*one);
837 const Scalar onethird = one/(3*one);
838 const Scalar twothirds = 2*one/(3*one);
839 const Scalar threefourths = 3*one/(4*one);
840 const Scalar zero = ST::zero();
843 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero; A(0,3) = zero; A(0,4) = zero;
844 A(1,0) = onefifth; A(1,1) = zero; A(1,2) = zero; A(1,3) = zero; A(1,4) = zero;
845 A(2,0) = zero; A(2,1) = onefifth; A(2,2) = zero; A(2,3) = zero; A(2,4) = zero;
846 A(3,0) = zero; A(3,1) = zero; A(3,2) = onethird; A(3,3) = zero; A(3,4) = zero;
847 A(4,0) = zero; A(4,1) = zero; A(4,2) = zero; A(4,3) = twothirds; A(4,4) = zero;
850 b(0) =onefourth; b(1) =zero; b(2) =zero; b(3) =zero; b(4) =threefourths;
853 c(0) =zero; c(1) =onefifth; c(2) =onefifth; c(3) =onethird; c(4) =twothirds;
879 template<
class Scalar>
896 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
898 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
901 std::string ICConsistency,
902 bool ICConsistencyCheck,
907 this->
setup(appModel, obs, useFSAL, ICConsistency,
908 ICConsistencyCheck, useEmbedded);
912 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
914 std::string ICConsistency,
915 bool ICConsistencyCheck,
921 this->
setup(appModel, useFSAL, ICConsistency,
922 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
927 std::ostringstream Description;
929 <<
"c = [ 0 1/2 1 ]'\n"
933 <<
"b = [ 1/6 4/6 1/6 ]'";
934 return Description.str();
941 typedef Teuchos::ScalarTraits<Scalar> ST;
942 const Scalar one = ST::one();
943 const Scalar two = Teuchos::as<Scalar>(2*one);
944 const Scalar zero = ST::zero();
945 const Scalar onehalf = one/(2*one);
946 const Scalar onesixth = one/(6*one);
947 const Scalar foursixth = 4*one/(6*one);
950 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
951 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
952 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
955 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero;
956 A(1,0) = onehalf; A(1,1) = zero; A(1,2) = zero;
957 A(2,0) = -one; A(2,1) = two; A(2,2) = zero;
960 b(0) = onesixth; b(1) = foursixth; b(2) = onesixth;
963 c(0) = zero; c(1) = onehalf; c(2) = one;
1000 template<
class Scalar>
1017 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
1019 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1022 std::string ICConsistency,
1023 bool ICConsistencyCheck,
1028 this->
setup(appModel, obs, useFSAL, ICConsistency,
1029 ICConsistencyCheck, useEmbedded);
1033 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1035 std::string ICConsistency,
1036 bool ICConsistencyCheck,
1042 this->
setup(appModel, useFSAL, ICConsistency,
1043 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1048 std::ostringstream Description;
1050 <<
"This Stepper is known as 'RK Explicit 3 Stage 3rd order TVD' or 'SSPERK33'.\n"
1051 <<
"Sigal Gottlieb and Chi-Wang Shu\n"
1052 <<
"`Total Variation Diminishing Runge-Kutta Schemes'\n"
1053 <<
"Mathematics of Computation\n"
1054 <<
"Volume 67, Number 221, January 1998, pp. 73-85\n"
1055 <<
"c = [ 0 1 1/2 ]'\n"
1058 <<
" [ 1/4 1/4 0 ]\n"
1059 <<
"b = [ 1/6 1/6 4/6 ]'\n"
1060 <<
"This is also written in the following set of updates.\n"
1061 <<
"u1 = u^n + dt L(u^n)\n"
1062 <<
"u2 = 3 u^n/4 + u1/4 + dt L(u1)/4\n"
1063 <<
"u^(n+1) = u^n/3 + 2 u2/2 + 2 dt L(u2)/3";
1064 return Description.str();
1071 typedef Teuchos::ScalarTraits<Scalar> ST;
1073 const Scalar one = ST::one();
1074 const Scalar zero = ST::zero();
1075 const Scalar onehalf = one/(2*one);
1076 const Scalar onefourth = one/(4*one);
1077 const Scalar onesixth = one/(6*one);
1078 const Scalar foursixth = 4*one/(6*one);
1081 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
1082 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
1083 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
1084 Teuchos::SerialDenseVector<int,Scalar> bstar(NumStages);
1087 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero;
1088 A(1,0) = one; A(1,1) = zero; A(1,2) = zero;
1089 A(2,0) = onefourth; A(2,1) = onefourth; A(2,2) = zero;
1092 b(0) = onesixth; b(1) = onesixth; b(2) = foursixth;
1095 c(0) = zero; c(1) = one; c(2) = onehalf;
1098 bstar(0) = as<Scalar>(0.291485418878409);
1099 bstar(1) = as<Scalar>(0.291485418878409);
1100 bstar(2) = as<Scalar>(0.417029162243181);
1130 template<
class Scalar>
1147 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
1149 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1152 std::string ICConsistency,
1153 bool ICConsistencyCheck,
1158 this->
setup(appModel, obs, useFSAL, ICConsistency,
1159 ICConsistencyCheck, useEmbedded);
1163 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1165 std::string ICConsistency,
1166 bool ICConsistencyCheck,
1172 this->
setup(appModel, useFSAL, ICConsistency,
1173 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1178 std::ostringstream Description;
1180 <<
"Solving Ordinary Differential Equations I:\n"
1181 <<
"Nonstiff Problems, 2nd Revised Edition\n"
1182 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
1183 <<
"Table 1.1, pg 135\n"
1184 <<
"c = [ 0 1/3 2/3 ]'\n"
1188 <<
"b = [ 1/4 0 3/4 ]'";
1189 return Description.str();
1196 typedef Teuchos::ScalarTraits<Scalar> ST;
1197 const Scalar one = ST::one();
1198 const Scalar zero = ST::zero();
1199 const Scalar onethird = one/(3*one);
1200 const Scalar twothirds = 2*one/(3*one);
1201 const Scalar onefourth = one/(4*one);
1202 const Scalar threefourths = 3*one/(4*one);
1205 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
1206 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
1207 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
1210 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero;
1211 A(1,0) = onethird; A(1,1) = zero; A(1,2) = zero;
1212 A(2,0) = zero; A(2,1) = twothirds; A(2,2) = zero;
1215 b(0) = onefourth; b(1) = zero; b(2) = threefourths;
1218 c(0) = zero; c(1) = onethird; c(2) = twothirds;
1247 template<
class Scalar>
1264 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
1266 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1269 std::string ICConsistency,
1270 bool ICConsistencyCheck,
1275 this->
setup(appModel, obs, useFSAL, ICConsistency,
1276 ICConsistencyCheck, useEmbedded);
1280 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1282 std::string ICConsistency,
1283 bool ICConsistencyCheck,
1289 this->
setup(appModel, useFSAL, ICConsistency,
1290 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1295 std::ostringstream Description;
1297 <<
"Solving Ordinary Differential Equations I:\n"
1298 <<
"Nonstiff Problems, 2nd Revised Edition\n"
1299 <<
"E. Hairer, S.P. Norsett, G. Wanner\n"
1300 <<
"Table 1.1, pg 135\n"
1301 <<
"c = [ 0 1/2 ]'\n"
1305 return Description.str();
1312 typedef Teuchos::ScalarTraits<Scalar> ST;
1313 const Scalar one = ST::one();
1314 const Scalar zero = ST::zero();
1315 const Scalar onehalf = one/(2*one);
1318 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
1319 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
1320 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
1323 A(0,0) = zero; A(0,1) = zero;
1324 A(1,0) = onehalf; A(1,1) = zero;
1327 b(0) = zero; b(1) = one;
1330 c(0) = zero; c(1) = onehalf;
1355 template<
class Scalar>
1372 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
1374 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1377 std::string ICConsistency,
1378 bool ICConsistencyCheck,
1383 this->
setup(appModel, obs, useFSAL, ICConsistency,
1384 ICConsistencyCheck, useEmbedded);
1388 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1390 std::string ICConsistency,
1391 bool ICConsistencyCheck,
1397 this->
setup(appModel, useFSAL, ICConsistency,
1398 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1403 std::ostringstream Description;
1405 <<
"This Stepper is known as 'RK Explicit Ralston' or 'RK2'.\n"
1406 <<
"c = [ 0 2/3 ]'\n"
1409 <<
"b = [ 1/4 3/4 ]'";
1410 return Description.str();
1417 typedef Teuchos::ScalarTraits<Scalar> ST;
1418 const Scalar one = ST::one();
1419 const Scalar zero = ST::zero();
1421 const int NumStages = 2;
1422 const int order = 2;
1423 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
1424 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
1425 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
1428 A(0,0) = zero; A(0,1) = zero; A(1,1) = zero;
1429 A(1,0) = (2*one)/(3*one);
1432 b(0) = (1*one)/(4*one);
1433 b(1) = (3*one)/(4*one);
1437 c(1) = (2*one)/(3*one);
1462 template<
class Scalar>
1479 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
1481 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1484 std::string ICConsistency,
1485 bool ICConsistencyCheck,
1490 this->
setup(appModel, obs, useFSAL, ICConsistency,
1491 ICConsistencyCheck, useEmbedded);
1495 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1497 std::string ICConsistency,
1498 bool ICConsistencyCheck,
1504 this->
setup(appModel, useFSAL, ICConsistency,
1505 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1510 std::ostringstream Description;
1512 <<
"This Stepper is known as 'RK Explicit Trapezoidal' or 'Heuns Method' or 'SSPERK22'.\n"
1516 <<
"b = [ 1/2 1/2 ]\n"
1517 <<
"bstart = [ 3/4 1/4 ]'";
1518 return Description.str();
1525 typedef Teuchos::ScalarTraits<Scalar> ST;
1527 const Scalar one = ST::one();
1528 const Scalar zero = ST::zero();
1529 const Scalar onehalf = one/(2*one);
1532 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
1533 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
1534 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
1535 Teuchos::SerialDenseVector<int,Scalar> bstar(NumStages);
1538 A(0,0) = zero; A(0,1) = zero;
1539 A(1,0) = one; A(1,1) = zero;
1542 b(0) = onehalf; b(1) = onehalf;
1545 c(0) = zero; c(1) = one;
1548 bstar(0) = as<Scalar>(3*one/(4*one));
1549 bstar(1) = as<Scalar>(1*one/(4*one));
1577 template<
class Scalar>
1589 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
1591 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1594 std::string ICConsistency,
1595 bool ICConsistencyCheck,
1600 this->
setup(appModel, obs, useFSAL, ICConsistency,
1601 ICConsistencyCheck, useEmbedded);
1605 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1607 std::string ICConsistency,
1608 bool ICConsistencyCheck,
1614 this->
setup(appModel, useFSAL, ICConsistency,
1615 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1620 std::ostringstream Description;
1622 <<
"Strong Stability Preserving Explicit RK (stage=5, order=4)\n"
1624 return Description.str();
1632 typedef Teuchos::ScalarTraits<Scalar> ST;
1634 const int NumStages = 5;
1635 const int order = 4;
1636 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
1637 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
1638 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
1639 Teuchos::SerialDenseVector<int,Scalar> bstar(NumStages);
1640 const Scalar zero = ST::zero();
1643 A(0,0) = A(0,1) = A(0,2) = A(0,3) = A(0,4) = zero;
1645 A(1,0) = as<Scalar>(0.391752226571889);
1646 A(1,1) = A(1,2) = A(1,3) = A(0,4) = zero;
1648 A(2,0) = as<Scalar>(0.217669096261169);
1649 A(2,1) = as<Scalar>(0.368410593050372);
1650 A(2,2) = A(2,3) = A(2,4) = zero;
1652 A(3,0) = as<Scalar>(0.082692086657811);
1653 A(3,1) = as<Scalar>(0.139958502191896);
1654 A(3,2) = as<Scalar>(0.251891774271693);
1655 A(3,3) = A(2,4) = zero;
1657 A(4,0) = as<Scalar>(0.067966283637115);
1658 A(4,1) = as<Scalar>(0.115034698504632);
1659 A(4,2) = as<Scalar>(0.207034898597385);
1660 A(4,3) = as<Scalar>(0.544974750228520);
1664 b(0) = as<Scalar>(0.146811876084786);
1665 b(1) = as<Scalar>(0.248482909444976);
1666 b(2) = as<Scalar>(0.104258830331980);
1667 b(3) = as<Scalar>(0.274438900901350);
1668 b(4) = as<Scalar>(0.226007483236908);
1673 c(2) = A(2,0) + A(2,1);
1674 c(3) = A(3,0) + A(3,1) + A(3,2);
1675 c(4) = A(4,0) + A(4,1) + A(4,2) + A(4,3);
1678 bstar(0) = as<Scalar>(0.130649104813131);
1679 bstar(1) = as<Scalar>(0.317716031201302);
1680 bstar(2) = as<Scalar>(0.000000869337261);
1681 bstar(3) = as<Scalar>(0.304581512634772);
1682 bstar(4) = as<Scalar>(0.247052482013534);
1718 template<
class Scalar>
1730 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
1732 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1735 std::string ICConsistency,
1736 bool ICConsistencyCheck,
1738 const Teuchos::SerialDenseMatrix<int,Scalar>& A,
1739 const Teuchos::SerialDenseVector<int,Scalar>& b,
1740 const Teuchos::SerialDenseVector<int,Scalar>& c,
1744 const Teuchos::SerialDenseVector<int,Scalar>& bstar)
1747 this->
setTableau(A,b,c,order,orderMin,orderMax,bstar);
1749 TEUCHOS_TEST_FOR_EXCEPTION(
1750 this->
tableau_->isImplicit() ==
true, std::logic_error,
1751 "Error - General ERK received an implicit Butcher Tableau!\n");
1753 this->
setup(appModel, obs, useFSAL, ICConsistency,
1754 ICConsistencyCheck, useEmbedded);
1758 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1760 std::string ICConsistency,
1761 bool ICConsistencyCheck,
1763 const Teuchos::SerialDenseMatrix<int,Scalar>& A,
1764 const Teuchos::SerialDenseVector<int,Scalar>& b,
1765 const Teuchos::SerialDenseVector<int,Scalar>& c,
1769 const Teuchos::SerialDenseVector<int,Scalar>& bstar,
1773 this->
setTableau(A,b,c,order,orderMin,orderMax,bstar);
1775 TEUCHOS_TEST_FOR_EXCEPTION(
1776 this->
tableau_->isImplicit() ==
true, std::logic_error,
1777 "Error - General ERK received an implicit Butcher Tableau!\n");
1779 this->
setup(appModel, useFSAL, ICConsistency,
1780 ICConsistencyCheck, useEmbedded, stepperRKAppAction);
1785 std::stringstream Description;
1787 <<
"The format of the Butcher Tableau parameter list is\n"
1788 <<
" <Parameter name=\"A\" type=\"string\" value=\"# # # ;\n"
1791 <<
" <Parameter name=\"b\" type=\"string\" value=\"# # #\"/>\n"
1792 <<
" <Parameter name=\"c\" type=\"string\" value=\"# # #\"/>\n\n"
1793 <<
"Note the number of stages is implicit in the number of entries.\n"
1794 <<
"The number of stages must be consistent.\n"
1796 <<
"Default tableau is RK4 (order=4):\n"
1797 <<
"c = [ 0 1/2 1/2 1 ]'\n"
1802 <<
"b = [ 1/6 1/3 1/3 1/6 ]'";
1803 return Description.str();
1808 if (this->
tableau_ == Teuchos::null) {
1811 auto t = stepper->getTableau();
1814 t->A(),t->b(),t->c(),
1815 t->order(),t->orderMin(),t->orderMax(),
1821 const Teuchos::SerialDenseVector<int,Scalar>& b,
1822 const Teuchos::SerialDenseVector<int,Scalar>& c,
1826 const Teuchos::SerialDenseVector<int,Scalar>&
1827 bstar = Teuchos::SerialDenseVector<int,Scalar>())
1836 Teuchos::RCP<const Teuchos::ParameterList>
1839 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
1841 pl->set<std::string>(
"Initial Condition Consistency",
1845 Teuchos::RCP<Teuchos::ParameterList> tableauPL = Teuchos::parameterList();
1846 tableauPL->set<std::string>(
"A",
1847 "0.0 0.0 0.0 0.0; 0.5 0.0 0.0 0.0; 0.0 0.5 0.0 0.0; 0.0 0.0 1.0 0.0");
1848 tableauPL->set<std::string>(
"b",
1849 "0.166666666666667 0.333333333333333 0.333333333333333 0.166666666666667");
1850 tableauPL->set<std::string>(
"c",
"0.0 0.5 0.5 1.0");
1851 tableauPL->set<
int>(
"order", 4);
1852 tableauPL->set<std::string>(
"bstar",
"");
1853 pl->set(
"Tableau", *tableauPL);
1874 template<
class Scalar>
1891 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
1893 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1895 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
1897 std::string ICConsistency,
1898 bool ICConsistencyCheck,
1900 bool zeroInitialGuess)
1904 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
1905 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
1909 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
1910 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
1912 std::string ICConsistency,
1913 bool ICConsistencyCheck,
1915 bool zeroInitialGuess,
1920 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
1921 useEmbedded, zeroInitialGuess, stepperRKAppAction);
1926 std::ostringstream Description;
1931 return Description.str();
1936 Teuchos::RCP<const Teuchos::ParameterList>
1939 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
1941 pl->set<
bool>(
"Initial Condition Consistency Check",
1950 typedef Teuchos::ScalarTraits<Scalar> ST;
1952 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
1953 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
1954 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
1996 template<
class Scalar>
2008 typedef Teuchos::ScalarTraits<Scalar> ST;
2009 const Scalar one = ST::one();
2010 gammaDefault_ = Teuchos::as<Scalar>((2*one-ST::squareroot(2*one))/(2*one));
2018 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
2020 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2022 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2024 std::string ICConsistency,
2025 bool ICConsistencyCheck,
2027 bool zeroInitialGuess,
2028 Scalar gamma = Scalar(0.2928932188134524))
2030 typedef Teuchos::ScalarTraits<Scalar> ST;
2031 const Scalar one = ST::one();
2032 gammaDefault_ = Teuchos::as<Scalar>((2*one-ST::squareroot(2*one))/(2*one));
2037 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
2038 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
2042 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2043 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2045 std::string ICConsistency,
2046 bool ICConsistencyCheck,
2048 bool zeroInitialGuess,
2050 Scalar gamma = Scalar(0.2928932188134524))
2052 typedef Teuchos::ScalarTraits<Scalar> ST;
2053 const Scalar one = ST::one();
2054 gammaDefault_ = Teuchos::as<Scalar>((2*one-ST::squareroot(2*one))/(2*one));
2059 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2060 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2074 std::ostringstream Description;
2076 <<
"Computer Methods for ODEs and DAEs\n"
2077 <<
"U. M. Ascher and L. R. Petzold\n"
2079 <<
"gamma = (2+-sqrt(2))/2\n"
2080 <<
"c = [ gamma 1 ]'\n"
2081 <<
"A = [ gamma 0 ]\n"
2082 <<
" [ 1-gamma gamma ]\n"
2083 <<
"b = [ 1-gamma gamma ]'";
2084 return Description.str();
2089 Teuchos::RCP<const Teuchos::ParameterList>
2092 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
2094 pl->set<
bool>(
"Initial Condition Consistency Check",
2097 "The default value is gamma = (2-sqrt(2))/2. "
2098 "This will produce an L-stable 2nd order method with the stage "
2099 "times within the timestep. Other values of gamma will still "
2100 "produce an L-stable scheme, but will only be 1st order accurate.");
2109 typedef Teuchos::ScalarTraits<Scalar> ST;
2111 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
2112 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
2113 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
2115 const Scalar one = ST::one();
2116 const Scalar zero = ST::zero();
2119 A(0,0) =
gamma_; A(0,1) = zero;
2120 A(1,0) = Teuchos::as<Scalar>( one -
gamma_ ); A(1,1) =
gamma_;
2123 b(0) = Teuchos::as<Scalar>( one -
gamma_ ); b(1) =
gamma_;
2126 c(0) =
gamma_; c(1) = one;
2168 template<
class Scalar>
2184 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
2186 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2188 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2190 std::string ICConsistency,
2191 bool ICConsistencyCheck,
2193 bool zeroInitialGuess)
2198 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
2199 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
2203 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2204 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2206 std::string ICConsistency,
2207 bool ICConsistencyCheck,
2209 bool zeroInitialGuess,
2215 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2216 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2221 std::ostringstream Description;
2223 <<
"Implicit-explicit Runge-Kutta schemes and applications to\n"
2224 <<
"hyperbolic systems with relaxation\n"
2225 <<
"L Pareschi, G Russo\n"
2226 <<
"Journal of Scientific computing, 2005 - Springer\n"
2228 <<
"gamma = 1/(2+sqrt(2))\n"
2229 <<
"c = [ gamma (1-gamma) 1/2 ]'\n"
2230 <<
"A = [ gamma 0 0 ]\n"
2231 <<
" [ 1-2gamma gamma 0 ]\n"
2232 <<
" [ 1/2-gamma 0 gamma ]\n"
2233 <<
"b = [ 1/6 1/6 2/3 ]'";
2234 return Description.str();
2237 Teuchos::RCP<const Teuchos::ParameterList>
2240 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
2242 pl->set<
bool>(
"Initial Condition Consistency Check",
2251 typedef Teuchos::ScalarTraits<Scalar> ST;
2253 const int NumStages = 3;
2254 const int order = 2;
2255 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
2256 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
2257 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
2258 const Scalar one = ST::one();
2259 const Scalar zero = ST::zero();
2260 const Scalar gamma = as<Scalar>(one - ( one / ST::squareroot(2*one) ) );
2263 A(0,0) = A(1,1) = A(2,2) = gamma;
2264 A(0,1) = A(0,2) = A(1,2) = A(2,1) = zero;
2265 A(1,0) = as<Scalar>(one - 2*gamma);
2266 A(2,0) = as<Scalar>( ( one/ (2.*one)) - gamma );
2269 b(0) = b(1) = ( one / (6*one) );
2270 b(2) = (2*one)/(3*one);
2275 c(2) = one / (2*one);
2311 template<
class Scalar>
2323 typedef Teuchos::ScalarTraits<Scalar> ST;
2325 const Scalar one = ST::one();
2326 gammaDefault_ = as<Scalar>((3*one+ST::squareroot(3*one))/(6*one));
2336 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
2338 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2340 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2342 std::string ICConsistency,
2343 bool ICConsistencyCheck,
2345 bool zeroInitialGuess,
2346 std::string gammaType =
"3rd Order A-stable",
2347 Scalar gamma = Scalar(0.7886751345948128))
2349 typedef Teuchos::ScalarTraits<Scalar> ST;
2351 const Scalar one = ST::one();
2352 gammaDefault_ = as<Scalar>((3*one+ST::squareroot(3*one))/(6*one));
2359 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
2360 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
2364 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2365 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2367 std::string ICConsistency,
2368 bool ICConsistencyCheck,
2370 bool zeroInitialGuess,
2372 std::string gammaType =
"3rd Order A-stable",
2373 Scalar gamma = Scalar(0.7886751345948128))
2375 typedef Teuchos::ScalarTraits<Scalar> ST;
2377 const Scalar one = ST::one();
2378 gammaDefault_ = as<Scalar>((3*one+ST::squareroot(3*one))/(6*one));
2385 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2386 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2391 TEUCHOS_TEST_FOR_EXCEPTION(
2392 !(gammaType ==
"3rd Order A-stable" or
2393 gammaType ==
"2nd Order L-stable" or
2394 gammaType ==
"gamma"), std::logic_error,
2395 "gammaType needs to be '3rd Order A-stable', '2nd Order L-stable' "
2418 std::ostringstream Description;
2420 <<
"Solving Ordinary Differential Equations I:\n"
2421 <<
"Nonstiff Problems, 2nd Revised Edition\n"
2422 <<
"E. Hairer, S. P. Norsett, and G. Wanner\n"
2423 <<
"Table 7.2, pg 207\n"
2424 <<
"gamma = (3+sqrt(3))/6 -> 3rd order and A-stable\n"
2425 <<
"gamma = (2-sqrt(2))/2 -> 2nd order and L-stable\n"
2426 <<
"c = [ gamma 1-gamma ]'\n"
2427 <<
"A = [ gamma 0 ]\n"
2428 <<
" [ 1-2*gamma gamma ]\n"
2429 <<
"b = [ 1/2 1/2 ]'";
2430 return Description.str();
2433 Teuchos::RCP<const Teuchos::ParameterList>
2436 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
2439 pl->set<
bool>(
"Initial Condition Consistency Check",
false);
2441 "Valid values are '3rd Order A-stable' ((3+sqrt(3))/6.), "
2442 "'2nd Order L-stable' ((2-sqrt(2))/2) and 'gamma' (user defined). "
2443 "The default value is '3rd Order A-stable'.");
2445 "Equal to (3+sqrt(3))/6 if 'Gamma Type' = '3rd Order A-stable', or "
2446 "(2-sqrt(2))/2 if 'Gamma Type' = '2nd Order L-stable', or "
2447 "user-defined gamma value if 'Gamma Type = 'gamma'. "
2448 "The default value is gamma = (3+sqrt(3))/6, which matches "
2449 "the default 'Gamma Type' = '3rd Order A-stable'.");
2458 typedef Teuchos::ScalarTraits<Scalar> ST;
2461 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
2462 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
2463 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
2464 const Scalar one = ST::one();
2465 const Scalar zero = ST::zero();
2471 }
else if (
gammaType_ ==
"2nd Order L-stable") {
2473 gamma_ = as<Scalar>( (2*one - ST::squareroot(2*one))/(2*one) );
2479 A(0,0) =
gamma_; A(0,1) = zero;
2483 b(0) = as<Scalar>( one/(2*one) ); b(1) = as<Scalar>( one/(2*one) );
2519 template<
class Scalar>
2536 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
2538 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2540 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2542 std::string ICConsistency,
2543 bool ICConsistencyCheck,
2545 bool zeroInitialGuess)
2549 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
2550 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
2554 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2555 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2557 std::string ICConsistency,
2558 bool ICConsistencyCheck,
2560 bool zeroInitialGuess,
2565 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2566 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2571 std::ostringstream Description;
2573 <<
"Hammer & Hollingsworth method\n"
2574 <<
"Solving Ordinary Differential Equations I:\n"
2575 <<
"Nonstiff Problems, 2nd Revised Edition\n"
2576 <<
"E. Hairer, S. P. Norsett, and G. Wanner\n"
2577 <<
"Table 7.1, pg 205\n"
2578 <<
"c = [ 0 2/3 ]'\n"
2581 <<
"b = [ 1/4 3/4 ]'";
2582 return Description.str();
2587 Teuchos::RCP<const Teuchos::ParameterList>
2590 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
2592 pl->set<
bool>(
"Initial Condition Consistency Check",
2601 typedef Teuchos::ScalarTraits<Scalar> ST;
2604 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
2605 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
2606 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
2607 const Scalar one = ST::one();
2608 const Scalar zero = ST::zero();
2611 A(0,0) = zero; A(0,1) = zero;
2612 A(1,0) = as<Scalar>( one/(3*one) ); A(1,1) = as<Scalar>( one/(3*one) );
2615 b(0) = as<Scalar>( one/(4*one) ); b(1) = as<Scalar>( 3*one/(4*one) );
2618 c(0) = zero; c(1) = as<Scalar>( 2*one/(3*one) );
2653 template<
class Scalar>
2665 typedef Teuchos::ScalarTraits<Scalar> ST;
2674 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
2676 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2678 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2680 std::string ICConsistency,
2681 bool ICConsistencyCheck,
2683 bool zeroInitialGuess,
2684 Scalar theta = Scalar(0.5))
2686 typedef Teuchos::ScalarTraits<Scalar> ST;
2692 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
2693 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
2697 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2698 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2700 std::string ICConsistency,
2701 bool ICConsistencyCheck,
2703 bool zeroInitialGuess,
2705 Scalar theta = Scalar(0.5))
2707 typedef Teuchos::ScalarTraits<Scalar> ST;
2713 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2714 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2719 TEUCHOS_TEST_FOR_EXCEPTION(
2720 theta == Teuchos::ScalarTraits<Scalar>::zero(), std::logic_error,
2721 "'theta' can not be zero, as it makes this stepper explicit. \n"
2722 "Try using the 'RK Forward Euler' stepper.\n");
2732 std::ostringstream Description;
2734 <<
"Non-standard finite-difference methods\n"
2735 <<
"in dynamical systems, P. Kama,\n"
2736 <<
"Dissertation, University of Pretoria, pg. 49.\n"
2737 <<
"Comment: Generalized Implicit Midpoint Method\n"
2738 <<
"c = [ theta ]'\n"
2739 <<
"A = [ theta ]\n"
2741 return Description.str();
2746 Teuchos::RCP<const Teuchos::ParameterList>
2749 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
2752 pl->set<
bool>(
"Initial Condition Consistency Check",
2755 "Valid values are 0 <= theta <= 1, where theta = 0 "
2756 "implies Forward Euler, theta = 1/2 implies implicit midpoint "
2757 "method (default), and theta = 1 implies Backward Euler. "
2758 "For theta != 1/2, this method is first-order accurate, "
2759 "and with theta = 1/2, it is second-order accurate. "
2760 "This method is A-stable, but becomes L-stable with theta=1.");
2769 typedef Teuchos::ScalarTraits<Scalar> ST;
2771 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
2772 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
2773 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
2816 template<
class Scalar>
2828 typedef Teuchos::ScalarTraits<Scalar> ST;
2837 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
2839 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2841 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2843 std::string ICConsistency,
2844 bool ICConsistencyCheck,
2846 bool zeroInitialGuess,
2847 Scalar theta = Scalar(0.5))
2849 typedef Teuchos::ScalarTraits<Scalar> ST;
2855 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
2856 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
2860 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
2861 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
2863 std::string ICConsistency,
2864 bool ICConsistencyCheck,
2866 bool zeroInitialGuess,
2868 Scalar theta = Scalar(0.5))
2870 typedef Teuchos::ScalarTraits<Scalar> ST;
2876 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
2877 useEmbedded, zeroInitialGuess, stepperRKAppAction);
2882 TEUCHOS_TEST_FOR_EXCEPTION(
2883 theta == Teuchos::ScalarTraits<Scalar>::zero(), std::logic_error,
2884 "'theta' can not be zero, as it makes this stepper explicit. \n"
2885 "Try using the 'RK Forward Euler' stepper.\n");
2895 std::ostringstream Description;
2897 <<
"Computer Methods for ODEs and DAEs\n"
2898 <<
"U. M. Ascher and L. R. Petzold\n"
2902 <<
" [ 1-theta theta ]\n"
2903 <<
"b = [ 1-theta theta ]'";
2904 return Description.str();
2909 Teuchos::RCP<const Teuchos::ParameterList>
2912 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
2915 pl->set<
bool>(
"Initial Condition Consistency Check",
false);
2917 "Valid values are 0 < theta <= 1, where theta = 0 "
2918 "implies Forward Euler, theta = 1/2 implies trapezoidal "
2919 "method (default), and theta = 1 implies Backward Euler. "
2920 "For theta != 1/2, this method is first-order accurate, "
2921 "and with theta = 1/2, it is second-order accurate. "
2922 "This method is A-stable, but becomes L-stable with theta=1.");
2931 typedef Teuchos::ScalarTraits<Scalar> ST;
2932 const Scalar one = ST::one();
2933 const Scalar zero = ST::zero();
2936 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
2937 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
2938 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
2941 A(0,0) = zero; A(0,1) = zero;
2942 A(1,0) = Teuchos::as<Scalar>( one -
theta_ ); A(1,1) =
theta_;
2945 b(0) = Teuchos::as<Scalar>( one -
theta_ );
2984 template<
class Scalar>
3001 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
3003 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3005 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3007 std::string ICConsistency,
3008 bool ICConsistencyCheck,
3010 bool zeroInitialGuess)
3014 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
3015 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
3019 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3020 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3022 std::string ICConsistency,
3023 bool ICConsistencyCheck,
3025 bool zeroInitialGuess,
3030 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3031 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3036 std::ostringstream Description;
3038 <<
"Also known as Crank-Nicolson Method.\n"
3042 <<
"b = [ 1/2 1/2 ]'";
3043 return Description.str();
3048 Teuchos::RCP<const Teuchos::ParameterList>
3051 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
3053 pl->set<
bool>(
"Initial Condition Consistency Check",
3062 typedef Teuchos::ScalarTraits<Scalar> ST;
3063 const Scalar one = ST::one();
3064 const Scalar zero = ST::zero();
3065 const Scalar onehalf = ST::one()/(2*ST::one());
3068 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
3069 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
3070 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
3073 A(0,0) = zero; A(0,1) = zero;
3074 A(1,0) = onehalf; A(1,1) = onehalf;
3117 template<
class Scalar>
3134 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
3136 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3138 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3140 std::string ICConsistency,
3141 bool ICConsistencyCheck,
3143 bool zeroInitialGuess)
3147 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
3148 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
3152 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3153 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3155 std::string ICConsistency,
3156 bool ICConsistencyCheck,
3158 bool zeroInitialGuess,
3163 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3164 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3169 std::ostringstream Description;
3172 <<
"Solving Ordinary Differential Equations II:\n"
3173 <<
"Stiff and Differential-Algebraic Problems,\n"
3174 <<
"2nd Revised Edition\n"
3175 <<
"E. Hairer and G. Wanner\n"
3176 <<
"Table 5.2, pg 72\n"
3177 <<
"Solving Ordinary Differential Equations I:\n"
3178 <<
"Nonstiff Problems, 2nd Revised Edition\n"
3179 <<
"E. Hairer, S. P. Norsett, and G. Wanner\n"
3180 <<
"Table 7.1, pg 205\n"
3184 return Description.str();
3189 Teuchos::RCP<const Teuchos::ParameterList>
3192 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
3194 pl->set<
bool>(
"Initial Condition Consistency Check",
3203 typedef Teuchos::ScalarTraits<Scalar> ST;
3205 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
3206 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
3207 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
3208 const Scalar onehalf = ST::one()/(2*ST::one());
3209 const Scalar one = ST::one();
3247 template<
class Scalar>
3259 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
3261 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3263 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3265 std::string ICConsistency,
3266 bool ICConsistencyCheck,
3268 bool zeroInitialGuess)
3272 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
3273 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
3277 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3278 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3280 std::string ICConsistency,
3281 bool ICConsistencyCheck,
3283 bool zeroInitialGuess,
3288 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3289 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3294 std::ostringstream Description;
3296 <<
"Strong Stability Preserving Diagonally-Implicit RK (stage=2, order=2)\n"
3298 <<
"c = [ 1/4 3/4 ]'\n"
3301 <<
"b = [ 1/2 1/2 ]\n" << std::endl;
3302 return Description.str();
3307 Teuchos::RCP<const Teuchos::ParameterList>
3310 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
3312 pl->set<
bool>(
"Initial Condition Consistency Check",
3321 typedef Teuchos::ScalarTraits<Scalar> ST;
3323 const int NumStages = 2;
3324 const int order = 2;
3325 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
3326 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
3327 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
3329 const Scalar one = ST::one();
3330 const Scalar zero = ST::zero();
3331 const Scalar onehalf = one/(2*one);
3332 const Scalar onefourth = one/(4*one);
3335 A(0,0) = A(1,1) = onefourth;
3340 b(0) = b(1) = onehalf;
3344 c(1) = A(1,0) + A(1,1);
3372 template<
class Scalar>
3384 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
3386 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3388 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3390 std::string ICConsistency,
3391 bool ICConsistencyCheck,
3393 bool zeroInitialGuess)
3397 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
3398 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
3402 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3403 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3405 std::string ICConsistency,
3406 bool ICConsistencyCheck,
3408 bool zeroInitialGuess,
3413 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3414 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3419 std::ostringstream Description;
3421 <<
"Strong Stability Preserving Diagonally-Implicit RK (stage=3, order=2)\n"
3423 <<
"c = [ 1/6 1/2 5/6 ]'\n"
3426 <<
" [ 1/3 1/3 1/6 ]\n"
3427 <<
"b = [ 1/3 1/3 1/3 ]\n" << std::endl;
3428 return Description.str();
3433 Teuchos::RCP<const Teuchos::ParameterList>
3436 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
3438 pl->set<
bool>(
"Initial Condition Consistency Check",
3448 typedef Teuchos::ScalarTraits<Scalar> ST;
3450 const int NumStages = 3;
3451 const int order = 2;
3452 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
3453 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
3454 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
3456 const Scalar one = ST::one();
3457 const Scalar zero = ST::zero();
3458 const Scalar onethird = one/(3*one);
3459 const Scalar onesixth = one/(6*one);
3462 A(0,0) = A(1,1) = A(2,2) = onesixth;
3463 A(1,0) = A(2,0) = A(2,1) = onethird;
3464 A(0,1) = A(0,2) = A(1,2) = zero;
3467 b(0) = b(1) = b(2) = onethird;
3471 c(1) = A(1,0) + A(1,1);
3472 c(2) = A(2,0) + A(2,1) + A(2,2);
3499 template<
class Scalar>
3511 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
3513 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3515 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3517 std::string ICConsistency,
3518 bool ICConsistencyCheck,
3520 bool zeroInitialGuess)
3524 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
3525 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
3529 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3530 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3532 std::string ICConsistency,
3533 bool ICConsistencyCheck,
3535 bool zeroInitialGuess,
3540 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3541 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3546 std::ostringstream Description;
3548 <<
"Strong Stability Preserving Diagonally-Implicit RK (stage=2, order=3)\n"
3549 <<
"SSP-Coef = 1 + sqrt( 3 )\n"
3550 <<
"c = [ 1/(3 + sqrt( 3 )) (1/6)(3 + sqrt( 3 )) ] '\n"
3551 <<
"A = [ 1/(3 + sqrt( 3 )) ] \n"
3552 <<
" [ 1/sqrt( 3 ) 1/(3 + sqrt( 3 )) ] \n"
3553 <<
"b = [ 1/2 1/2 ] \n" << std::endl;
3554 return Description.str();
3559 Teuchos::RCP<const Teuchos::ParameterList>
3562 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
3564 pl->set<
bool>(
"Initial Condition Consistency Check",
3574 typedef Teuchos::ScalarTraits<Scalar> ST;
3576 const int NumStages = 2;
3577 const int order = 3;
3578 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
3579 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
3580 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
3582 const Scalar one = ST::one();
3583 const Scalar zero = ST::zero();
3584 const Scalar onehalf = one/(2*one);
3585 const Scalar rootthree = ST::squareroot(3*one);
3588 A(0,0) = A(1,1) = one/(3*one + rootthree);
3589 A(1,0) = one/rootthree;
3593 b(0) = b(1) = onehalf;
3597 c(1) = A(1,0) + A(1,1);
3625 template<
class Scalar>
3637 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
3639 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3641 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3643 std::string ICConsistency,
3644 bool ICConsistencyCheck,
3646 bool zeroInitialGuess)
3650 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
3651 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
3655 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3656 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3658 std::string ICConsistency,
3659 bool ICConsistencyCheck,
3661 bool zeroInitialGuess,
3666 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3667 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3672 std::ostringstream Description;
3674 <<
"Strong Stability Preserving Diagonally-Implicit RK (stage=3, order=3)\n"
3675 <<
"SSP-Coef = 2 + 2 sqrt(2)\n"
3676 <<
"c = [ 1/( 4 + 2 sqrt(2) 1/2 (1/4)(2 + sqrt(2) ] '\n"
3677 <<
"A = [ 1/( 4 + 2 sqrt(2) ] \n"
3678 <<
" [ 1/(2 sqrt(2) 1/( 4 + 2 sqrt(2) ] \n"
3679 <<
" [ 1/(2 sqrt(2) 1/(2 sqrt(2) 1/( 4 + 2 sqrt(2) ] \n"
3680 <<
"b = [ 1/3 1/3 1/3 ] \n"
3682 return Description.str();
3687 Teuchos::RCP<const Teuchos::ParameterList>
3690 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
3692 pl->set<
bool>(
"Initial Condition Consistency Check",
3702 typedef Teuchos::ScalarTraits<Scalar> ST;
3704 const int NumStages = 3;
3705 const int order = 3;
3706 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
3707 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
3708 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
3710 const Scalar one = ST::one();
3711 const Scalar zero = ST::zero();
3712 const Scalar onethird = one/(3*one);
3713 const Scalar rootwo = ST::squareroot(2*one);
3716 A(0,0) = A(1,1) = A(2,2) = one / (4*one + 2*rootwo);
3717 A(1,0) = A(2,0) = A(2,1) = one / (2*rootwo);
3718 A(0,1) = A(0,2) = A(1,2) = zero;
3721 b(0) = b(1) = b(2) = onethird;
3725 c(1) = A(1,0) + A(1,1);
3726 c(2) = A(2,0) + A(2,1) + A(2,2);
3753 template<
class Scalar>
3770 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
3772 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3774 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3776 std::string ICConsistency,
3777 bool ICConsistencyCheck,
3779 bool zeroInitialGuess)
3783 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
3784 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
3788 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3789 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3791 std::string ICConsistency,
3792 bool ICConsistencyCheck,
3794 bool zeroInitialGuess,
3799 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3800 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3805 std::ostringstream Description;
3808 <<
"Solving Ordinary Differential Equations II:\n"
3809 <<
"Stiff and Differential-Algebraic Problems,\n"
3810 <<
"2nd Revised Edition\n"
3811 <<
"E. Hairer and G. Wanner\n"
3812 <<
"Table 5.3, pg 73\n"
3816 return Description.str();
3821 Teuchos::RCP<const Teuchos::ParameterList>
3824 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
3826 pl->set<
bool>(
"Initial Condition Consistency Check",
3835 typedef Teuchos::ScalarTraits<Scalar> ST;
3837 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
3838 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
3839 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
3840 const Scalar one = ST::one();
3841 const Scalar zero = ST::zero();
3847 auto emptyBStar = Teuchos::SerialDenseVector<int,Scalar>();
3849 this->
getStepperType(),A,b,c,order,order,order,emptyBStar,
false));
3875 template<
class Scalar>
3887 this->
setStepperType(
"RK Implicit 2 Stage 2nd order Lobatto IIIB");
3892 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
3894 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3896 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3898 std::string ICConsistency,
3899 bool ICConsistencyCheck,
3901 bool zeroInitialGuess)
3903 this->
setStepperType(
"RK Implicit 2 Stage 2nd order Lobatto IIIB");
3905 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
3906 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
3910 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
3911 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
3913 std::string ICConsistency,
3914 bool ICConsistencyCheck,
3916 bool zeroInitialGuess,
3919 this->
setStepperType(
"RK Implicit 2 Stage 2nd order Lobatto IIIB");
3921 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
3922 useEmbedded, zeroInitialGuess, stepperRKAppAction);
3927 std::ostringstream Description;
3930 <<
"Solving Ordinary Differential Equations II:\n"
3931 <<
"Stiff and Differential-Algebraic Problems,\n"
3932 <<
"2nd Revised Edition\n"
3933 <<
"E. Hairer and G. Wanner\n"
3934 <<
"Table 5.9, pg 76\n"
3936 <<
"A = [ 1/2 0 ]\n"
3938 <<
"b = [ 1/2 1/2 ]'";
3939 return Description.str();
3944 Teuchos::RCP<const Teuchos::ParameterList>
3947 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
3949 pl->set<
bool>(
"Initial Condition Consistency Check",
3958 typedef Teuchos::ScalarTraits<Scalar> ST;
3961 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
3962 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
3963 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
3964 const Scalar zero = ST::zero();
3965 const Scalar one = ST::one();
3968 A(0,0) = as<Scalar>( one/(2*one) );
3970 A(1,0) = as<Scalar>( one/(2*one) );
3974 b(0) = as<Scalar>( one/(2*one) );
3975 b(1) = as<Scalar>( one/(2*one) );
3982 auto emptyBStar = Teuchos::SerialDenseVector<int,Scalar>();
3984 this->
getStepperType(),A,b,c,order,order,order,emptyBStar,
false));
4014 template<
class Scalar>
4031 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
4033 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4035 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4037 std::string ICConsistency,
4038 bool ICConsistencyCheck,
4040 bool zeroInitialGuess)
4044 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
4045 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
4049 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4050 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4052 std::string ICConsistency,
4053 bool ICConsistencyCheck,
4055 bool zeroInitialGuess,
4060 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4061 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4066 std::ostringstream Description;
4069 <<
"Solving Ordinary Differential Equations II:\n"
4070 <<
"Stiff and Differential-Algebraic Problems,\n"
4071 <<
"2nd Revised Edition\n"
4072 <<
"E. Hairer and G. Wanner\n"
4074 <<
"c = [ 1/4 3/4 11/20 1/2 1 ]'\n"
4077 <<
" [ 17/50 -1/25 1/4 ]\n"
4078 <<
" [ 371/1360 -137/2720 15/544 1/4 ]\n"
4079 <<
" [ 25/24 -49/48 125/16 -85/12 1/4 ]\n"
4080 <<
"b = [ 25/24 -49/48 125/16 -85/12 1/4 ]'";
4082 return Description.str();
4087 Teuchos::RCP<const Teuchos::ParameterList>
4090 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
4092 pl->set<
bool>(
"Initial Condition Consistency Check",
4101 typedef Teuchos::ScalarTraits<Scalar> ST;
4104 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
4105 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
4106 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
4107 const Scalar zero = ST::zero();
4108 const Scalar one = ST::one();
4109 const Scalar onequarter = as<Scalar>( one/(4*one) );
4112 A(0,0) = onequarter;
4118 A(1,0) = as<Scalar>( one / (2*one) );
4119 A(1,1) = onequarter;
4124 A(2,0) = as<Scalar>( 17*one/(50*one) );
4125 A(2,1) = as<Scalar>( -one/(25*one) );
4126 A(2,2) = onequarter;
4130 A(3,0) = as<Scalar>( 371*one/(1360*one) );
4131 A(3,1) = as<Scalar>( -137*one/(2720*one) );
4132 A(3,2) = as<Scalar>( 15*one/(544*one) );
4133 A(3,3) = onequarter;
4136 A(4,0) = as<Scalar>( 25*one/(24*one) );
4137 A(4,1) = as<Scalar>( -49*one/(48*one) );
4138 A(4,2) = as<Scalar>( 125*one/(16*one) );
4139 A(4,3) = as<Scalar>( -85*one/(12*one) );
4140 A(4,4) = onequarter;
4143 b(0) = as<Scalar>( 25*one/(24*one) );
4144 b(1) = as<Scalar>( -49*one/(48*one) );
4145 b(2) = as<Scalar>( 125*one/(16*one) );
4146 b(3) = as<Scalar>( -85*one/(12*one) );
4160 c(1) = as<Scalar>( 3*one/(4*one) );
4161 c(2) = as<Scalar>( 11*one/(20*one) );
4162 c(3) = as<Scalar>( one/(2*one) );
4196 template<
class Scalar>
4213 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
4215 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4217 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4219 std::string ICConsistency,
4220 bool ICConsistencyCheck,
4222 bool zeroInitialGuess)
4226 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
4227 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
4231 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4232 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4234 std::string ICConsistency,
4235 bool ICConsistencyCheck,
4237 bool zeroInitialGuess,
4242 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4243 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4248 std::ostringstream Description;
4251 <<
"Solving Ordinary Differential Equations II:\n"
4252 <<
"Stiff and Differential-Algebraic Problems,\n"
4253 <<
"2nd Revised Edition\n"
4254 <<
"E. Hairer and G. Wanner\n"
4256 <<
"gamma = (1/sqrt(3))*cos(pi/18)+1/2\n"
4257 <<
"delta = 1/(6*(2*gamma-1)^2)\n"
4258 <<
"c = [ gamma 1/2 1-gamma ]'\n"
4259 <<
"A = [ gamma ]\n"
4260 <<
" [ 1/2-gamma gamma ]\n"
4261 <<
" [ 2*gamma 1-4*gamma gamma ]\n"
4262 <<
"b = [ delta 1-2*delta delta ]'";
4263 return Description.str();
4268 Teuchos::RCP<const Teuchos::ParameterList>
4271 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
4273 pl->set<
bool>(
"Initial Condition Consistency Check",
4282 typedef Teuchos::ScalarTraits<Scalar> ST;
4285 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
4286 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
4287 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
4288 const Scalar zero = ST::zero();
4289 const Scalar one = ST::one();
4290 const Scalar pi = as<Scalar>(4*one)*std::atan(one);
4291 const Scalar gamma = as<Scalar>( one/ST::squareroot(3*one)*std::cos(pi/(18*one))+one/(2*one) );
4292 const Scalar delta = as<Scalar>( one/(6*one*std::pow(2*gamma-one,2*one)) );
4299 A(1,0) = as<Scalar>( one/(2*one) - gamma );
4303 A(2,0) = as<Scalar>( 2*gamma );
4304 A(2,1) = as<Scalar>( one - 4*gamma );
4309 b(1) = as<Scalar>( one-2*delta );
4314 c(1) = as<Scalar>( one/(2*one) );
4315 c(2) = as<Scalar>( one - gamma );
4349 template<
class Scalar>
4366 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
4368 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4370 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4372 std::string ICConsistency,
4373 bool ICConsistencyCheck,
4375 bool zeroInitialGuess)
4379 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
4380 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
4384 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4385 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4387 std::string ICConsistency,
4388 bool ICConsistencyCheck,
4390 bool zeroInitialGuess,
4395 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4396 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4401 std::ostringstream Description;
4403 <<
"Solving Ordinary Differential Equations II:\n"
4404 <<
"Stiff and Differential-Algebraic Problems,\n"
4405 <<
"2nd Revised Edition\n"
4406 <<
"E. Hairer and G. Wanner\n"
4408 <<
"c = [ (6-sqrt(6))/10 ]\n"
4409 <<
" [ (6+9*sqrt(6))/35 ]\n"
4411 <<
" [ (4-sqrt(6))/10 ]\n"
4412 <<
" [ (4+sqrt(6))/10 ]\n"
4413 <<
"A = [ A1 A2 A3 A4 A5 ]\n"
4414 <<
" A1 = [ (6-sqrt(6))/10 ]\n"
4415 <<
" [ (-6+5*sqrt(6))/14 ]\n"
4416 <<
" [ (888+607*sqrt(6))/2850 ]\n"
4417 <<
" [ (3153-3082*sqrt(6))/14250 ]\n"
4418 <<
" [ (-32583+14638*sqrt(6))/71250 ]\n"
4420 <<
" [ (6-sqrt(6))/10 ]\n"
4421 <<
" [ (126-161*sqrt(6))/1425 ]\n"
4422 <<
" [ (3213+1148*sqrt(6))/28500 ]\n"
4423 <<
" [ (-17199+364*sqrt(6))/142500 ]\n"
4426 <<
" [ (6-sqrt(6))/10 ]\n"
4427 <<
" [ (-267+88*sqrt(6))/500 ]\n"
4428 <<
" [ (1329-544*sqrt(6))/2500 ]\n"
4432 <<
" [ (6-sqrt(6))/10 ]\n"
4433 <<
" [ (-96+131*sqrt(6))/625 ]\n"
4438 <<
" [ (6-sqrt(6))/10 ]\n"
4442 <<
" [ (16-sqrt(6))/36 ]\n"
4443 <<
" [ (16+sqrt(6))/36 ]'";
4444 return Description.str();
4449 Teuchos::RCP<const Teuchos::ParameterList>
4452 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
4454 pl->set<
bool>(
"Initial Condition Consistency Check",
4463 typedef Teuchos::ScalarTraits<Scalar> ST;
4466 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
4467 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
4468 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
4469 const Scalar zero = ST::zero();
4470 const Scalar one = ST::one();
4471 const Scalar sqrt6 = ST::squareroot(as<Scalar>(6*one));
4472 const Scalar gamma = as<Scalar>( (6*one - sqrt6) / (10*one) );
4481 A(1,0) = as<Scalar>( (-6*one+5*one*sqrt6)/(14*one) );
4487 A(2,0) = as<Scalar>( (888*one+607*one*sqrt6)/(2850*one) );
4488 A(2,1) = as<Scalar>( (126*one-161*one*sqrt6)/(1425*one) );
4493 A(3,0) = as<Scalar>( (3153*one-3082*one*sqrt6)/(14250*one) );
4494 A(3,1) = as<Scalar>( (3213*one+1148*one*sqrt6)/(28500*one) );
4495 A(3,2) = as<Scalar>( (-267*one+88*one*sqrt6)/(500*one) );
4499 A(4,0) = as<Scalar>( (-32583*one+14638*one*sqrt6)/(71250*one) );
4500 A(4,1) = as<Scalar>( (-17199*one+364*one*sqrt6)/(142500*one) );
4501 A(4,2) = as<Scalar>( (1329*one-544*one*sqrt6)/(2500*one) );
4502 A(4,3) = as<Scalar>( (-96*one+131*sqrt6)/(625*one) );
4508 b(2) = as<Scalar>( one/(9*one) );
4509 b(3) = as<Scalar>( (16*one-sqrt6)/(36*one) );
4510 b(4) = as<Scalar>( (16*one+sqrt6)/(36*one) );
4514 c(1) = as<Scalar>( (6*one+9*one*sqrt6)/(35*one) );
4516 c(3) = as<Scalar>( (4*one-sqrt6)/(10*one) );
4517 c(4) = as<Scalar>( (4*one+sqrt6)/(10*one) );
4544 template<
class Scalar>
4561 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
4563 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4565 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4567 std::string ICConsistency,
4568 bool ICConsistencyCheck,
4570 bool zeroInitialGuess)
4574 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
4575 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
4579 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4580 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4582 std::string ICConsistency,
4583 bool ICConsistencyCheck,
4585 bool zeroInitialGuess,
4590 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4591 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4596 std::ostringstream Description;
4601 <<
"b = [ 1/2 1/2 ]'\n"
4602 <<
"bstar = [ 1 0 ]'";
4603 return Description.str();
4608 Teuchos::RCP<const Teuchos::ParameterList>
4611 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
4613 pl->set<
bool>(
"Initial Condition Consistency Check",
4622 typedef Teuchos::ScalarTraits<Scalar> ST;
4625 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
4626 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
4627 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
4628 Teuchos::SerialDenseVector<int,Scalar> bstar(NumStages);
4630 const Scalar one = ST::one();
4631 const Scalar zero = ST::zero();
4634 A(0,0) = one; A(0,1) = zero;
4635 A(1,0) = -one; A(1,1) = one;
4638 b(0) = as<Scalar>(one/(2*one));
4639 b(1) = as<Scalar>(one/(2*one));
4687 template<
class Scalar>
4704 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
4706 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4708 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4710 std::string ICConsistency,
4711 bool ICConsistencyCheck,
4713 bool zeroInitialGuess,
4714 const Teuchos::SerialDenseMatrix<int,Scalar>& A,
4715 const Teuchos::SerialDenseVector<int,Scalar>& b,
4716 const Teuchos::SerialDenseVector<int,Scalar>& c,
4720 const Teuchos::SerialDenseVector<int,Scalar>& bstar)
4723 this->
setTableau(A,b,c,order,orderMin,orderMax,bstar);
4725 TEUCHOS_TEST_FOR_EXCEPTION(
4726 this->
tableau_->isImplicit() !=
true, std::logic_error,
4727 "Error - General DIRK did not receive a DIRK Butcher Tableau!\n");
4729 this->
setup(appModel, obs, solver, useFSAL, ICConsistency,
4730 ICConsistencyCheck, useEmbedded, zeroInitialGuess);
4734 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
4735 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
4737 std::string ICConsistency,
4738 bool ICConsistencyCheck,
4740 bool zeroInitialGuess,
4742 const Teuchos::SerialDenseMatrix<int,Scalar>& A,
4743 const Teuchos::SerialDenseVector<int,Scalar>& b,
4744 const Teuchos::SerialDenseVector<int,Scalar>& c,
4748 const Teuchos::SerialDenseVector<int,Scalar>& bstar)
4751 this->
setTableau(A,b,c,order,orderMin,orderMax,bstar);
4753 TEUCHOS_TEST_FOR_EXCEPTION(
4754 this->
tableau_->isImplicit() !=
true, std::logic_error,
4755 "Error - General DIRK did not receive a DIRK Butcher Tableau!\n");
4757 this->
setup(appModel, solver, useFSAL, ICConsistency, ICConsistencyCheck,
4758 useEmbedded, zeroInitialGuess, stepperRKAppAction);
4763 std::stringstream Description;
4765 <<
"The format of the Butcher Tableau parameter list is\n"
4766 <<
" <Parameter name=\"A\" type=\"string\" value=\"# # # ;\n"
4769 <<
" <Parameter name=\"b\" type=\"string\" value=\"# # #\"/>\n"
4770 <<
" <Parameter name=\"c\" type=\"string\" value=\"# # #\"/>\n\n"
4771 <<
"Note the number of stages is implicit in the number of entries.\n"
4772 <<
"The number of stages must be consistent.\n"
4774 <<
"Default tableau is 'SDIRK 2 Stage 2nd order':\n"
4775 <<
" Computer Methods for ODEs and DAEs\n"
4776 <<
" U. M. Ascher and L. R. Petzold\n"
4778 <<
" gamma = (2-sqrt(2))/2\n"
4779 <<
" c = [ gamma 1 ]'\n"
4780 <<
" A = [ gamma 0 ]\n"
4781 <<
" [ 1-gamma gamma ]\n"
4782 <<
" b = [ 1-gamma gamma ]'";
4783 return Description.str();
4790 if (this->
tableau_ == Teuchos::null) {
4793 auto t = stepper->getTableau();
4796 t->A(),t->b(),t->c(),
4797 t->order(),t->orderMin(),t->orderMax(),
4804 const Teuchos::SerialDenseVector<int,Scalar>& b,
4805 const Teuchos::SerialDenseVector<int,Scalar>& c,
4809 const Teuchos::SerialDenseVector<int,Scalar>&
4810 bstar = Teuchos::SerialDenseVector<int,Scalar>())
4817 Teuchos::RCP<const Teuchos::ParameterList>
4820 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
4822 pl->set<
bool>(
"Initial Condition Consistency Check",
4826 Teuchos::RCP<Teuchos::ParameterList> tableauPL = Teuchos::parameterList();
4827 tableauPL->set<std::string>(
"A",
4828 "0.2928932188134524 0.0; 0.7071067811865476 0.2928932188134524");
4829 tableauPL->set<std::string>(
"b",
4830 "0.7071067811865476 0.2928932188134524");
4831 tableauPL->set<std::string>(
"c",
"0.2928932188134524 1.0");
4832 tableauPL->set<
int>(
"order", 2);
4833 tableauPL->set<std::string>(
"bstar",
"");
4834 pl->set(
"Tableau", *tableauPL);
4844 #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)
General Implicit Runge-Kutta Butcher Tableau.
StepperERK_3Stage3rdOrder()
Default constructor.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
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)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
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
StepperERK_Ralston()
Default constructor.
std::string getGammaType()
std::string getDescription() const
Explicit Runge-Kutta time stepper.
virtual void setupDefault()
Default setup for constructor.
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
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.
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)
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)
virtual bool getICConsistencyCheckDefault() const
StepperERK_Midpoint()
Default constructor.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::RCP< RKButcherTableau< Scalar > > tableau_
StepperSDIRK_2Stage2ndOrder()
Default constructor.
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)
virtual bool getICConsistencyCheckDefault() const
RK Explicit 5 Stage 3rd order by Kinnmark and Gray.
virtual void setup(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &wrapperModel, const Teuchos::RCP< StepperRKObserver< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
Setup for constructor.
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)
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)
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)
void getValidParametersBasicDIRK(Teuchos::RCP< Teuchos::ParameterList > pl) const
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
virtual bool getICConsistencyCheckDefault() const
StepperERK_Trapezoidal(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
virtual bool getICConsistencyCheckDefault() const
StepperDIRK_BackwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
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< const Teuchos::ParameterList > getValidParameters() const
StepperERK_BogackiShampine32()
Default constructor.
bool isInitialized_
True if stepper's member data is initialized.
std::string getDescription() const
StepperSDIRK_SSPDIRK33(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
std::string getDescription() const
StepperSDIRK_ImplicitMidpoint(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
StepperERK_Ralston(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
virtual void setup(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
Setup for constructor.
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)
void setGamma(Scalar gamma)
StepperSDIRK_SSPDIRK32(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
virtual bool getICConsistencyCheckDefault() const
StepperERK_ForwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
virtual bool getICConsistencyCheckDefault() const
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))
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.
StepperERK_4Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
void setTheta(Scalar theta)
StepperSDIRK_21Pair(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
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.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
StepperEDIRK_2Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
StepperERK_Merson45()
Default constructor.
std::string getDescription() const
StepperERK_SSPERK54(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
StepperERK_BogackiShampine32(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
StepperSDIRK_5Stage4thOrder()
Default constructor.
StepperDIRK_1Stage1stOrderRadauIA(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
Application Action for StepperRKBase.
StepperSDIRK_3Stage2ndOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
StepperEDIRK_2StageTheta(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, Scalar theta=Scalar(0.5))
StepperERK_3_8Rule(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
std::string getDescription() const
virtual void setupDefault()
Default setup for constructor.
Explicit RK Bogacki-Shampine Butcher Tableau.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
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.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
std::string getDescription() const
virtual bool getICConsistencyCheckDefault() const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
std::string getDescription() const
virtual bool getICConsistencyCheckDefault() 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
StepperERK_General(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, 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)
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)
StepperERK_Midpoint(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
std::string getDescription() const
virtual bool getICConsistencyCheckDefault() const
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
std::string getDescription() const
std::string getDescription() const
StepperERK_4Stage3rdOrderRunge(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
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)
void getValidParametersBasicERK(Teuchos::RCP< Teuchos::ParameterList > pl) const
StepperSDIRK_21Pair()
Default constructor.
std::string getDescription() const
StepperSDIRK_2Stage3rdOrder()
Default constructor.
std::string getDescription() const
virtual bool getICConsistencyCheckDefault() const
std::string getDescription() const
StepperDIRK_1Stage1stOrderRadauIA()
Default constructor.
StepperERK_3Stage3rdOrderHeun(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
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 Explicit 3 Stage 3rd order TVD.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
std::string getDescription() const
StepperEDIRK_2StageTheta()
Default constructor.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
StepperERK_3Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
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)
virtual bool getICConsistencyCheckDefault() const
std::string getDescription() const
std::string getDescription() const
StepperDIRK_General()
Default constructor.
StepperSDIRK_5Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
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)
virtual bool getICConsistencyCheckDefault() const
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)
StepperDIRK_BackwardEuler()
Default constructor.
virtual std::string getDescription() const
virtual bool getICConsistencyCheckDefault() const
void setGammaType(std::string gammaType)
StepperERK_3Stage3rdOrderHeun()
Default constructor.
Explicit RK Merson Butcher Tableau.
StepperERK_Merson45(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
std::string getDescription() const
Runge-Kutta 4th order Butcher Tableau.
This observer is a composite observer,.
virtual bool getICConsistencyCheckDefault() const
StepperSDIRK_SSPDIRK22(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
virtual bool getICConsistencyCheckDefault() const
std::string getDescription() const
StepperSDIRK_3Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
StepperEDIRK_TrapezoidalRule(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
RK Explicit 3 Stage 3rd order.
virtual bool getICConsistencyCheckDefault() const
StepperERK_4Stage4thOrder()
Default constructor.
void setGamma(Scalar gamma)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
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.
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< const Teuchos::ParameterList > getValidParameters() const
StepperDIRK_2Stage2ndOrderLobattoIIIB()
Default constructor.
virtual bool getICConsistencyCheckDefault() const
StepperERK_5Stage3rdOrderKandG(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
StepperSDIRK_SSPDIRK23(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
std::string getDescription() const
StepperSDIRK_2Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, std::string gammaType="3rd Order A-stable", Scalar gamma=Scalar(0.7886751345948128))
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))
virtual bool getICConsistencyCheckDefault() const
StepperERK_ForwardEuler()
Default constructor.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
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)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
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
StepperDIRK_2Stage2ndOrderLobattoIIIB(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
std::string getDescription() const
StepperSDIRK_5Stage5thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess)
StepperERK_3Stage3rdOrderTVD(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded)
void setStepperType(std::string s)
virtual bool getICConsistencyCheckDefault() const
StepperEDIRK_TrapezoidalRule()
Default constructor.
RK Explicit 3 Stage 3rd order by Heun.
StepperDIRK_General(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, 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)
StepperSDIRK_2Stage2ndOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, Scalar gamma=Scalar(0.2928932188134524))
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
StepperDIRK_1StageTheta(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperRKObserverComposite< Scalar > > &obs, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, Scalar theta=Scalar(0.5))
Strong Stability Preserving Diagonally-Implicit RK Butcher Tableau.
StepperERK_4Stage3rdOrderRunge()
Default constructor.
std::string getDescription() const