9 #ifndef Tempus_StepperIMEX_RK_Partition_impl_hpp
10 #define Tempus_StepperIMEX_RK_Partition_impl_hpp
12 #include "Tempus_RKButcherTableauBuilder.hpp"
13 #include "Tempus_config.hpp"
15 #include "Tempus_WrapperModelEvaluatorPairPartIMEX_Basic.hpp"
16 #include "Teuchos_VerboseObjectParameterListHelpers.hpp"
17 #include "Thyra_VectorStdOps.hpp"
18 #include "NOX_Thyra.H"
24 template<
class Scalar>
class StepperFactory;
27 template<
class Scalar>
29 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
30 std::string stepperType)
32 this->setTableaus(Teuchos::null, stepperType);
33 this->setModel(appModel);
38 template<
class Scalar>
40 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
41 Teuchos::RCP<Teuchos::ParameterList> pList)
43 this->setTableaus(pList,
"Partitioned IMEX RK SSP2");
44 this->setParameterList(pList);
45 this->setModel(appModel);
50 template<
class Scalar>
52 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
53 std::string stepperType,
54 Teuchos::RCP<Teuchos::ParameterList> pList)
56 this->setTableaus(pList, stepperType);
57 this->setParameterList(pList);
58 this->setModel(appModel);
63 template<
class Scalar>
65 Teuchos::RCP<Teuchos::ParameterList> pList,
66 std::string stepperType)
68 if (stepperType ==
"") {
69 if (pList == Teuchos::null)
70 stepperType =
"Partitioned IMEX RK SSP2";
72 stepperType = pList->get<std::string>(
"Stepper Type",
73 "Partitioned IMEX RK SSP2");
76 if (stepperType ==
"Partitioned IMEX RK 1st order") {
79 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
80 pl->setName(
"IMEX-RK Explicit Stepper");
81 pl->set<std::string>(
"Stepper Type",
"General ERK");
84 Teuchos::RCP<Teuchos::ParameterList> tableauPL = Teuchos::parameterList();
85 tableauPL->set<std::string>(
"A",
"0.0 0.0; 1.0 0.0");
86 tableauPL->set<std::string>(
"b",
"1.0 0.0");
87 tableauPL->set<std::string>(
"c",
"0.0 1.0");
88 tableauPL->set<
int>(
"order", 1);
89 pl->set(
"Tableau", *tableauPL);
91 this->setExplicitTableau(
"General ERK", pl);
95 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
96 pl->setName(
"IMEX-RK Implicit Stepper");
97 pl->set<std::string>(
"Stepper Type",
"General DIRK");
98 pl->set(
"Solver Name",
"");
101 Teuchos::RCP<Teuchos::ParameterList> tableauPL = Teuchos::parameterList();
102 tableauPL->set<std::string>(
"A",
"0.0 0.0; 0.0 1.0");
103 tableauPL->set<std::string>(
"b",
"0.0 1.0");
104 tableauPL->set<std::string>(
"c",
"0.0 1.0");
105 tableauPL->set<
int>(
"order", 1);
106 pl->set(
"Tableau", *tableauPL);
108 this->setImplicitTableau(
"General DIRK", pl);
110 description_ = stepperType;
113 }
else if (stepperType ==
"Partitioned IMEX RK SSP2") {
114 typedef Teuchos::ScalarTraits<Scalar> ST;
116 this->setExplicitTableau(
"RK Explicit Trapezoidal", Teuchos::null);
119 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
120 pl->set<std::string>(
"Stepper Type",
"SDIRK 2 Stage 3rd order");
121 pl->set(
"Solver Name",
"");
122 Scalar gamma = 1.0 - 1.0/ST::squareroot(2.0);
123 pl->set<
double>(
"gamma",gamma);
124 this->setImplicitTableau(
"SDIRK 2 Stage 3rd order", pl);
126 description_ = stepperType;
128 }
else if (stepperType ==
"Partitioned IMEX RK ARS 233") {
129 using std::to_string;
130 typedef Teuchos::ScalarTraits<Scalar> ST;
131 const Scalar gammaN = (3.0+ST::squareroot(3.0))/(6.0);
132 std::string gamma = to_string( gammaN);
133 std::string one_gamma = to_string(1.0- gammaN);
134 std::string one_2gamma = to_string(1.0-2.0*gammaN);
135 std::string two_2gamma = to_string(2.0-2.0*gammaN);
136 std::string gamma_one = to_string( gammaN-1.0);
139 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
140 pl->setName(
"IMEX-RK Explicit Stepper");
141 pl->set<std::string>(
"Stepper Type",
"General ERK");
144 Teuchos::RCP<Teuchos::ParameterList> tableauPL = Teuchos::parameterList();
145 tableauPL->set<std::string>(
"A",
146 "0.0 0.0 0.0; "+gamma+
" 0.0 0.0; "+gamma_one+
" "+two_2gamma+
" 0.0");
147 tableauPL->set<std::string>(
"b",
"0.0 0.5 0.5");
148 tableauPL->set<std::string>(
"c",
"0.0 "+gamma+
" "+one_gamma);
149 tableauPL->set<
int>(
"order", 2);
150 pl->set(
"Tableau", *tableauPL);
152 this->setExplicitTableau(
"General ERK", pl);
156 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
157 pl->setName(
"IMEX-RK Implicit Stepper");
158 pl->set<std::string>(
"Stepper Type",
"General DIRK");
159 pl->set(
"Solver Name",
"");
162 Teuchos::RCP<Teuchos::ParameterList> tableauPL = Teuchos::parameterList();
163 tableauPL->set<std::string>(
"A",
164 "0.0 0.0 0.0; 0.0 "+gamma+
" 0.0; 0.0 "+one_2gamma+
" "+gamma);
165 tableauPL->set<std::string>(
"b",
"0.0 0.5 0.5");
166 tableauPL->set<std::string>(
"c",
"0.0 "+gamma+
" "+one_gamma);
167 tableauPL->set<
int>(
"order", 3);
168 pl->set(
"Tableau", *tableauPL);
170 this->setImplicitTableau(
"General DIRK", pl);
172 description_ = stepperType;
175 }
else if (stepperType ==
"General Partitioned IMEX RK") {
176 Teuchos::RCP<Teuchos::ParameterList> explicitPL = Teuchos::rcp(
177 new Teuchos::ParameterList(pList->sublist(
"IMEX-RK Explicit Stepper")));
179 Teuchos::RCP<Teuchos::ParameterList> implicitPL = Teuchos::rcp(
180 new Teuchos::ParameterList(pList->sublist(
"IMEX-RK Implicit Stepper")));
183 this->setExplicitTableau(
"General ERK", explicitPL);
184 this->setImplicitTableau(
"General DIRK", implicitPL);
185 description_ = stepperType;
186 order_ = pList->get<
int>(
"overall order", 0);
189 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
190 "Error - Not a valid StepperIMEX_RK_Partition type! Stepper Type = "
191 << stepperType <<
"\n"
192 <<
" Current valid types are: " <<
"\n"
193 <<
" 'Partitioned IMEX RK 1st order'" <<
"\n"
194 <<
" 'Partitioned IMEX RK SSP2'" <<
"\n"
195 <<
" 'Partitioned IMEX RK ARS 233'" <<
"\n"
196 <<
" 'General Partitioned IMEX RK'" <<
"\n");
199 TEUCHOS_TEST_FOR_EXCEPTION(explicitTableau_==Teuchos::null,
201 "Error - StepperIMEX_RK_Partition - Explicit tableau is null!");
202 TEUCHOS_TEST_FOR_EXCEPTION(implicitTableau_==Teuchos::null,
204 "Error - StepperIMEX_RK_Partition - Implicit tableau is null!");
205 TEUCHOS_TEST_FOR_EXCEPTION(
206 explicitTableau_->numStages()!=implicitTableau_->numStages(),
208 "Error - StepperIMEX_RK_Partition - Number of stages do not match!\n"
209 <<
" Explicit tableau = " << explicitTableau_->description() <<
"\n"
210 <<
" number of stages = " << explicitTableau_->numStages() <<
"\n"
211 <<
" Implicit tableau = " << implicitTableau_->description() <<
"\n"
212 <<
" number of stages = " << implicitTableau_->numStages() <<
"\n");
216 template<
class Scalar>
218 std::string stepperType,
219 Teuchos::RCP<Teuchos::ParameterList> pList)
221 explicitTableau_ = createRKBT<Scalar>(stepperType,pList);
222 TEUCHOS_TEST_FOR_EXCEPTION(explicitTableau_->isImplicit() ==
true,
224 "Error - Received an implicit Tableau for setExplicitTableau()!\n"
225 <<
" Stepper Type = " << stepperType <<
"\n");
229 template<
class Scalar>
233 TEUCHOS_TEST_FOR_EXCEPTION(explicitTableau->isImplicit() ==
true,
235 "Error - Received an implicit Tableau for setExplicitTableau()!\n"
236 <<
" explicitTableau = " << explicitTableau->description() <<
"\n");
237 explicitTableau_ = explicitTableau;
241 template<
class Scalar>
243 std::string stepperType,
244 Teuchos::RCP<Teuchos::ParameterList> pList)
246 implicitTableau_ = createRKBT<Scalar>(stepperType,pList);
250 TEUCHOS_TEST_FOR_EXCEPTION( implicitTableau_->isDIRK() !=
true,
252 "Error - Did not receive a DIRK Tableau for setImplicitTableau()!\n"
253 <<
" Stepper Type = " << stepperType <<
"\n");
257 template<
class Scalar>
261 TEUCHOS_TEST_FOR_EXCEPTION( implicitTableau_->isDIRK() !=
true,
263 "Error - Did not receive a DIRK Tableau for setImplicitTableau()!\n"
264 <<
" implicitTableau = " << implicitTableau->description() <<
"\n");
265 implicitTableau_ = implicitTableau;
268 template<
class Scalar>
270 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel)
273 using Teuchos::rcp_const_cast;
274 using Teuchos::rcp_dynamic_cast;
275 RCP<Thyra::ModelEvaluator<Scalar> > ncModel =
276 rcp_const_cast<Thyra::ModelEvaluator<Scalar> > (appModel);
277 RCP<WrapperModelEvaluatorPairPartIMEX_Basic<Scalar> > modelPairIMEX =
279 TEUCHOS_TEST_FOR_EXCEPTION( modelPairIMEX == Teuchos::null, std::logic_error,
280 "Error - StepperIMEX_RK::setModel() was given a ModelEvaluator that\n"
281 " could not be cast to a WrapperModelEvaluatorPairPartIMEX_Basic!\n"
282 " From: " << appModel <<
"\n"
283 " To : " << modelPairIMEX <<
"\n"
284 " Likely have given the wrong ModelEvaluator to this Stepper.\n");
286 setModelPair(modelPairIMEX);
294 template<
class Scalar>
299 Teuchos::RCP<WrapperModelEvaluatorPairPartIMEX_Basic<Scalar> >
300 wrapperModelPairIMEX =
302 (this->wrapperModel_);
303 this->validExplicitODE (mePairIMEX->getExplicitModel());
304 this->validImplicitODE_DAE(mePairIMEX->getImplicitModel());
305 wrapperModelPairIMEX = mePairIMEX;
308 this->wrapperModel_ = wrapperModelPairIMEX;
316 template<
class Scalar>
318 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& explicitModel,
319 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& implicitModel)
321 this->validExplicitODE (explicitModel);
322 this->validImplicitODE_DAE(implicitModel);
323 this->wrapperModel_ = Teuchos::rcp(
325 explicitModel, implicitModel));
329 template<
class Scalar>
333 if (obs == Teuchos::null) {
335 if (stepperObserver_ == Teuchos::null) {
336 stepperIMEX_RKPartObserver_ =
340 (stepperIMEX_RKPartObserver_);
343 stepperObserver_ = obs;
344 stepperIMEX_RKPartObserver_ =
351 template<
class Scalar>
354 TEUCHOS_TEST_FOR_EXCEPTION(
355 (explicitTableau_ == Teuchos::null) || (implicitTableau_ == Teuchos::null),
357 "Error - Need to set the Butcher Tableaus, setTableaus(), before calling "
358 "StepperIMEX_RK_Partition::initialize()\n");
360 Teuchos::RCP<WrapperModelEvaluatorPairPartIMEX_Basic<Scalar> >
361 wrapperModelPairIMEX =
363 (this->wrapperModel_);
364 TEUCHOS_TEST_FOR_EXCEPTION( wrapperModelPairIMEX == Teuchos::null,
366 "Error - Need to set the model, setModel(), before calling "
367 "StepperIMEX_RK_Partition::initialize()\n");
369 this->setTableaus(this->stepperPL_);
370 this->setParameterList(this->stepperPL_);
375 const int numStages = explicitTableau_->numStages();
376 stageF_.resize(numStages);
377 stageGx_.resize(numStages);
378 for(
int i=0; i < numStages; i++) {
379 stageF_[i] = Thyra::createMember(wrapperModelPairIMEX->
380 getExplicitModel()->get_f_space());
381 stageGx_[i] = Thyra::createMember(wrapperModelPairIMEX->
382 getImplicitModel()->get_f_space());
383 assign(stageF_[i].ptr(), Teuchos::ScalarTraits<Scalar>::zero());
384 assign(stageGx_[i].ptr(), Teuchos::ScalarTraits<Scalar>::zero());
387 xTilde_ = Thyra::createMember(wrapperModelPairIMEX->
388 getImplicitModel()->get_x_space());
389 assign(xTilde_.ptr(), Teuchos::ScalarTraits<Scalar>::zero());
393 template <
typename Scalar>
395 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
396 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & Y,
397 Scalar time, Scalar stepSize, Scalar stageNumber,
398 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G)
const
400 typedef Thyra::ModelEvaluatorBase MEB;
401 Teuchos::RCP<WrapperModelEvaluatorPairPartIMEX_Basic<Scalar> >
402 wrapperModelPairIMEX =
404 (this->wrapperModel_);
405 MEB::InArgs<Scalar> inArgs = wrapperModelPairIMEX->
getInArgs();
407 inArgs.set_p(wrapperModelPairIMEX->getParameterIndex(), Y);
408 if (inArgs.supports(MEB::IN_ARG_t)) inArgs.set_t(time);
409 if (inArgs.supports(MEB::IN_ARG_step_size)) inArgs.set_step_size(stepSize);
410 if (inArgs.supports(MEB::IN_ARG_stage_number))
411 inArgs.set_stage_number(stageNumber);
418 if (inArgs.supports(MEB::IN_ARG_x_dot)) inArgs.set_x_dot(Teuchos::null);
420 MEB::OutArgs<Scalar> outArgs = wrapperModelPairIMEX->getOutArgs();
423 wrapperModelPairIMEX->getImplicitModel()->evalModel(inArgs,outArgs);
424 Thyra::Vt_S(G.ptr(), -1.0);
428 template <
typename Scalar>
430 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & Z,
431 Scalar time, Scalar stepSize, Scalar stageNumber,
432 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F)
const
434 typedef Thyra::ModelEvaluatorBase MEB;
436 Teuchos::RCP<WrapperModelEvaluatorPairPartIMEX_Basic<Scalar> >
437 wrapperModelPairIMEX =
439 (this->wrapperModel_);
440 MEB::InArgs<Scalar> inArgs =
443 if (inArgs.supports(MEB::IN_ARG_t)) inArgs.set_t(time);
444 if (inArgs.supports(MEB::IN_ARG_step_size)) inArgs.set_step_size(stepSize);
445 if (inArgs.supports(MEB::IN_ARG_stage_number))
446 inArgs.set_stage_number(stageNumber);
453 if (inArgs.supports(MEB::IN_ARG_x_dot)) inArgs.set_x_dot(Teuchos::null);
455 MEB::OutArgs<Scalar> outArgs =
456 wrapperModelPairIMEX->getExplicitModel()->createOutArgs();
459 wrapperModelPairIMEX->getExplicitModel()->evalModel(inArgs, outArgs);
460 Thyra::Vt_S(F.ptr(), -1.0);
464 template<
class Scalar>
469 using Teuchos::SerialDenseMatrix;
470 using Teuchos::SerialDenseVector;
472 TEMPUS_FUNC_TIME_MONITOR(
"Tempus::StepperIMEX_RK_Partition::takeStep()");
476 "Error - StepperIMEX_RK_Partition<Scalar>::takeStep(...)\n"
477 "Need at least two SolutionStates for IMEX_RK_Partition.\n"
479 "Try setting in \"Solution History\" \"Storage Type\" = \"Undo\"\n"
480 " or \"Storage Type\" = \"Static\" and \"Storage Limit\" = \"2\"\n");
483 RCP<SolutionState<Scalar> > currentState=
solutionHistory->getCurrentState();
484 RCP<SolutionState<Scalar> > workingState=
solutionHistory->getWorkingState();
485 const Scalar dt = workingState->getTimeStep();
486 const Scalar time = currentState->getTime();
488 const int numStages = explicitTableau_->numStages();
489 const SerialDenseMatrix<int,Scalar> & AHat = explicitTableau_->A();
490 const SerialDenseVector<int,Scalar> & bHat = explicitTableau_->b();
491 const SerialDenseVector<int,Scalar> & cHat = explicitTableau_->c();
492 const SerialDenseMatrix<int,Scalar> & A = implicitTableau_->A();
493 const SerialDenseVector<int,Scalar> & b = implicitTableau_->b();
494 const SerialDenseVector<int,Scalar> & c = implicitTableau_->c();
496 Teuchos::RCP<WrapperModelEvaluatorPairPartIMEX_Basic<Scalar> >
497 wrapperModelPairIMEX =
499 (this->wrapperModel_);
502 Thyra::SolveStatus<Scalar> sStatus;
503 stageZ_ = workingState->getX();
504 Thyra::assign(stageZ_.ptr(), *(currentState->getX()));
505 RCP<Thyra::VectorBase<Scalar> > stageY =
506 wrapperModelPairIMEX->getExplicitOnlyVector(stageZ_);
507 RCP<Thyra::VectorBase<Scalar> > stageX =
508 wrapperModelPairIMEX->getIMEXVector(stageZ_);
511 for (
int i = 0; i < numStages; ++i) {
512 if (!Teuchos::is_null(stepperIMEX_RKPartObserver_))
513 stepperIMEX_RKPartObserver_->observeBeginStage(
solutionHistory, *
this);
515 Thyra::assign(stageY.ptr(),
516 *(wrapperModelPairIMEX->getExplicitOnlyVector(currentState->getX())));
517 Thyra::assign(xTilde_.ptr(),
518 *(wrapperModelPairIMEX->getIMEXVector(currentState->getX())));
519 for (
int j = 0; j < i; ++j) {
520 if (AHat(i,j) != Teuchos::ScalarTraits<Scalar>::zero()) {
521 RCP<Thyra::VectorBase<Scalar> > stageFy =
522 wrapperModelPairIMEX->getExplicitOnlyVector(stageF_[j]);
523 RCP<Thyra::VectorBase<Scalar> > stageFx =
524 wrapperModelPairIMEX->getIMEXVector(stageF_[j]);
525 Thyra::Vp_StV(stageY.ptr(), -dt*AHat(i,j), *stageFy);
526 Thyra::Vp_StV(xTilde_.ptr(), -dt*AHat(i,j), *stageFx);
528 if (A (i,j) != Teuchos::ScalarTraits<Scalar>::zero())
529 Thyra::Vp_StV(xTilde_.ptr(), -dt*A (i,j), *(stageGx_[j]));
532 Scalar ts = time + c(i)*dt;
533 Scalar tHats = time + cHat(i)*dt;
534 if (A(i,i) == Teuchos::ScalarTraits<Scalar>::zero()) {
536 bool isNeeded =
false;
537 for (
int k=i+1; k<numStages; ++k)
if (A(k,i) != 0.0) isNeeded =
true;
538 if (b(i) != 0.0) isNeeded =
true;
539 if (isNeeded ==
false) {
541 assign(stageGx_[i].ptr(), Teuchos::ScalarTraits<Scalar>::zero());
543 Thyra::assign(stageX.ptr(), *xTilde_);
544 if (!Teuchos::is_null(stepperIMEX_RKPartObserver_))
545 stepperIMEX_RKPartObserver_->
547 evalImplicitModelExplicitly(stageX, stageY, ts, dt, i, stageGx_[i]);
551 Scalar alpha = 1.0/(dt*A(i,i));
554 RCP<TimeDerivative<Scalar> > timeDer =
556 alpha, xTilde_.getConst()));
559 typedef Thyra::ModelEvaluatorBase MEB;
562 wrapperModelPairIMEX->setUseImplicitModel(
true);
563 MEB::InArgs<Scalar> inArgs = wrapperModelPairIMEX->createInArgs();
564 MEB::OutArgs<Scalar> outArgs = wrapperModelPairIMEX->createOutArgs();
565 inArgs.set_x(stageX);
566 if (wrapperModelPairIMEX->getParameterIndex() >= 0)
567 inArgs.set_p(wrapperModelPairIMEX->getParameterIndex(), stageY);
568 if (inArgs.supports(MEB::IN_ARG_x_dot)) inArgs.set_x_dot(stageGx_[i]);
569 if (inArgs.supports(MEB::IN_ARG_t )) inArgs.set_t (ts);
570 if (inArgs.supports(MEB::IN_ARG_step_size)) inArgs.set_step_size(dt);
571 if (inArgs.supports(MEB::IN_ARG_alpha )) inArgs.set_alpha (alpha);
572 if (inArgs.supports(MEB::IN_ARG_beta )) inArgs.set_beta (1.0);
573 if (inArgs.supports(MEB::IN_ARG_stage_number))
574 inArgs.set_stage_number(i);
576 wrapperModelPairIMEX->setForSolve(timeDer, inArgs, outArgs);
578 if (!Teuchos::is_null(stepperIMEX_RKPartObserver_))
579 stepperIMEX_RKPartObserver_->observeBeforeSolve(
solutionHistory, *
this);
581 this->solver_->setModel(wrapperModelPairIMEX);
582 sStatus = this->solveImplicitODE(stageX);
583 if (sStatus.solveStatus != Thyra::SOLVE_STATUS_CONVERGED) pass =
false;
585 wrapperModelPairIMEX->setUseImplicitModel(
false);
587 if (!Teuchos::is_null(stepperIMEX_RKPartObserver_))
588 stepperIMEX_RKPartObserver_->observeAfterSolve(
solutionHistory, *
this);
591 Thyra::V_StVpStV(stageGx_[i].ptr(), -alpha, *stageX, alpha, *xTilde_);
594 if (!Teuchos::is_null(stepperIMEX_RKPartObserver_))
595 stepperIMEX_RKPartObserver_->observeBeforeExplicit(
solutionHistory,*
this);
596 evalExplicitModel(stageZ_, tHats, dt, i, stageF_[i]);
597 if (!Teuchos::is_null(stepperIMEX_RKPartObserver_))
603 Thyra::assign((workingState->getX()).ptr(), *(currentState->getX()));
604 RCP<Thyra::VectorBase<Scalar> > Z = workingState->getX();
605 RCP<Thyra::VectorBase<Scalar> > X = wrapperModelPairIMEX->getIMEXVector(Z);
606 for (
int i=0; i < numStages; ++i) {
607 if (bHat(i) != Teuchos::ScalarTraits<Scalar>::zero())
608 Thyra::Vp_StV(Z.ptr(), -dt*bHat(i), *(stageF_[i]));
609 if (b (i) != Teuchos::ScalarTraits<Scalar>::zero())
610 Thyra::Vp_StV(X.ptr(), -dt*b (i), *(stageGx_[i]));
613 if (pass ==
true) workingState->setSolutionStatus(
Status::PASSED);
615 workingState->setOrder(this->getOrder());
627 template<
class Scalar>
628 Teuchos::RCP<Tempus::StepperState<Scalar> >
632 Teuchos::RCP<Tempus::StepperState<Scalar> > stepperState =
638 template<
class Scalar>
641 return(description_);
645 template<
class Scalar>
647 Teuchos::FancyOStream &out,
648 const Teuchos::EVerbosityLevel verbLevel)
const
650 out << description() <<
"::describe:" << std::endl
651 <<
"wrapperModelPairIMEX = " << this->wrapperModel_->description()
656 template <
class Scalar>
658 const Teuchos::RCP<Teuchos::ParameterList> & pList)
660 if (pList == Teuchos::null) {
662 if (this->stepperPL_ == Teuchos::null) this->stepperPL_ = this->getDefaultParameters();
664 this->stepperPL_ = pList;
671 template<
class Scalar>
672 Teuchos::RCP<const Teuchos::ParameterList>
675 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
676 pl->setName(
"Default Stepper - IMEX RK SSP2");
677 pl->set(
"Stepper Type",
"IMEX RK SSP2");
678 pl->set(
"Zero Initial Guess",
false);
679 pl->set(
"Solver Name",
"",
680 "Name of ParameterList containing the solver specifications.");
685 template <
class Scalar>
686 Teuchos::RCP<Teuchos::ParameterList>
689 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
690 pl->setName(
"Default Stepper - IMEX RK SSP2");
691 pl->set<std::string>(
"Stepper Type",
"IMEX RK SSP2");
692 pl->set<
bool> (
"Zero Initial Guess",
false);
693 pl->set<std::string>(
"Solver Name",
"Default Solver");
694 Teuchos::RCP<Teuchos::ParameterList> solverPL=this->defaultSolverParameters();
695 pl->set(
"Default Solver", *solverPL);
700 template <
class Scalar>
701 Teuchos::RCP<Teuchos::ParameterList>
704 return(this->stepperPL_);
708 template <
class Scalar>
709 Teuchos::RCP<Teuchos::ParameterList>
712 Teuchos::RCP<Teuchos::ParameterList> temp_plist = this->stepperPL_;
713 this->stepperPL_ = Teuchos::null;
719 #endif // Tempus_StepperIMEX_RK_Partition_impl_hpp