166 stepper->setModel(model);
167 stepper->initialize();
168 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
177 bool useFSAL = stepper->getUseFSAL();
178 std::string ICConsistency = stepper->getICConsistency();
179 bool ICConsistencyCheck = stepper->getICConsistencyCheck();
180 bool useEmbedded = stepper->getUseEmbedded();
181 bool zeroInitialGuess = stepper->getZeroInitialGuess();
184 stepper->setAppAction(modifierX);
185 stepper->initialize();
186 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
187 stepper->setAppAction(observer);
188 stepper->initialize();
189 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
190 stepper->setSolver(solver);
191 stepper->initialize();
192 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
193 stepper->setUseFSAL(useFSAL);
194 stepper->initialize();
195 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
196 stepper->setICConsistency(ICConsistency);
197 stepper->initialize();
198 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
199 stepper->setICConsistencyCheck(ICConsistencyCheck);
200 stepper->initialize();
201 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
202 stepper->setUseEmbedded(useEmbedded);
203 stepper->initialize();
204 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
205 stepper->setZeroInitialGuess(zeroInitialGuess);
206 stepper->initialize();
207 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
209 std::string stepperType = stepper->getStepperType();
211 if (stepperType ==
"RK Backward Euler") {
213 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
214 zeroInitialGuess, modifier));
215 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
217 else if (stepperType ==
"SDIRK 2 Stage 2nd order") {
218 double gamma = 0.2928932188134524;
220 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
221 zeroInitialGuess, modifier, gamma));
222 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
224 else if (stepperType ==
"SDIRK 3 Stage 2nd order") {
226 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
227 zeroInitialGuess, modifier));
228 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
230 else if (stepperType ==
"SDIRK 2 Stage 3rd order") {
231 std::string gammaType =
"3rd Order A-stable";
232 double gamma = 0.7886751345948128;
234 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
235 zeroInitialGuess, modifier, gammaType, gamma));
236 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
238 else if (stepperType ==
"EDIRK 2 Stage 3rd order") {
240 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
241 zeroInitialGuess, modifier));
242 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
244 else if (stepperType ==
"DIRK 1 Stage Theta Method") {
247 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
248 zeroInitialGuess, modifier, theta));
249 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
251 else if (stepperType ==
"EDIRK 2 Stage Theta Method") {
254 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
255 zeroInitialGuess, modifier, theta));
256 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
259 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
261 else if (stepperType ==
"RK Trapezoidal Rule") {
263 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
264 zeroInitialGuess, modifier));
265 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
267 else if (stepperType ==
"RK Implicit Midpoint") {
269 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
270 zeroInitialGuess, modifier));
271 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
273 else if (stepperType ==
"SSPDIRK22") {
275 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
276 zeroInitialGuess, modifier));
277 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
279 else if (stepperType ==
"SSPDIRK32") {
281 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
282 zeroInitialGuess, modifier));
283 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
285 else if (stepperType ==
"SSPDIRK23") {
287 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
288 zeroInitialGuess, modifier));
289 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
291 else if (stepperType ==
"SSPDIRK33") {
293 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
294 zeroInitialGuess, modifier));
295 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
297 else if (stepperType ==
"RK Implicit 1 Stage 1st order Radau IA") {
299 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
300 zeroInitialGuess, modifier));
301 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
303 else if (stepperType ==
"RK Implicit 2 Stage 2nd order Lobatto IIIB") {
305 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
306 zeroInitialGuess, modifier));
307 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
309 else if (stepperType ==
"SDIRK 5 Stage 4th order") {
311 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
312 zeroInitialGuess, modifier));
313 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
315 else if (stepperType ==
"SDIRK 3 Stage 4th order") {
317 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
318 zeroInitialGuess, modifier));
319 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
321 else if (stepperType ==
"SDIRK 5 Stage 5th order") {
323 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
324 zeroInitialGuess, modifier));
325 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
327 else if (stepperType ==
"SDIRK 2(1) Pair") {
329 model, solver, useFSAL, ICConsistency, ICConsistencyCheck, useEmbedded,
330 zeroInitialGuess, modifier));
331 TEUCHOS_TEST_FOR_EXCEPT(!s->isInitialized());
334 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
335 "Error - unknown stepperType = " + stepperType);
599 Teuchos::FancyOStream& out,
bool& success)
601 auto testNameOrig = stepper->getStepperType();
605 stepper->setModel(model);
607 stepper->setAppAction(modifier);
608 stepper->initialize();
609 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
610 auto testName = testNameOrig +
" - Modifier";
616 stepper->setInitialConditions(solutionHistory);
617 solutionHistory->initWorkingState();
619 solutionHistory->getWorkingState()->setTimeStep(dt);
620 stepper->takeStep(solutionHistory);
623 TEST_COMPARE(modifier->testBEGIN_STEP, ==,
true);
624 TEST_COMPARE(modifier->testBEGIN_STAGE, ==,
true);
625 TEST_COMPARE(modifier->testBEFORE_SOLVE, ==,
true);
626 TEST_COMPARE(modifier->testAFTER_SOLVE, ==,
true);
627 TEST_COMPARE(modifier->testBEFORE_EXPLICIT_EVAL, ==,
true);
628 TEST_COMPARE(modifier->testEND_STAGE, ==,
true);
629 TEST_COMPARE(modifier->testEND_STEP, ==,
true);
632 auto x = solutionHistory->getCurrentState()->getX();
633 TEST_FLOATING_EQUALITY(modifier->testCurrentValue, get_ele(*(x), 0),
635 x = solutionHistory->getWorkingState()->getX();
636 TEST_FLOATING_EQUALITY(modifier->testWorkingValue, get_ele(*(x), 0),
638 auto Dt = solutionHistory->getWorkingState()->getTimeStep();
639 TEST_FLOATING_EQUALITY(modifier->testDt, Dt / 10.0, 1.0e-14);
641 TEST_COMPARE(modifier->testName, ==, testName);
646 stepper->setModel(model);
648 stepper->setAppAction(observer);
649 stepper->setStepperName(testNameOrig);
650 stepper->initialize();
651 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
657 stepper->setInitialConditions(solutionHistory);
658 solutionHistory->initWorkingState();
660 solutionHistory->getWorkingState()->setTimeStep(dt);
661 stepper->takeStep(solutionHistory);
664 TEST_COMPARE(observer->testBEGIN_STEP, ==,
true);
665 TEST_COMPARE(observer->testBEGIN_STAGE, ==,
true);
666 TEST_COMPARE(observer->testBEFORE_SOLVE, ==,
true);
667 TEST_COMPARE(observer->testAFTER_SOLVE, ==,
true);
668 TEST_COMPARE(observer->testBEFORE_EXPLICIT_EVAL, ==,
true);
669 TEST_COMPARE(observer->testEND_STAGE, ==,
true);
670 TEST_COMPARE(observer->testEND_STEP, ==,
true);
673 auto x = solutionHistory->getCurrentState()->getX();
674 TEST_FLOATING_EQUALITY(observer->testCurrentValue, get_ele(*(x), 0),
676 x = solutionHistory->getWorkingState()->getX();
677 TEST_FLOATING_EQUALITY(observer->testWorkingValue, get_ele(*(x), 0),
679 auto Dt = solutionHistory->getWorkingState()->getTimeStep();
680 TEST_FLOATING_EQUALITY(observer->testDt, Dt / 10.0, 1.0e-14);
682 auto testName = testNameOrig +
" - Observer";
683 TEST_COMPARE(observer->testName, ==, testName);
688 stepper->setModel(model);
690 stepper->setAppAction(modifierX);
691 stepper->setStepperName(testNameOrig);
692 stepper->initialize();
693 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
699 stepper->setInitialConditions(solutionHistory);
700 solutionHistory->initWorkingState();
702 solutionHistory->getWorkingState()->setTimeStep(dt);
703 stepper->takeStep(solutionHistory);
706 TEST_COMPARE(modifierX->testX_BEGIN_STEP, ==,
true);
707 TEST_COMPARE(modifierX->testX_BEGIN_STAGE, ==,
true);
708 TEST_COMPARE(modifierX->testX_BEFORE_SOLVE, ==,
true);
709 TEST_COMPARE(modifierX->testX_AFTER_SOLVE, ==,
true);
710 TEST_COMPARE(modifierX->testX_BEFORE_EXPLICIT_EVAL, ==,
true);
711 TEST_COMPARE(modifierX->testXDOT_END_STAGE, ==,
true);
712 TEST_COMPARE(modifierX->testX_END_STEP, ==,
true);
714 const double relTol = 1.0e-14;
716 auto x = solutionHistory->getCurrentState()->getX();
717 TEST_FLOATING_EQUALITY(modifierX->testX, get_ele(*(x), 0), relTol);
718 auto Dt = solutionHistory->getWorkingState()->getTimeStep();
719 TEST_FLOATING_EQUALITY(modifierX->testDt, Dt, relTol);
721 auto time = solutionHistory->getWorkingState()->getTime();
722 TEST_FLOATING_EQUALITY(modifierX->testTime, time, relTol);
725 TEST_COMPARE(stepper->getStageNumber(), ==, -1);
728 TEST_COMPARE(modifierX->testStageNumber, ==,
729 stepper->getNumberOfStages() - 1);
735 TEST_FLOATING_EQUALITY(modifierX->testStageX, 2.0, relTol);
736 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 2.0, relTol);
738 else if (stepper->isImplicit()) {
742 stepper) != Teuchos::null) {
743 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09900990099009901,
745 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09900990099009901,
749 stepper) != Teuchos::null) {
750 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09979317463412091,
752 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09979317463412091,
756 stepper) != Teuchos::null) {
757 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.049921670528461,
759 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.049921670528461,
763 stepper) != Teuchos::null) {
764 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.02171123447937569,
766 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.02171123447937569,
770 stepper) != Teuchos::null) {
771 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.06659267480577136,
773 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.06659267480577136,
777 stepper) != Teuchos::null) {
778 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
780 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
784 stepper) != Teuchos::null) {
785 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
787 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
791 stepper) != Teuchos::null) {
792 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
794 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
798 stepper) != Teuchos::null) {
799 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
801 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
805 stepper) != Teuchos::null) {
806 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.0748907323303947,
808 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.0748907323303947,
812 stepper) != Teuchos::null) {
813 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.08321767099874625,
815 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.08321767099874625,
819 stepper) != Teuchos::null) {
820 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.07878078755122744,
822 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.07878078755122744,
826 stepper) != Teuchos::null) {
827 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.08525184184135257,
829 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.08525184184135257,
832 else if (rcp_dynamic_cast<
834 stepper) != Teuchos::null) {
835 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09900990099009901,
837 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09900990099009901,
840 else if (rcp_dynamic_cast<
842 stepper) != Teuchos::null) {
843 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
845 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
849 stepper) != Teuchos::null) {
850 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09983340822548158,
852 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09983340822548158,
856 stepper) != Teuchos::null) {
857 TEST_FLOATING_EQUALITY(modifierX->testStageX, -0.009988159068259408,
859 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, -0.009988159068259408,
863 stepper) != Teuchos::null) {
864 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.06446224812649308,
866 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.06446224812649308,
871 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.001960592098813843,
873 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.001960592098813843,
878 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09979317463412091,
880 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09979317463412091,
884 TEUCHOS_TEST_FOR_EXCEPTION(
885 true, std::logic_error,
886 "Error - unknown stepperType = " + stepper->getStepperType());
894 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09966666666666668,
896 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09966666666666668,
900 stepper) != Teuchos::null) {
901 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.1, relTol);
902 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.1, relTol);
905 stepper) != Teuchos::null) {
906 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.06666666666666667,
908 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.06666666666666667,
912 stepper) != Teuchos::null) {
913 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.05, relTol);
914 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.05, relTol);
917 stepper) != Teuchos::null) {
918 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.0995, relTol);
919 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.0995, relTol);
922 stepper) != Teuchos::null) {
923 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09975, relTol);
924 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09975, relTol);
927 stepper) != Teuchos::null) {
928 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.06662222222222222,
930 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.06662222222222222,
934 stepper) != Teuchos::null) {
935 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09983333333333333,
937 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09983333333333333,
941 stepper) != Teuchos::null) {
942 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.0, relTol);
943 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.0, relTol);
947 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09975, relTol);
948 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09975, relTol);
952 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09983333333333332,
954 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09983333333333332,
959 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.05, relTol);
960 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.05, relTol);
963 stepper) != Teuchos::null) {
964 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.1, relTol);
965 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.1, relTol);
968 TEUCHOS_TEST_FOR_EXCEPTION(
969 true, std::logic_error,
970 "Error - unknown stepperType = " + stepper->getStepperType());
977 stepper->setModel(model);
984 composite->addRKAppAction(modifier);
985 composite->addRKAppAction(observer);
986 composite->addRKAppAction(modifierX);
987 stepper->setAppAction(composite);
989 stepper->initialize();
990 TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
996 stepper->setInitialConditions(solutionHistory);
997 solutionHistory->initWorkingState();
999 solutionHistory->getWorkingState()->setTimeStep(dt);
1000 stepper->takeStep(solutionHistory);
1002 auto xCS = solutionHistory->getCurrentState()->getX();
1003 auto xWS = solutionHistory->getWorkingState()->getX();
1004 auto Dt = solutionHistory->getWorkingState()->getTimeStep();
1008 TEST_COMPARE(modifier->testBEGIN_STEP, ==,
true);
1009 TEST_COMPARE(modifier->testBEGIN_STAGE, ==,
true);
1010 TEST_COMPARE(modifier->testBEFORE_SOLVE, ==,
true);
1011 TEST_COMPARE(modifier->testAFTER_SOLVE, ==,
true);
1012 TEST_COMPARE(modifier->testBEFORE_EXPLICIT_EVAL, ==,
true);
1013 TEST_COMPARE(modifier->testEND_STAGE, ==,
true);
1014 TEST_COMPARE(modifier->testEND_STEP, ==,
true);
1016 const double relTol = 1.0e-14;
1018 TEST_FLOATING_EQUALITY(modifier->testCurrentValue, get_ele(*(xCS), 0),
1020 TEST_FLOATING_EQUALITY(modifier->testWorkingValue, get_ele(*(xWS), 0),
1022 TEST_FLOATING_EQUALITY(modifier->testDt, Dt / 10.0, relTol);
1024 auto testName = testNameOrig +
" - Modifier";
1025 TEST_COMPARE(modifier->testName, ==, testName);
1029 TEST_COMPARE(observer->testBEGIN_STEP, ==,
true);
1030 TEST_COMPARE(observer->testBEGIN_STAGE, ==,
true);
1031 TEST_COMPARE(observer->testBEFORE_SOLVE, ==,
true);
1032 TEST_COMPARE(observer->testAFTER_SOLVE, ==,
true);
1033 TEST_COMPARE(observer->testBEFORE_EXPLICIT_EVAL, ==,
true);
1034 TEST_COMPARE(observer->testEND_STAGE, ==,
true);
1035 TEST_COMPARE(observer->testEND_STEP, ==,
true);
1038 TEST_FLOATING_EQUALITY(observer->testCurrentValue, get_ele(*(xCS), 0),
1040 TEST_FLOATING_EQUALITY(observer->testWorkingValue, get_ele(*(xWS), 0),
1042 TEST_FLOATING_EQUALITY(observer->testDt, Dt / 10.0, relTol);
1044 testName = testNameOrig +
" - Observer";
1045 TEST_COMPARE(observer->testName, ==, testName);
1049 TEST_COMPARE(modifierX->testX_BEGIN_STEP, ==,
true);
1050 TEST_COMPARE(modifierX->testX_BEGIN_STAGE, ==,
true);
1051 TEST_COMPARE(modifierX->testX_BEFORE_SOLVE, ==,
true);
1052 TEST_COMPARE(modifierX->testX_AFTER_SOLVE, ==,
true);
1053 TEST_COMPARE(modifierX->testX_BEFORE_EXPLICIT_EVAL, ==,
true);
1054 TEST_COMPARE(modifierX->testXDOT_END_STAGE, ==,
true);
1055 TEST_COMPARE(modifierX->testX_END_STEP, ==,
true);
1058 TEST_FLOATING_EQUALITY(modifierX->testX, get_ele(*(xCS), 0), relTol);
1059 TEST_FLOATING_EQUALITY(modifierX->testDt, Dt, relTol);
1061 auto time = solutionHistory->getWorkingState()->getTime();
1062 TEST_FLOATING_EQUALITY(modifierX->testTime, time, relTol);
1065 TEST_COMPARE(stepper->getStageNumber(), ==, -1);
1068 TEST_COMPARE(modifierX->testStageNumber, ==,
1069 stepper->getNumberOfStages() - 1);
1075 TEST_FLOATING_EQUALITY(modifierX->testStageX, 2.0, relTol);
1076 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 2.0, relTol);
1078 else if (stepper->isImplicit()) {
1082 stepper) != Teuchos::null) {
1083 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09900990099009901,
1085 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09900990099009901,
1089 stepper) != Teuchos::null) {
1090 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09979317463412091,
1092 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09979317463412091,
1096 stepper) != Teuchos::null) {
1097 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.049921670528461,
1099 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.049921670528461,
1103 stepper) != Teuchos::null) {
1104 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.02171123447937569,
1106 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.02171123447937569,
1110 stepper) != Teuchos::null) {
1111 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.06659267480577136,
1113 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.06659267480577136,
1117 stepper) != Teuchos::null) {
1118 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
1120 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
1124 stepper) != Teuchos::null) {
1125 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
1127 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
1131 stepper) != Teuchos::null) {
1132 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
1134 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
1138 stepper) != Teuchos::null) {
1139 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
1141 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
1145 stepper) != Teuchos::null) {
1146 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.0748907323303947,
1148 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.0748907323303947,
1152 stepper) != Teuchos::null) {
1153 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.08321767099874625,
1155 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.08321767099874625,
1159 stepper) != Teuchos::null) {
1160 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.07878078755122744,
1162 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.07878078755122744,
1166 stepper) != Teuchos::null) {
1167 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.08525184184135257,
1169 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.08525184184135257,
1172 else if (rcp_dynamic_cast<
1174 stepper) != Teuchos::null) {
1175 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09900990099009901,
1177 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09900990099009901,
1180 else if (rcp_dynamic_cast<
1182 stepper) != Teuchos::null) {
1183 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.04987531172069826,
1185 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.04987531172069826,
1189 stepper) != Teuchos::null) {
1190 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09983340822548158,
1192 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09983340822548158,
1196 stepper) != Teuchos::null) {
1197 TEST_FLOATING_EQUALITY(modifierX->testStageX, -0.009988159068259408,
1199 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, -0.009988159068259408,
1203 stepper) != Teuchos::null) {
1204 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.06446224812649308,
1206 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.06446224812649308,
1211 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.001960592098813843,
1213 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.001960592098813843,
1218 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09979317463412091,
1220 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09979317463412091,
1224 TEUCHOS_TEST_FOR_EXCEPTION(
1225 true, std::logic_error,
1226 "Error - unknown stepperType = " + stepper->getStepperType());
1234 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09966666666666668,
1236 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09966666666666668,
1240 stepper) != Teuchos::null) {
1241 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.1, relTol);
1242 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.1, relTol);
1245 stepper) != Teuchos::null) {
1246 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.06666666666666667,
1248 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.06666666666666667,
1252 stepper) != Teuchos::null) {
1253 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.05, relTol);
1254 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.05, relTol);
1257 stepper) != Teuchos::null) {
1258 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.0995, relTol);
1259 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.0995, relTol);
1262 stepper) != Teuchos::null) {
1263 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09975, relTol);
1264 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09975, relTol);
1267 stepper) != Teuchos::null) {
1268 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.06662222222222222,
1270 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.06662222222222222,
1274 stepper) != Teuchos::null) {
1275 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09983333333333333,
1277 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09983333333333333,
1281 stepper) != Teuchos::null) {
1282 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.0, relTol);
1283 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.0, relTol);
1287 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09975, relTol);
1288 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09975, relTol);
1292 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.09983333333333332,
1294 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.09983333333333332,
1299 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.05, relTol);
1300 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.05, relTol);
1303 stepper) != Teuchos::null) {
1304 TEST_FLOATING_EQUALITY(modifierX->testStageX, 0.1, relTol);
1305 TEST_FLOATING_EQUALITY(modifierX->testEndStageX, 0.1, relTol);
1308 TEUCHOS_TEST_FOR_EXCEPTION(
1309 true, std::logic_error,
1310 "Error - unknown stepperType = " + stepper->getStepperType());