9 #ifndef Tempus_StepperIMEX_RK_impl_hpp
10 #define Tempus_StepperIMEX_RK_impl_hpp
12 #include "Tempus_config.hpp"
14 #include "Tempus_WrapperModelEvaluatorPairIMEX_Basic.hpp"
15 #include "Teuchos_VerboseObjectParameterListHelpers.hpp"
16 #include "Thyra_VectorStdOps.hpp"
17 #include "NOX_Thyra.H"
23 template<
class Scalar>
class StepperFactory;
26 template<
class Scalar>
29 this->setStepperType(
"IMEX RK SSP2");
30 this->setUseFSAL( this->getUseFSALDefault());
31 this->setICConsistency( this->getICConsistencyDefault());
32 this->setICConsistencyCheck( this->getICConsistencyCheckDefault());
33 this->setZeroInitialGuess(
false);
35 this->setTableaus(
"IMEX RK SSP2");
40 template<
class Scalar>
42 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel,
44 const Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> >& solver,
46 std::string ICConsistency,
47 bool ICConsistencyCheck,
48 bool zeroInitialGuess,
49 std::string stepperType,
54 this->setStepperType( stepperType);
55 this->setUseFSAL( useFSAL);
56 this->setICConsistency( ICConsistency);
57 this->setICConsistencyCheck( ICConsistencyCheck);
58 this->setZeroInitialGuess( zeroInitialGuess);
60 this->setExplicitTableau(explicitTableau);
61 this->setImplicitTableau(implicitTableau);
62 this->setOrder(order);
63 this->setObserver(obs);
65 if (appModel != Teuchos::null) {
67 this->setModel(appModel);
68 this->setSolver(solver);
74 template<
class Scalar>
79 if (stepperType ==
"") stepperType =
"IMEX RK SSP2";
81 if (stepperType ==
"IMEX RK 1st order") {
84 typedef Teuchos::ScalarTraits<Scalar> ST;
86 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
87 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
88 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
89 const Scalar one = ST::one();
90 const Scalar zero = ST::zero();
93 A(0,0) = zero; A(0,1) = zero;
94 A(1,0) = one; A(1,1) = zero;
97 b(0) = one; b(1) = zero;
100 c(0) = zero; c(1) = one;
105 "Explicit Tableau - IMEX RK 1st order",
106 A,b,c,order,order,order));
108 this->setExplicitTableau(explicitTableau);
112 typedef Teuchos::ScalarTraits<Scalar> ST;
114 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
115 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
116 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
117 const Scalar one = ST::one();
118 const Scalar zero = ST::zero();
121 A(0,0) = zero; A(0,1) = zero;
122 A(1,0) = zero; A(1,1) = one;
125 b(0) = zero; b(1) = one;
128 c(0) = zero; c(1) = one;
133 "Implicit Tableau - IMEX RK 1st order",
134 A,b,c,order,order,order));
136 this->setImplicitTableau(implicitTableau);
138 this->setStepperType(
"IMEX RK 1st order");
141 }
else if (stepperType ==
"IMEX RK SSP2") {
144 this->setExplicitTableau(stepperERK->getTableau());
148 stepperSDIRK->setGammaType(
"2nd Order L-stable");
149 this->setImplicitTableau(stepperSDIRK->getTableau());
151 this->setStepperType(
"IMEX RK SSP2");
153 }
else if (stepperType ==
"IMEX RK ARS 233") {
154 typedef Teuchos::ScalarTraits<Scalar> ST;
156 Teuchos::SerialDenseMatrix<int,Scalar> A(NumStages,NumStages);
157 Teuchos::SerialDenseVector<int,Scalar> b(NumStages);
158 Teuchos::SerialDenseVector<int,Scalar> c(NumStages);
159 const Scalar one = ST::one();
160 const Scalar zero = ST::zero();
161 const Scalar onehalf = ST::one()/(2*ST::one());
162 const Scalar gamma = (3*one+ST::squareroot(3*one))/(6*one);
166 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero;
167 A(1,0) = gamma; A(1,1) = zero; A(1,2) = zero;
168 A(2,0) = (gamma-1.0); A(2,1) = (2.0-2.0*gamma); A(2,2) = zero;
171 b(0) = zero; b(1) = onehalf; b(2) = onehalf;
174 c(0) = zero; c(1) = gamma; c(2) = one-gamma;
179 "Partition IMEX-RK Explicit Stepper",A,b,c,order,order,order));
181 this->setExplicitTableau(explicitTableau);
186 A(0,0) = zero; A(0,1) = zero; A(0,2) = zero;
187 A(1,0) = zero; A(1,1) = gamma; A(1,2) = zero;
188 A(2,0) = zero; A(2,1) = (1.0-2.0*gamma); A(2,2) = gamma;
191 b(0) = zero; b(1) = onehalf; b(2) = onehalf;
194 c(0) = zero; c(1) = gamma; c(2) = one-gamma;
199 "Partition IMEX-RK Implicit Stepper",A,b,c,order,order,order));
201 this->setImplicitTableau(implicitTableau);
203 this->setStepperType(
"IMEX RK ARS 233");
206 }
else if (stepperType ==
"General IMEX RK") {
207 this->setExplicitTableau(explicitTableau);
208 this->setImplicitTableau(implicitTableau);
209 this->setStepperType(
"General IMEX RK");
213 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
214 "Error - Not a valid StepperIMEX_RK type! Stepper Type = "
215 << stepperType <<
"\n"
216 <<
" Current valid types are: " <<
"\n"
217 <<
" 'IMEX RK 1st order'" <<
"\n"
218 <<
" 'IMEX RK SSP2'" <<
"\n"
219 <<
" 'IMEX RK ARS 233'" <<
"\n"
220 <<
" 'General IMEX RK'" <<
"\n");
223 TEUCHOS_TEST_FOR_EXCEPTION(explicitTableau_==Teuchos::null,
225 "Error - StepperIMEX_RK - Explicit tableau is null!");
226 TEUCHOS_TEST_FOR_EXCEPTION(implicitTableau_==Teuchos::null,
228 "Error - StepperIMEX_RK - Implicit tableau is null!");
229 TEUCHOS_TEST_FOR_EXCEPTION(
230 explicitTableau_->numStages()!=implicitTableau_->numStages(),
232 "Error - StepperIMEX_RK - Number of stages do not match!\n"
233 <<
" Explicit tableau = " << explicitTableau_->description() <<
"\n"
234 <<
" number of stages = " << explicitTableau_->numStages() <<
"\n"
235 <<
" Implicit tableau = " << implicitTableau_->description() <<
"\n"
236 <<
" number of stages = " << implicitTableau_->numStages() <<
"\n");
240 template<
class Scalar>
244 TEUCHOS_TEST_FOR_EXCEPTION(explicitTableau->isImplicit() ==
true,
246 "Error - Received an implicit Tableau for setExplicitTableau()!\n" <<
247 " Tableau = " << explicitTableau->description() <<
"\n");
248 explicitTableau_ = explicitTableau;
252 template<
class Scalar>
256 TEUCHOS_TEST_FOR_EXCEPTION( implicitTableau->isDIRK() !=
true,
258 "Error - Did not receive a DIRK Tableau for setImplicitTableau()!\n" <<
259 " Tableau = " << implicitTableau->description() <<
"\n");
260 implicitTableau_ = implicitTableau;
263 template<
class Scalar>
265 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& appModel)
268 using Teuchos::rcp_const_cast;
269 using Teuchos::rcp_dynamic_cast;
270 RCP<Thyra::ModelEvaluator<Scalar> > ncModel =
271 rcp_const_cast<Thyra::ModelEvaluator<Scalar> > (appModel);
272 RCP<WrapperModelEvaluatorPairIMEX_Basic<Scalar> > modelPairIMEX =
274 TEUCHOS_TEST_FOR_EXCEPTION( modelPairIMEX == Teuchos::null, std::logic_error,
275 "Error - StepperIMEX_RK::setModel() was given a ModelEvaluator that\n"
276 " could not be cast to a WrapperModelEvaluatorPairIMEX_Basic!\n"
277 " From: " << appModel <<
"\n"
278 " To : " << modelPairIMEX <<
"\n"
279 " Likely have given the wrong ModelEvaluator to this Stepper.\n");
281 setModelPair(modelPairIMEX);
290 template<
class Scalar>
295 Teuchos::RCP<WrapperModelEvaluatorPairIMEX<Scalar> > wrapperModelPairIMEX =
297 this->wrapperModel_);
300 wrapperModelPairIMEX = modelPairIMEX;
301 wrapperModelPairIMEX->initialize();
302 int expXDim = wrapperModelPairIMEX->getExplicitModel()->get_x_space()->dim();
303 int impXDim = wrapperModelPairIMEX->getImplicitModel()->get_x_space()->dim();
304 TEUCHOS_TEST_FOR_EXCEPTION( expXDim != impXDim, std::logic_error,
306 " Explicit and Implicit x vectors are incompatible!\n"
307 " Explicit vector dim = " << expXDim <<
"\n"
308 " Implicit vector dim = " << impXDim <<
"\n");
310 this->wrapperModel_ = wrapperModelPairIMEX;
318 template<
class Scalar>
320 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& explicitModel,
321 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> >& implicitModel)
325 this->wrapperModel_ = Teuchos::rcp(
327 explicitModel, implicitModel));
331 template<
class Scalar>
336 if (this->stepperObserver_ == Teuchos::null)
337 this->stepperObserver_ =
340 if (( obs == Teuchos::null ) and (this->stepperObserver_->getSize() >0 ) )
343 if (( obs == Teuchos::null ) and (this->stepperObserver_->getSize() == 0) )
348 this->stepperObserver_->addObserver(
351 Teuchos::RCP<Teuchos::FancyOStream> out = this->getOStream();
352 Teuchos::OSTab ostab(out,0,
"setObserver");
353 *out <<
"Tempus::StepperIMEX_RK::setObserver: Warning: An observer has been provided that";
354 *out <<
" does not support Tempus::StepperRKObserver. This observer WILL NOT be added.";
355 *out <<
" In the future, this will result in a runtime error!" << std::endl;
362 template<
class Scalar>
365 TEUCHOS_TEST_FOR_EXCEPTION(
366 (explicitTableau_ == Teuchos::null) || (implicitTableau_ == Teuchos::null),
368 "Error - Need to set the Butcher Tableaus, setTableaus(), before calling "
369 "StepperIMEX_RK::initialize()\n");
371 TEUCHOS_TEST_FOR_EXCEPTION( this->wrapperModel_ == Teuchos::null,
373 "Error - Need to set the model, setModel(), before calling "
374 "StepperIMEX_RK::initialize()\n");
377 const int numStages = explicitTableau_->numStages();
378 stageF_.resize(numStages);
379 stageG_.resize(numStages);
380 for(
int i=0; i < numStages; i++) {
381 stageF_[i] = Thyra::createMember(this->wrapperModel_->get_f_space());
382 stageG_[i] = Thyra::createMember(this->wrapperModel_->get_f_space());
383 assign(stageF_[i].ptr(), Teuchos::ScalarTraits<Scalar>::zero());
384 assign(stageG_[i].ptr(), Teuchos::ScalarTraits<Scalar>::zero());
387 xTilde_ = Thyra::createMember(this->wrapperModel_->get_x_space());
388 assign(xTilde_.ptr(), Teuchos::ScalarTraits<Scalar>::zero());
392 template<
class Scalar>
400 TEUCHOS_TEST_FOR_EXCEPTION(numStates < 1, std::logic_error,
401 "Error - setInitialConditions() needs at least one SolutionState\n"
402 " to set the initial condition. Number of States = " << numStates);
405 RCP<Teuchos::FancyOStream> out = this->getOStream();
406 Teuchos::OSTab ostab(out,1,
"StepperIMEX_RK::setInitialConditions()");
407 *out <<
"Warning -- SolutionHistory has more than one state!\n"
408 <<
"Setting the initial conditions on the currentState.\n"<<std::endl;
411 RCP<SolutionState<Scalar> > initialState =
solutionHistory->getCurrentState();
412 RCP<Thyra::VectorBase<Scalar> > x = initialState->getX();
415 auto inArgs = this->wrapperModel_->getNominalValues();
416 if (x == Teuchos::null) {
417 TEUCHOS_TEST_FOR_EXCEPTION( (x == Teuchos::null) &&
418 (inArgs.get_x() == Teuchos::null), std::logic_error,
419 "Error - setInitialConditions() needs the ICs from the SolutionHistory\n"
420 " or getNominalValues()!\n");
422 x = Teuchos::rcp_const_cast<Thyra::VectorBase<Scalar> >(inArgs.get_x());
423 initialState->setX(x);
427 std::string icConsistency = this->getICConsistency();
428 TEUCHOS_TEST_FOR_EXCEPTION(icConsistency !=
"None", std::logic_error,
429 "Error - setInitialConditions() requested a consistency of '"
430 << icConsistency <<
"'.\n"
431 " But only 'None' is available for IMEX-RK!\n");
433 TEUCHOS_TEST_FOR_EXCEPTION( this->getUseFSAL(), std::logic_error,
434 "Error - The First-Step-As-Last (FSAL) principle is not "
435 <<
"available for IMEX-RK. Set useFSAL=false.\n");
439 template <
typename Scalar>
441 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
442 Scalar time, Scalar stepSize, Scalar stageNumber,
443 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & G)
const
445 typedef Thyra::ModelEvaluatorBase MEB;
446 Teuchos::RCP<WrapperModelEvaluatorPairIMEX<Scalar> > wrapperModelPairIMEX =
448 this->wrapperModel_);
449 MEB::InArgs<Scalar> inArgs = wrapperModelPairIMEX->
getInArgs();
451 if (inArgs.supports(MEB::IN_ARG_t)) inArgs.set_t(time);
452 if (inArgs.supports(MEB::IN_ARG_step_size)) inArgs.set_step_size(stepSize);
453 if (inArgs.supports(MEB::IN_ARG_stage_number))
454 inArgs.set_stage_number(stageNumber);
461 if (inArgs.supports(MEB::IN_ARG_x_dot)) inArgs.set_x_dot(Teuchos::null);
463 MEB::OutArgs<Scalar> outArgs = wrapperModelPairIMEX->getOutArgs();
466 wrapperModelPairIMEX->getImplicitModel()->evalModel(inArgs,outArgs);
467 Thyra::Vt_S(G.ptr(), -1.0);
471 template <
typename Scalar>
473 const Teuchos::RCP<
const Thyra::VectorBase<Scalar> > & X,
474 Scalar time, Scalar stepSize, Scalar stageNumber,
475 const Teuchos::RCP<Thyra::VectorBase<Scalar> > & F)
const
477 typedef Thyra::ModelEvaluatorBase MEB;
479 Teuchos::RCP<WrapperModelEvaluatorPairIMEX<Scalar> > wrapperModelPairIMEX =
481 this->wrapperModel_);
482 MEB::InArgs<Scalar> inArgs =
485 if (inArgs.supports(MEB::IN_ARG_t)) inArgs.set_t(time);
486 if (inArgs.supports(MEB::IN_ARG_step_size)) inArgs.set_step_size(stepSize);
487 if (inArgs.supports(MEB::IN_ARG_stage_number))
488 inArgs.set_stage_number(stageNumber);
495 if (inArgs.supports(MEB::IN_ARG_x_dot)) inArgs.set_x_dot(Teuchos::null);
497 MEB::OutArgs<Scalar> outArgs =
498 wrapperModelPairIMEX->getExplicitModel()->createOutArgs();
501 wrapperModelPairIMEX->getExplicitModel()->evalModel(inArgs, outArgs);
502 Thyra::Vt_S(F.ptr(), -1.0);
506 template<
class Scalar>
511 using Teuchos::SerialDenseMatrix;
512 using Teuchos::SerialDenseVector;
514 TEMPUS_FUNC_TIME_MONITOR(
"Tempus::StepperIMEX_RK::takeStep()");
518 "Error - StepperIMEX_RK<Scalar>::takeStep(...)\n"
519 "Need at least two SolutionStates for IMEX_RK.\n"
521 "Try setting in \"Solution History\" \"Storage Type\" = \"Undo\"\n"
522 " or \"Storage Type\" = \"Static\" and \"Storage Limit\" = \"2\"\n");
525 RCP<SolutionState<Scalar> > currentState=
solutionHistory->getCurrentState();
526 RCP<SolutionState<Scalar> > workingState=
solutionHistory->getWorkingState();
527 const Scalar dt = workingState->getTimeStep();
528 const Scalar time = currentState->getTime();
530 const int numStages = explicitTableau_->numStages();
531 const SerialDenseMatrix<int,Scalar> & AHat = explicitTableau_->A();
532 const SerialDenseVector<int,Scalar> & bHat = explicitTableau_->b();
533 const SerialDenseVector<int,Scalar> & cHat = explicitTableau_->c();
534 const SerialDenseMatrix<int,Scalar> & A = implicitTableau_->A();
535 const SerialDenseVector<int,Scalar> & b = implicitTableau_->b();
536 const SerialDenseVector<int,Scalar> & c = implicitTableau_->c();
539 stageX_ = workingState->getX();
540 Thyra::assign(stageX_.ptr(), *(currentState->getX()));
543 for (
int i = 0; i < numStages; ++i) {
545 Thyra::assign(xTilde_.ptr(), *(currentState->getX()));
546 for (
int j = 0; j < i; ++j) {
547 if (AHat(i,j) != Teuchos::ScalarTraits<Scalar>::zero())
548 Thyra::Vp_StV(xTilde_.ptr(), -dt*AHat(i,j), *(stageF_[j]));
549 if (A (i,j) != Teuchos::ScalarTraits<Scalar>::zero())
550 Thyra::Vp_StV(xTilde_.ptr(), -dt*A (i,j), *(stageG_[j]));
553 Scalar ts = time + c(i)*dt;
554 Scalar tHats = time + cHat(i)*dt;
555 if (A(i,i) == Teuchos::ScalarTraits<Scalar>::zero()) {
557 bool isNeeded =
false;
558 for (
int k=i+1; k<numStages; ++k)
if (A(k,i) != 0.0) isNeeded =
true;
559 if (b(i) != 0.0) isNeeded =
true;
560 if (isNeeded ==
false) {
562 assign(stageG_[i].ptr(), Teuchos::ScalarTraits<Scalar>::zero());
564 Thyra::assign(stageX_.ptr(), *xTilde_);
565 this->stepperObserver_->observeBeforeImplicitExplicitly(
solutionHistory, *
this);
566 evalImplicitModelExplicitly(stageX_, ts, dt, i, stageG_[i]);
570 const Scalar alpha = Scalar(1.0)/(dt*A(i,i));
571 const Scalar beta = Scalar(1.0);
574 Teuchos::RCP<TimeDerivative<Scalar> > timeDer =
576 alpha, xTilde_.getConst()));
583 const Thyra::SolveStatus<Scalar> sStatus =
584 this->solveImplicitODE(stageX_, stageG_[i], ts, p);
586 if (sStatus.solveStatus != Thyra::SOLVE_STATUS_CONVERGED) pass =
false;
591 Thyra::V_StVpStV(stageG_[i].ptr(), -alpha, *stageX_, alpha, *xTilde_);
595 evalExplicitModel(stageX_, tHats, dt, i, stageF_[i]);
600 Thyra::assign((workingState->getX()).ptr(), *(currentState->getX()));
601 for (
int i=0; i < numStages; ++i) {
602 if (bHat(i) != Teuchos::ScalarTraits<Scalar>::zero())
603 Thyra::Vp_StV((workingState->getX()).ptr(), -dt*bHat(i), *(stageF_[i]));
604 if (b (i) != Teuchos::ScalarTraits<Scalar>::zero())
605 Thyra::Vp_StV((workingState->getX()).ptr(), -dt*b (i), *(stageG_[i]));
608 if (pass ==
true) workingState->setSolutionStatus(
Status::PASSED);
610 workingState->setOrder(this->getOrder());
622 template<
class Scalar>
623 Teuchos::RCP<Tempus::StepperState<Scalar> >
627 Teuchos::RCP<Tempus::StepperState<Scalar> > stepperState =
633 template<
class Scalar>
635 Teuchos::FancyOStream &out,
636 const Teuchos::EVerbosityLevel )
const
638 Teuchos::RCP<WrapperModelEvaluatorPairIMEX<Scalar> > wrapperModelPairIMEX =
640 this->wrapperModel_);
641 out << this->getStepperType() <<
"::describe:" << std::endl
642 <<
"wrapperModelPairIMEX = " << wrapperModelPairIMEX->description()
647 template<
class Scalar>
648 Teuchos::RCP<const Teuchos::ParameterList>
651 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
653 pl->set<
bool>(
"Initial Condition Consistency Check",
654 this->getICConsistencyCheckDefault());
655 pl->set<std::string>(
"Solver Name",
"Default Solver");
656 pl->set<
bool> (
"Zero Initial Guess",
false);
658 pl->set(
"Default Solver", *solverPL);
665 #endif // Tempus_StepperIMEX_RK_impl_hpp
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setImplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau)
Set the implicit tableau from tableau.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
ModelEvaluator pair for implicit and explicit (IMEX) evaulations.
virtual void setExplicitTableau(Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau)
Set the explicit tableau from tableau.
ModelEvaluator pair for implicit and explicit (IMEX) evaluations.
Teuchos::RCP< Teuchos::ParameterList > defaultSolverParameters()
Returns the default solver ParameterList for implicit Steppers.
void validExplicitODE(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model)
Validate that the model supports explicit ODE evaluation, f(x,t) [=xdot].
virtual void setModelPair(const Teuchos::RCP< WrapperModelEvaluatorPairIMEX_Basic< Scalar > > &mePair)
Create WrapperModelPairIMEX from user-supplied ModelEvaluator pair.
StepperState is a simple class to hold state information about the stepper.
virtual Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getExplicitModel() const =0
virtual void takeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Take the specified timestep, dt, and return true if successful.
StepperIMEX_RK()
Default constructor.
virtual void initialize()
Initialize during construction and after changing input parameters.
virtual Thyra::ModelEvaluatorBase::InArgs< Scalar > getInArgs()=0
Get InArgs the wrapper ModelEvalutor.
void evalExplicitModel(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &F) const
StepperObserver class for Stepper class.
Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
Nonmember constructor.
virtual void setTableaus(std::string stepperType="", Teuchos::RCP< const RKButcherTableau< Scalar > > explicitTableau=Teuchos::null, Teuchos::RCP< const RKButcherTableau< Scalar > > implicitTableau=Teuchos::null)
Set both the explicit and implicit tableau from ParameterList.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual void setObserver(Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
Set Observer.
void evalImplicitModelExplicitly(const Teuchos::RCP< const Thyra::VectorBase< Scalar > > &X, Scalar time, Scalar stepSize, Scalar stageNumber, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &G) const
virtual void setInitialConditions(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
Set the initial conditions and make them consistent.
virtual Teuchos::RCP< Tempus::StepperState< Scalar > > getDefaultStepperState()
Provide a StepperState to the SolutionState. This Stepper does not have any special state data...
This observer is a composite observer,.
StepperRKObserver class for StepperRK.
Time-derivative interface for IMEX RK.
virtual void setModel(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
void validImplicitODE_DAE(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model)
Validate ME supports implicit ODE/DAE evaluation, f(xdot,x,t) [= 0].
Solve for x and determine xDot from x.
void getValidParametersBasic(Teuchos::RCP< Teuchos::ParameterList > pl, std::string stepperType)
Provide basic parameters to Steppers.