9 #ifndef Tempus_StepperFactory_hpp
10 #define Tempus_StepperFactory_hpp
12 #include "Teuchos_ParameterList.hpp"
13 #include "Tempus_StepperForwardEuler.hpp"
14 #include "Tempus_StepperBackwardEuler.hpp"
15 #include "Tempus_StepperBDF2.hpp"
16 #include "Tempus_StepperNewmarkImplicitAForm.hpp"
17 #include "Tempus_StepperNewmarkImplicitDForm.hpp"
18 #include "Tempus_StepperNewmarkExplicitAForm.hpp"
19 #include "Tempus_StepperHHTAlpha.hpp"
21 #include "Tempus_StepperIMEX_RK.hpp"
22 #include "Tempus_StepperIMEX_RK_Partition.hpp"
23 #include "Tempus_StepperLeapfrog.hpp"
24 #include "Tempus_StepperOperatorSplit.hpp"
25 #include "Tempus_StepperTrapezoidal.hpp"
26 #include "Tempus_StepperSubcycling.hpp"
28 #include "NOX_Thyra.H"
37 template<
class Scalar>
50 std::string stepperType =
"Forward Euler",
51 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >&
52 model = Teuchos::null)
54 if (stepperType ==
"") stepperType =
"Forward Euler";
55 return this->
createStepper(model, stepperType, Teuchos::null);
60 Teuchos::RCP<Teuchos::ParameterList> stepperPL,
61 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >&
62 model = Teuchos::null)
64 std::string stepperType =
"Forward Euler";
65 if (stepperPL != Teuchos::null)
66 stepperType = stepperPL->get<std::string>(
"Stepper Type",
"Forward Euler");
72 Teuchos::RCP<Teuchos::ParameterList> stepperPL,
73 std::vector<Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > >
74 models = Teuchos::null)
76 std::string stepperType = stepperPL->get<std::string>(
"Stepper Type");
86 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
89 stepperPL->get<std::string>(
"Stepper Type", stepper->getStepperType());
90 TEUCHOS_TEST_FOR_EXCEPTION(
91 stepperType != stepper->getStepperType() ,std::runtime_error,
92 " ParameterList 'Stepper Type' (='" + stepperType +
"')\n"
93 " does not match type for stepper Stepper (='"
94 + stepper->getStepperType() +
"').");
95 stepper->setStepperType(stepperType);
98 stepperPL->get<
bool>(
"Use FSAL", stepper->getUseFSALDefault()));
100 stepper->setICConsistency(
101 stepperPL->get<std::string>(
"Initial Condition Consistency",
102 stepper->getICConsistencyDefault()));
104 stepper->setICConsistencyCheck(
105 stepperPL->get<
bool>(
"Initial Condition Consistency Check",
106 stepper->getICConsistencyCheckDefault()));
112 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
116 using Teuchos::rcp_const_cast;
117 using Teuchos::ParameterList;
119 TEUCHOS_TEST_FOR_EXCEPTION(stepperPL == Teuchos::null,std::runtime_error,
120 "Error parsing general tableau. ParameterList is null.\n");
122 Teuchos::RCP<RKButcherTableau<Scalar> > tableau;
124 RCP<ParameterList> tableauPL = sublist(stepperPL,
"Tableau",
true);
125 std::size_t numStages = 0;
126 int order = tableauPL->get<
int>(
"order");
127 Teuchos::SerialDenseMatrix<int,Scalar> A;
128 Teuchos::SerialDenseVector<int,Scalar> b;
129 Teuchos::SerialDenseVector<int,Scalar> c;
130 Teuchos::SerialDenseVector<int,Scalar> bstar;
134 std::vector<std::string> A_row_tokens;
139 numStages = A_row_tokens.size();
142 A.shape(as<int>(numStages),as<int>(numStages));
145 for(std::size_t row=0;row<numStages;row++) {
147 std::vector<std::string> tokens;
150 std::vector<double> values;
153 TEUCHOS_TEST_FOR_EXCEPTION(values.size()!=numStages,std::runtime_error,
154 "Error parsing A matrix, wrong number of stages in row "
157 for(std::size_t col=0;col<numStages;col++)
158 A(row,col) = values[col];
163 b.size(as<int>(numStages));
164 c.size(as<int>(numStages));
168 std::vector<std::string> tokens;
170 std::vector<double> values;
173 TEUCHOS_TEST_FOR_EXCEPTION(values.size()!=numStages,std::runtime_error,
174 "Error parsing b vector, wrong number of stages.\n");
176 for(std::size_t i=0;i<numStages;i++)
182 std::vector<std::string> tokens;
184 std::vector<double> values;
187 TEUCHOS_TEST_FOR_EXCEPTION(values.size()!=numStages,std::runtime_error,
188 "Error parsing c vector, wrong number of stages.\n");
190 for(std::size_t i=0;i<numStages;i++)
194 if (tableauPL->isParameter(
"bstar") and
195 tableauPL->get<std::string>(
"bstar") !=
"") {
196 bstar.size(as<int>(numStages));
199 std::vector<std::string> tokens;
201 tokens, tableauPL->get<std::string>(
"bstar"),
" ",
true);
202 std::vector<double> values;
205 TEUCHOS_TEST_FOR_EXCEPTION(values.size()!=numStages,std::runtime_error,
206 "Error parsing bstar vector, wrong number of stages.\n"
207 " Number of RK stages = " << numStages <<
"\n"
208 " Number of bstar values = " << values.size() <<
"\n");
210 for(std::size_t i=0;i<numStages;i++)
211 bstar(i) = values[i];
214 "From ParameterList",A,b,c,order,order,order,bstar));
217 "From ParameterList",A,b,c,order,order,order));
226 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
228 if (stepperPL != Teuchos::null) {
229 stepperPL->validateParametersAndSetDefaults(
230 *stepper->getValidParameters());
238 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
240 auto solver = rcp(
new Thyra::NOXNonlinearSolver());
242 auto subPL = sublist(solverPL,
"NOX");
243 solver->setParameterList(subPL);
244 if (stepperPL != Teuchos::null) {
249 stepper->setZeroInitialGuess(
250 stepperPL->get<
bool>(
"Zero Initial Guess",
false));
257 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
259 if (stepperPL != Teuchos::null) {
260 stepperPL->validateParametersAndSetDefaults(
261 *stepper->getValidParameters());
263 stepper->setUseEmbedded(
264 stepperPL->get<
bool>(
"Use Embedded",stepper->getUseEmbeddedDefault()));
271 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
273 auto solver = rcp(
new Thyra::NOXNonlinearSolver());
275 auto subPL = sublist(solverPL,
"NOX");
276 solver->setParameterList(subPL);
277 if (stepperPL != Teuchos::null) {
278 std::string solverName = stepperPL->get<std::string>(
"Solver Name");
279 if ( stepperPL->isSublist(solverName) ) {
280 auto solverPL = Teuchos::parameterList();
281 solverPL = Teuchos::sublist(stepperPL, solverName);
282 Teuchos::RCP<Teuchos::ParameterList> noxPL =
283 Teuchos::sublist(solverPL,
"NOX",
true);
284 solver->setParameterList(noxPL);
287 stepper->setSolver(solver);
293 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
295 auto solver = rcp(
new Thyra::NOXNonlinearSolver());
297 auto subPL = sublist(solverPL,
"NOX");
298 solver->setParameterList(subPL);
299 if (stepperPL != Teuchos::null) {
304 stepper->setUseEmbedded(
305 stepperPL->get<
bool>(
"Use Embedded",stepper->getUseEmbeddedDefault()));
306 stepper->setZeroInitialGuess(
307 stepperPL->get<
bool>(
"Zero Initial Guess",
false));
313 Teuchos::RCP<Teuchos::ParameterList> stepperPL,
314 std::string stepperType)
317 if (stepperType ==
"") {
318 if (stepperPL == Teuchos::null)
319 stepperType =
"Partitioned IMEX RK SSP2";
321 stepperType = stepperPL->get<std::string>(
"Stepper Type",
322 "Partitioned IMEX RK SSP2");
325 if (stepperType !=
"General Partitioned IMEX RK") {
326 stepper->setTableaus(stepperType);
328 RCP<Teuchos::ParameterList> explicitPL = Teuchos::rcp(
329 new Teuchos::ParameterList(
330 stepperPL->sublist(
"IMEX-RK Explicit Stepper")));
334 auto explicitTableau = stepperERK->
getTableau();
336 RCP<Teuchos::ParameterList> implicitPL = Teuchos::rcp(
337 new Teuchos::ParameterList(
338 stepperPL->sublist(
"IMEX-RK Implicit Stepper")));
342 auto implicitTableau = stepperDIRK->
getTableau();
344 stepper->setTableaus(stepperType, explicitTableau, implicitTableau);
346 stepper->setOrder(stepperPL->get<
int>(
"overall order", 1));
352 Teuchos::RCP<Teuchos::ParameterList> stepperPL,
353 std::string stepperType)
356 if (stepperType ==
"") {
357 if (stepperPL == Teuchos::null)
358 stepperType =
"IMEX RK SSP2";
360 stepperType = stepperPL->get<std::string>(
"Stepper Type",
364 if (stepperType !=
"General IMEX RK") {
365 stepper->setTableaus(stepperType);
367 RCP<Teuchos::ParameterList> explicitPL = Teuchos::rcp(
368 new Teuchos::ParameterList(
369 stepperPL->sublist(
"IMEX-RK Explicit Stepper")));
373 auto explicitTableau = stepperERK->
getTableau();
375 RCP<Teuchos::ParameterList> implicitPL = Teuchos::rcp(
376 new Teuchos::ParameterList(
377 stepperPL->sublist(
"IMEX-RK Implicit Stepper")));
381 auto implicitTableau = stepperDIRK->
getTableau();
383 stepper->setTableaus(stepperType, explicitTableau, implicitTableau);
385 stepper->setOrder(stepperPL->get<
int>(
"overall order", 1));
393 Teuchos::RCP<StepperSubcycling<Scalar> >
395 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
396 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
400 TEUCHOS_TEST_FOR_EXCEPTION(stepperPL != Teuchos::null, std::logic_error,
401 "Error - Construction of StepperSubcycling with a ParameterList\n"
402 "is not implemented yet!\n");
404 if (stepperPL != Teuchos::null) {
412 if (model != Teuchos::null) {
413 stepper->setModel(model);
414 stepper->initialize();
420 Teuchos::RCP<StepperIMEX_RK_Partition<Scalar> >
422 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
423 std::string stepperType,
424 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
427 stepper->setStepperType(stepperType);
431 if (model != Teuchos::null) {
432 stepper->setModel(model);
434 stepper->initialize();
440 Teuchos::RCP<StepperIMEX_RK<Scalar> >
442 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
443 std::string stepperType,
444 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
447 stepper->setStepperType(stepperType);
451 if (model != Teuchos::null) {
452 stepper->setModel(model);
454 stepper->initialize();
460 Teuchos::RCP<StepperHHTAlpha<Scalar> >
462 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
463 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
467 if (stepperPL != Teuchos::null) {
468 if (stepperPL->isSublist(
"HHT-Alpha Parameters")) {
469 auto hhtalphaPL = stepperPL->sublist(
"HHT-Alpha Parameters",
true);
470 std::string schemeName =
471 hhtalphaPL.get<std::string>(
"Scheme Name",
"Newmark Beta Average Acceleration");
472 stepper->setSchemeName(schemeName);
473 if (schemeName ==
"Newmark Beta User Defined") {
474 stepper->setBeta (hhtalphaPL.get<
double>(
"Beta", 0.25));
475 stepper->setGamma(hhtalphaPL.get<
double>(
"Gamma", 0.5 ));
477 stepper->setAlphaF(hhtalphaPL.get<
double>(
"Alpha_f", 0.0));
478 stepper->setAlphaM(hhtalphaPL.get<
double>(
"Alpha_m", 0.0));
480 stepper->setSchemeName(
"Newmark Beta Average Acceleration");
481 stepper->setAlphaF(0.0);
482 stepper->setAlphaM(0.0);
486 if (model != Teuchos::null) {
487 stepper->setModel(model);
489 stepper->initialize();
495 Teuchos::RCP<StepperNewmarkImplicitDForm<Scalar> >
497 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
498 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
502 if (stepperPL != Teuchos::null) {
503 if (stepperPL->isSublist(
"Newmark Parameters")) {
504 auto newmarkPL = stepperPL->sublist(
"Newmark Parameters",
true);
505 std::string schemeName =
506 newmarkPL.get<std::string>(
"Scheme Name",
"Average Acceleration");
507 stepper->setSchemeName(schemeName);
508 if (schemeName ==
"User Defined") {
509 stepper->setBeta (newmarkPL.get<
double>(
"Beta", 0.25));
510 stepper->setGamma(newmarkPL.get<
double>(
"Gamma", 0.5 ));
513 stepper->setSchemeName(
"Average Acceleration");
517 if (model != Teuchos::null) {
518 stepper->setModel(model);
520 stepper->initialize();
526 Teuchos::RCP<StepperNewmarkImplicitAForm<Scalar> >
528 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
529 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
533 if (stepperPL != Teuchos::null) {
534 if (stepperPL->isSublist(
"Newmark Parameters")) {
535 auto newmarkPL = stepperPL->sublist(
"Newmark Parameters",
true);
536 std::string schemeName =
537 newmarkPL.get<std::string>(
"Scheme Name",
"Average Acceleration");
538 stepper->setSchemeName(schemeName);
539 if (schemeName ==
"User Defined") {
540 stepper->setBeta (newmarkPL.get<
double>(
"Beta", 0.25));
541 stepper->setGamma(newmarkPL.get<
double>(
"Gamma", 0.5 ));
544 stepper->setSchemeName(
"Average Acceleration");
548 if (model != Teuchos::null) {
549 stepper->setModel(model);
551 stepper->initialize();
557 Teuchos::RCP<StepperBDF2<Scalar> >
559 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
560 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
565 if (model != Teuchos::null) {
566 stepper->setModel(model);
568 std::string startUpStepper =
"DIRK 1 Stage Theta Method";
569 if (stepperPL != Teuchos::null) startUpStepper =
570 stepperPL->get<std::string>(
"Start Up Stepper Type", startUpStepper);
571 stepper->setStartUpStepper(startUpStepper);
572 stepper->initialize();
578 Teuchos::RCP<StepperTrapezoidal<Scalar> >
580 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
581 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
586 if (model != Teuchos::null) {
587 stepper->setModel(model);
589 stepper->initialize();
595 Teuchos::RCP<StepperBackwardEuler<Scalar> >
597 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
598 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
603 if (model != Teuchos::null) {
604 stepper->setModel(model);
607 std::string predictor =
"None";
608 if (stepperPL != Teuchos::null) predictor =
609 stepperPL->get<std::string>(
"Predictor Stepper Type", predictor);
610 stepper->setPredictor(predictor);
612 stepper->initialize();
618 Teuchos::RCP<StepperNewmarkExplicitAForm<Scalar> >
620 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
621 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
625 if (stepperPL != Teuchos::null) {
626 Scalar gamma = stepperPL->sublist(
"Newmark Explicit Parameters")
627 .template get<double>(
"Gamma", 0.5);
628 stepper->setGamma(gamma);
631 if (model != Teuchos::null) {
632 stepper->setModel(model);
633 stepper->initialize();
639 Teuchos::RCP<StepperLeapfrog<Scalar> >
641 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
642 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
647 if (model != Teuchos::null) {
648 stepper->setModel(model);
649 stepper->initialize();
655 Teuchos::RCP<StepperForwardEuler<Scalar> >
657 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
658 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
663 if (model != Teuchos::null) {
664 stepper->setModel(model);
665 stepper->initialize();
671 Teuchos::RCP<StepperERK_General<Scalar> >
673 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
674 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
679 if (stepperPL != Teuchos::null) {
680 if (stepperPL->isParameter(
"Tableau")) {
682 stepper->setTableau( t->A(),t->b(),t->c(),
683 t->order(),t->orderMin(),t->orderMax(),
687 TEUCHOS_TEST_FOR_EXCEPTION(
688 stepper->getTableau()->isImplicit() ==
true, std::logic_error,
689 "Error - General ERK received an implicit Butcher Tableau!\n");
691 if (model != Teuchos::null) {
692 stepper->setModel(model);
693 stepper->initialize();
699 Teuchos::RCP<StepperERK_ForwardEuler<Scalar> >
701 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
702 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
707 if (model != Teuchos::null) {
708 stepper->setModel(model);
709 stepper->initialize();
715 Teuchos::RCP<StepperERK_4Stage4thOrder<Scalar> >
717 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
718 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
723 if (model != Teuchos::null) {
724 stepper->setModel(model);
725 stepper->initialize();
731 Teuchos::RCP<StepperERK_3_8Rule<Scalar> >
733 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
734 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
739 if (model != Teuchos::null) {
740 stepper->setModel(model);
741 stepper->initialize();
747 Teuchos::RCP<StepperERK_4Stage3rdOrderRunge<Scalar> >
749 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
750 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
755 if (model != Teuchos::null) {
756 stepper->setModel(model);
757 stepper->initialize();
763 Teuchos::RCP<StepperERK_5Stage3rdOrderKandG<Scalar> >
765 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
766 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
771 if (model != Teuchos::null) {
772 stepper->setModel(model);
773 stepper->initialize();
779 Teuchos::RCP<StepperERK_3Stage3rdOrder<Scalar> >
781 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
782 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
787 if (model != Teuchos::null) {
788 stepper->setModel(model);
789 stepper->initialize();
795 Teuchos::RCP<StepperERK_3Stage3rdOrderTVD<Scalar> >
797 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
798 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
803 if (model != Teuchos::null) {
804 stepper->setModel(model);
805 stepper->initialize();
811 Teuchos::RCP<StepperERK_3Stage3rdOrderHeun<Scalar> >
813 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
814 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
819 if (model != Teuchos::null) {
820 stepper->setModel(model);
821 stepper->initialize();
827 Teuchos::RCP<StepperERK_Midpoint<Scalar> >
829 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
830 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
835 if (model != Teuchos::null) {
836 stepper->setModel(model);
837 stepper->initialize();
843 Teuchos::RCP<StepperERK_Trapezoidal<Scalar> >
845 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
846 Teuchos::RCP<Teuchos::ParameterList> stepperPL,
847 std::string stepperType)
850 stepper->setStepperType(stepperType);
853 if (model != Teuchos::null) {
854 stepper->setModel(model);
855 stepper->initialize();
861 Teuchos::RCP<StepperERK_BogackiShampine32<Scalar> >
863 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
864 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
869 if (model != Teuchos::null) {
870 stepper->setModel(model);
871 stepper->initialize();
877 Teuchos::RCP<StepperERK_Merson45<Scalar> >
879 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
880 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
885 if (model != Teuchos::null) {
886 stepper->setModel(model);
887 stepper->initialize();
893 Teuchos::RCP<StepperDIRK_General<Scalar> >
895 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
896 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
901 if (stepperPL != Teuchos::null) {
902 if (stepperPL->isParameter(
"Tableau")) {
904 stepper->setTableau( t->A(),t->b(),t->c(),
905 t->order(),t->orderMin(),t->orderMax(),
909 TEUCHOS_TEST_FOR_EXCEPTION(
910 stepper->getTableau()->isDIRK() !=
true, std::logic_error,
911 "Error - General DIRK did not receive a DIRK Butcher Tableau!\n");
913 if (model != Teuchos::null) {
914 stepper->setModel(model);
916 stepper->initialize();
922 Teuchos::RCP<StepperDIRK_BackwardEuler<Scalar> >
924 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
925 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
930 if (model != Teuchos::null) {
931 stepper->setModel(model);
933 stepper->initialize();
939 Teuchos::RCP<StepperSDIRK_2Stage2ndOrder<Scalar> >
941 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
942 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
946 if (stepperPL != Teuchos::null)
947 stepper->setGamma(stepperPL->get<
double>(
"gamma", 0.2928932188134524));
949 if (model != Teuchos::null) {
950 stepper->setModel(model);
952 stepper->initialize();
958 Teuchos::RCP<StepperSDIRK_2Stage3rdOrder<Scalar> >
960 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
961 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
965 if (stepperPL != Teuchos::null) {
966 stepper->setGammaType(
967 stepperPL->get<std::string>(
"Gamma Type",
"3rd Order A-stable"));
968 stepper->setGamma(stepperPL->get<
double>(
"gamma", 0.7886751345948128));
971 if (model != Teuchos::null) {
972 stepper->setModel(model);
974 stepper->initialize();
980 Teuchos::RCP<StepperEDIRK_2Stage3rdOrder<Scalar> >
982 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
983 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
988 if (model != Teuchos::null) {
989 stepper->setModel(model);
991 stepper->initialize();
997 Teuchos::RCP<StepperDIRK_1StageTheta<Scalar> >
999 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1000 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1004 if (stepperPL != Teuchos::null) {
1005 stepper->setTheta(stepperPL->get<
double>(
"theta", 0.5));
1008 if (model != Teuchos::null) {
1009 stepper->setModel(model);
1011 stepper->initialize();
1017 Teuchos::RCP<StepperEDIRK_2StageTheta<Scalar> >
1019 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1020 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1024 if (stepperPL != Teuchos::null) {
1025 stepper->setTheta(stepperPL->get<
double>(
"theta", 0.5));
1028 if (model != Teuchos::null) {
1029 stepper->setModel(model);
1031 stepper->initialize();
1037 Teuchos::RCP<StepperEDIRK_TrapezoidalRule<Scalar> >
1039 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1040 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1044 if (stepperPL != Teuchos::null)
1045 stepperPL->set<std::string>(
"Stepper Type",
"RK Trapezoidal Rule");
1050 if (model != Teuchos::null) {
1051 stepper->setModel(model);
1053 stepper->initialize();
1059 Teuchos::RCP<StepperSDIRK_ImplicitMidpoint<Scalar> >
1061 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1062 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1067 if (model != Teuchos::null) {
1068 stepper->setModel(model);
1070 stepper->initialize();
1076 Teuchos::RCP<StepperDIRK_1Stage1stOrderRadauIA<Scalar> >
1078 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1079 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1084 if (model != Teuchos::null) {
1085 stepper->setModel(model);
1087 stepper->initialize();
1093 Teuchos::RCP<StepperDIRK_2Stage2ndOrderLobattoIIIB<Scalar> >
1095 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1096 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1101 if (model != Teuchos::null) {
1102 stepper->setModel(model);
1104 stepper->initialize();
1110 Teuchos::RCP<StepperSDIRK_5Stage4thOrder<Scalar> >
1112 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1113 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1118 if (model != Teuchos::null) {
1119 stepper->setModel(model);
1121 stepper->initialize();
1127 Teuchos::RCP<StepperSDIRK_3Stage4thOrder<Scalar> >
1129 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1130 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1135 if (model != Teuchos::null) {
1136 stepper->setModel(model);
1138 stepper->initialize();
1144 Teuchos::RCP<StepperSDIRK_5Stage5thOrder<Scalar> >
1146 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1147 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1152 if (model != Teuchos::null) {
1153 stepper->setModel(model);
1155 stepper->initialize();
1161 Teuchos::RCP<StepperSDIRK_21Pair<Scalar> >
1163 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1164 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1169 if (model != Teuchos::null) {
1170 stepper->setModel(model);
1172 stepper->initialize();
1184 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& model,
1185 std::string stepperType,
1186 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1189 if (stepperType ==
"Forward Euler")
1191 else if (stepperType ==
"Backward Euler")
1193 else if (stepperType ==
"Trapezoidal Method")
1195 else if (stepperType ==
"BDF2")
1197 else if (stepperType ==
"Newmark Implicit a-Form")
1199 else if (stepperType ==
"Newmark Implicit d-Form")
1201 else if (stepperType ==
"Newmark Explicit a-Form")
1203 else if (stepperType ==
"HHT-Alpha")
1205 else if (stepperType ==
"General ERK" )
1207 else if (stepperType ==
"RK Forward Euler" )
1209 else if (stepperType ==
"RK Explicit 4 Stage" )
1211 else if (stepperType ==
"RK Explicit 3/8 Rule" )
1213 else if (stepperType ==
"RK Explicit 4 Stage 3rd order by Runge" )
1215 else if (stepperType ==
"RK Explicit 5 Stage 3rd order by Kinnmark and Gray" )
1217 else if (stepperType ==
"RK Explicit 3 Stage 3rd order" )
1219 else if (stepperType ==
"RK Explicit 3 Stage 3rd order TVD" )
1221 else if (stepperType ==
"RK Explicit 3 Stage 3rd order by Heun" )
1223 else if (stepperType ==
"RK Explicit Midpoint" )
1225 else if (stepperType ==
"RK Explicit Trapezoidal" ||
1226 stepperType ==
"Heuns Method" )
1228 else if (stepperType ==
"Bogacki-Shampine 3(2) Pair" )
1230 else if (stepperType ==
"Merson 4(5) Pair" )
1232 else if (stepperType ==
"General DIRK" )
1234 else if (stepperType ==
"RK Backward Euler" )
1236 else if (stepperType ==
"SDIRK 2 Stage 2nd order" )
1238 else if (stepperType ==
"SDIRK 2 Stage 3rd order" )
1240 else if (stepperType ==
"EDIRK 2 Stage 3rd order" )
1242 else if (stepperType ==
"DIRK 1 Stage Theta Method" )
1244 else if (stepperType ==
"EDIRK 2 Stage Theta Method" )
1246 else if (stepperType ==
"RK Trapezoidal Rule" ||
1247 stepperType ==
"RK Crank-Nicolson" )
1249 else if (stepperType ==
"RK Implicit Midpoint" )
1251 else if (stepperType ==
"RK Implicit 1 Stage 1st order Radau IA" )
1253 else if (stepperType ==
"RK Implicit 2 Stage 2nd order Lobatto IIIB" )
1255 else if (stepperType ==
"SDIRK 5 Stage 4th order" )
1257 else if (stepperType ==
"SDIRK 3 Stage 4th order" )
1259 else if (stepperType ==
"SDIRK 5 Stage 5th order" )
1261 else if ( stepperType ==
"SDIRK 2(1) Pair" )
1264 stepperType ==
"IMEX RK 1st order" ||
1265 stepperType ==
"IMEX RK SSP2" ||
1266 stepperType ==
"IMEX RK ARS 233" ||
1267 stepperType ==
"General IMEX RK" )
1270 stepperType ==
"Partitioned IMEX RK 1st order" ||
1271 stepperType ==
"Partitioned IMEX RK SSP2" ||
1272 stepperType ==
"Partitioned IMEX RK ARS 233" ||
1273 stepperType ==
"General Partitioned IMEX RK" )
1275 else if (stepperType ==
"Leapfrog")
1277 else if (stepperType ==
"Subcycling")
1280 Teuchos::RCP<Teuchos::FancyOStream> out =
1281 Teuchos::VerboseObjectBase::getDefaultOStream();
1282 Teuchos::OSTab ostab(out,1,
"StepperFactory::createStepper");
1284 <<
"Unknown Stepper Type! ('"+stepperType+
"').\n"
1285 <<
"Here is a list of available Steppers.\n"
1286 <<
" One-Step Methods:\n"
1287 <<
" 'Forward Euler'\n"
1288 <<
" 'Backward Euler'\n"
1289 <<
" 'Trapezoidal Method'\n"
1290 <<
" Multi-Step Methods:\n"
1292 <<
" Second-order PDE Methods:\n"
1294 <<
" 'Newmark Implicit a-Form'\n"
1295 <<
" 'Newmark Implicit d-Form'\n"
1296 <<
" 'Newmark Explicit a-Form'\n"
1298 <<
" Explicit Runge-Kutta Methods:\n"
1299 <<
" 'RK Forward Euler'\n"
1300 <<
" 'RK Explicit 4 Stage'\n"
1301 <<
" 'RK Explicit 3/8 Rule'\n"
1302 <<
" 'RK Explicit 4 Stage 3rd order by Runge'\n"
1303 <<
" 'RK Explicit 5 Stage 3rd order by Kinnmark and Gray'\n"
1304 <<
" 'RK Explicit 3 Stage 3rd order'\n"
1305 <<
" 'RK Explicit 3 Stage 3rd order TVD'\n"
1306 <<
" 'RK Explicit 3 Stage 3rd order by Heun'\n"
1307 <<
" 'RK Explicit Midpoint'\n"
1308 <<
" 'RK Explicit Trapezoidal' or 'Heuns Method'\n"
1309 <<
" 'Bogacki-Shampine 3(2) Pair'\n"
1310 <<
" 'General ERK'\n"
1311 <<
" Implicit Runge-Kutta Methods:\n"
1312 <<
" 'RK Backward Euler'\n"
1313 <<
" 'DIRK 1 Stage Theta Method'\n"
1314 <<
" 'RK Implicit Midpoint'\n"
1315 <<
" 'SDIRK 1 Stage 1st order'\n"
1316 <<
" 'SDIRK 2 Stage 2nd order'\n"
1317 <<
" 'SDIRK 2 Stage 3rd order'\n"
1318 <<
" 'EDIRK 2 Stage 3rd order'\n"
1319 <<
" 'EDIRK 2 Stage Theta Method'\n"
1320 <<
" 'SDIRK 3 Stage 4th order'\n"
1321 <<
" 'SDIRK 5 Stage 4th order'\n"
1322 <<
" 'SDIRK 5 Stage 5th order'\n"
1323 <<
" 'SDIRK 2(1) Pair'\n"
1324 <<
" 'RK Trapezoidal Rule' or 'RK Crank-Nicolson'\n"
1325 <<
" 'General DIRK'\n"
1326 <<
" Implicit-Explicit (IMEX) Methods:\n"
1327 <<
" 'IMEX RK 1st order'\n"
1328 <<
" 'IMEX RK SSP2'\n"
1329 <<
" 'IMEX RK ARS 233'\n"
1330 <<
" 'General IMEX RK'\n"
1331 <<
" 'Partitioned IMEX RK 1st order'\n"
1332 <<
" 'Partitioned IMEX RK SSP2'\n"
1333 <<
" 'Partitioned IMEX RK ARS 233'\n"
1334 <<
" 'General Partitioned IMEX RK'\n"
1335 <<
" Steppers with subSteppers:\n"
1336 <<
" 'Operator Split'\n"
1338 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
1339 "Unknown 'Stepper Type' = " << stepperType);
1347 std::vector<Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > > appModels,
1348 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1351 using Teuchos::ParameterList;
1354 std::vector<std::string> stepperListStr;
1355 stepperListStr.clear();
1356 std::string str = stepperPL->get<std::string>(
"Stepper List");
1357 std::string delimiters(
",");
1359 std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
1361 std::string::size_type pos = str.find_first_of(delimiters, lastPos);
1362 while ((pos != std::string::npos) || (lastPos != std::string::npos)) {
1363 std::string token = str.substr(lastPos,pos-lastPos);
1365 std::string::size_type beg = token.find_first_of(
"'") + 1;
1366 std::string::size_type end = token.find_last_of (
"'");
1367 stepperListStr.push_back(token.substr(beg,end-beg));
1369 lastPos = str.find_first_not_of(delimiters, pos);
1370 pos = str.find_first_of(delimiters, lastPos);
1373 TEUCHOS_TEST_FOR_EXCEPTION(stepperListStr.size() != appModels.size(),
1374 std::logic_error,
"Error - Number of models and Steppers do not match!\n"
1375 <<
" There are " << appModels.size() <<
" models.\n"
1376 <<
" There are " << stepperListStr.size() <<
" steppers.\n"
1377 <<
" " << str <<
"\n");
1380 std::vector<RCP<const Thyra::ModelEvaluator<Scalar> > >::iterator
1381 aMI = appModels.begin();
1382 typename std::vector<std::string>::iterator sLSI = stepperListStr.begin();
1384 for (; aMI<appModels.end() || sLSI<stepperListStr.end(); aMI++, sLSI++) {
1385 RCP<ParameterList> subStepperPL = Teuchos::sublist(stepperPL,*sLSI,
true);
1386 bool useFSAL = subStepperPL->template get<bool>(
"Use FSAL",
false);
1389 Teuchos::RCP<Teuchos::FancyOStream> out =
1390 Teuchos::VerboseObjectBase::getDefaultOStream();
1391 Teuchos::OSTab ostab(out,1,
"StepperFactory::createSubSteppers()");
1392 *out <<
"Warning -- subStepper = '"
1393 << subStepper->getStepperType() <<
"' has \n"
1394 <<
" subStepper->getUseFSAL() = " << useFSAL <<
".\n"
1395 <<
" subSteppers usually can not use the FSAL priniciple with\n"
1396 <<
" operator splitting. Proceeding with it set to true.\n"
1399 stepper->addStepper(subStepper, useFSAL);
1403 Teuchos::RCP<StepperOperatorSplit<Scalar> >
1405 std::vector<Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > > appModels,
1406 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1410 if (stepperPL != Teuchos::null) {
1412 stepper->setOrderMin(stepperPL->get<
int>(
"Minimum Order", 1));
1413 stepper->setOrder (stepperPL->get<
int>(
"Order", 1));
1414 stepper->setOrderMax(stepperPL->get<
int>(
"Maximum Order", 1));
1417 if ( !(appModels.empty()) ) {
1419 stepper->initialize();
1427 std::vector<Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > > models,
1428 std::string stepperType,
1429 Teuchos::RCP<Teuchos::ParameterList> stepperPL)
1431 if (stepperType ==
"Operator Split")
1434 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
1435 "Unknown 'Stepper Type' = " << stepperType);
1443 #endif // Tempus_StepperFactory_hpp
BDF2 (Backward-Difference-Formula-2) time stepper.
Teuchos::RCP< StepperHHTAlpha< Scalar > > createStepperHHTAlpha(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
virtual ~StepperFactory()
Destructor.
General Implicit Runge-Kutta Butcher Tableau.
Teuchos::RCP< StepperDIRK_1Stage1stOrderRadauIA< Scalar > > createStepperDIRK_1Stage1stOrderRadauIA(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< Stepper< Scalar > > createStepper(std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > > models, std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Trapezoidal method time stepper.
RK Implicit 2 Stage 2nd order Lobatto IIIB.
Teuchos::RCP< StepperBDF2< Scalar > > createStepperBDF2(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperDIRK_1StageTheta< Scalar > > createStepperDIRK_1StageTheta(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperEDIRK_2Stage3rdOrder< Scalar > > createStepperEDIRK_2Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Explicit Runge-Kutta time stepper.
void setStepperExplicitValues(Teuchos::RCP< StepperExplicit< Scalar > > stepper, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Set StepperExplicit member data from the ParameterList.
Teuchos::RCP< StepperSDIRK_2Stage3rdOrder< Scalar > > createStepperSDIRK_2Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Backward Euler Runge-Kutta Butcher Tableau.
Teuchos::RCP< StepperSDIRK_5Stage5thOrder< Scalar > > createStepperSDIRK_5Stage5thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperLeapfrog< Scalar > > createStepperLeapfrog(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
General Explicit Runge-Kutta Butcher Tableau.
Teuchos::RCP< RKButcherTableau< Scalar > > createTableau(Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Create a tableau from the ParameterList.
Teuchos::RCP< StepperIMEX_RK< Scalar > > createStepperIMEX_RK(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Forward Euler time stepper.
RK Explicit 5 Stage 3rd order by Kinnmark and Gray.
Teuchos::RCP< StepperIMEX_RK_Partition< Scalar > > createStepperIMEX_RK_Partition(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
Teuchos::RCP< StepperERK_Midpoint< Scalar > > createStepperERK_Midpoint(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperTrapezoidal< Scalar > > createStepperTrapezoidal(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperSDIRK_3Stage4thOrder< Scalar > > createStepperSDIRK_3Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
StepperFactory()
Constructor.
void setStepperRKValues(Teuchos::RCP< StepperExplicitRK< Scalar > > stepper, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Set StepperRK member data from the ParameterList.
RK Explicit 4 Stage 3rd order by Runge.
Teuchos::RCP< StepperSDIRK_21Pair< Scalar > > createStepperSDIRK_21Pair(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
void setStepperValues(Teuchos::RCP< Stepper< Scalar > > stepper, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Set Stepper member data from the ParameterList.
void setStepperSolverValues(Teuchos::RCP< StepperImplicit< Scalar > > stepper, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Set solver from ParameterList.
void TokensToDoubles(std::vector< double > &values, const std::vector< std::string > &tokens)
Turn a vector of tokens into a vector of doubles.
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getTableau()
Teuchos::RCP< StepperERK_Merson45< Scalar > > createStepperERK_Merson45(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
RK Trapezoidal Rule (A.K.A. RK Crank-Nicolson)
Partitioned Implicit-Explicit Runge-Kutta (IMEX-RK) time stepper.
Teuchos::RCP< Teuchos::ParameterList > defaultSolverParameters()
Returns the default solver ParameterList for implicit Steppers.
Teuchos::RCP< StepperERK_ForwardEuler< Scalar > > createStepperERK_ForwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< Stepper< Scalar > > createStepper(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, std::string stepperType, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Very simple factory method.
OperatorSplit stepper loops through the Stepper list.
Thyra Base interface for time steppers.
Explicit RK 3/8th Rule Butcher Tableau.
Diagonally Implicit Runge-Kutta (DIRK) time stepper.
virtual Teuchos::RCP< const RKButcherTableau< Scalar > > getTableau()
Thyra Base interface for implicit time steppers.
Teuchos::RCP< StepperForwardEuler< Scalar > > createStepperForwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperBackwardEuler< Scalar > > createStepperBackwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperSubcycling< Scalar > > createStepperSubcycling(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperERK_4Stage3rdOrderRunge< Scalar > > createStepperERK_4Stage3rdOrderRunge(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Explicit RK Bogacki-Shampine Butcher Tableau.
void createSubSteppers(Teuchos::RCP< StepperOperatorSplit< Scalar > > stepper, std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > > appModels, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperSDIRK_5Stage4thOrder< Scalar > > createStepperSDIRK_5Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
EDIRK 2 Stage Theta Method.
Teuchos::RCP< Stepper< Scalar > > createStepper(Teuchos::RCP< Teuchos::ParameterList > stepperPL, std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > > models=Teuchos::null)
Create stepper from ParameterList with its details.
Teuchos::RCP< StepperERK_5Stage3rdOrderKandG< Scalar > > createStepperERK_5Stage3rdOrderKandG(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperERK_3_8Rule< Scalar > > createStepperERK_3_8Rule(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Backward Euler time stepper.
Teuchos::RCP< StepperERK_General< Scalar > > createStepperERK_General(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< Stepper< Scalar > > createStepper(Teuchos::RCP< Teuchos::ParameterList > stepperPL, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model=Teuchos::null)
Create stepper from ParameterList with its details.
Teuchos::RCP< Stepper< Scalar > > createStepper(std::string stepperType="Forward Euler", const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model=Teuchos::null)
Create default stepper from stepper type (e.g., "Forward Euler").
Teuchos::RCP< StepperEDIRK_TrapezoidalRule< Scalar > > createStepperEDIRK_TrapezoidalRule(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperDIRK_BackwardEuler< Scalar > > createStepperDIRK_BackwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperOperatorSplit< Scalar > > createStepperOperatorSplit(std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > > appModels, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperNewmarkImplicitAForm< Scalar > > createStepperNewmarkImplicitAForm(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
RK Explicit 3 Stage 3rd order TVD.
Teuchos::RCP< StepperDIRK_General< Scalar > > createStepperDIRK_General(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Forward Euler Runge-Kutta Butcher Tableau.
void StringTokenizer(std::vector< std::string > &tokens, const std::string &str, const std::string delimiters, bool trim)
Tokenize a string, put tokens in a vector.
Teuchos::RCP< StepperERK_3Stage3rdOrderTVD< Scalar > > createStepperERK_3Stage3rdOrderTVD(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Explicit RK Merson Butcher Tableau.
Runge-Kutta 4th order Butcher Tableau.
void setTableaus(Teuchos::RCP< StepperIMEX_RK< Scalar > > stepper, Teuchos::RCP< Teuchos::ParameterList > stepperPL, std::string stepperType)
Teuchos::RCP< StepperEDIRK_2StageTheta< Scalar > > createStepperEDIRK_2StageTheta(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperNewmarkImplicitDForm< Scalar > > createStepperNewmarkImplicitDForm(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
RK Explicit 3 Stage 3rd order.
Teuchos::RCP< StepperNewmarkExplicitAForm< Scalar > > createStepperNewmarkExplicitAForm(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
RK Implicit 1 Stage 1st order Radau IA.
Teuchos::RCP< StepperSDIRK_ImplicitMidpoint< Scalar > > createStepperSDIRK_ImplicitMidpoint(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperERK_3Stage3rdOrderHeun< Scalar > > createStepperERK_3Stage3rdOrderHeun(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperERK_Trapezoidal< Scalar > > createStepperERK_Trapezoidal(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL, std::string stepperType)
Teuchos::RCP< StepperDIRK_2Stage2ndOrderLobattoIIIB< Scalar > > createStepperDIRK_2Stage2ndOrderLobattoIIIB(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
void setTableausPartition(Teuchos::RCP< StepperIMEX_RK_Partition< Scalar > > stepper, Teuchos::RCP< Teuchos::ParameterList > stepperPL, std::string stepperType)
void setStepperImplicitValues(Teuchos::RCP< StepperImplicit< Scalar > > stepper, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Set StepperImplicit member data from the ParameterList.
Teuchos::RCP< StepperSDIRK_2Stage2ndOrder< Scalar > > createStepperSDIRK_2Stage2ndOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Thyra Base interface for implicit time steppers.
Teuchos::RCP< StepperERK_3Stage3rdOrder< Scalar > > createStepperERK_3Stage3rdOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
void setStepperDIRKValues(Teuchos::RCP< StepperDIRK< Scalar > > stepper, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Set StepperDIRK member data from the ParameterList.
RK Explicit 3 Stage 3rd order by Heun.
Teuchos::RCP< StepperERK_BogackiShampine32< Scalar > > createStepperERK_BogackiShampine32(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)
Teuchos::RCP< StepperERK_4Stage4thOrder< Scalar > > createStepperERK_4Stage4thOrder(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > stepperPL)