29 #ifndef Rythmos_BACKWARD_EULER_STEPPER_DEF_H 30 #define Rythmos_BACKWARD_EULER_STEPPER_DEF_H 32 #include "Rythmos_BackwardEulerStepper_decl.hpp" 33 #include "Rythmos_DataStore.hpp" 34 #include "Rythmos_LinearInterpolator.hpp" 35 #include "Rythmos_InterpolatorBaseHelpers.hpp" 36 #include "Rythmos_StepperHelpers.hpp" 38 #include "Thyra_ModelEvaluatorHelpers.hpp" 39 #include "Thyra_AssertOp.hpp" 40 #include "Thyra_TestingTools.hpp" 42 #include "Teuchos_VerboseObjectParameterListHelpers.hpp" 43 #include "Teuchos_as.hpp" 48 template<
class Scalar>
49 RCP<BackwardEulerStepper<Scalar> >
51 const RCP<Thyra::ModelEvaluator<Scalar> >& model,
52 const RCP<Thyra::NonlinearSolverBase<Scalar> >& solver
58 template<
class Scalar>
59 RCP<BackwardEulerStepper<Scalar> >
60 backwardEulerStepper()
73 template<
class Scalar>
76 typedef Teuchos::ScalarTraits<Scalar> ST;
77 this->defaultInitializeAll_();
83 template<
class Scalar>
85 const RCP<Thyra::ModelEvaluator<Scalar> >& model,
86 const RCP<Thyra::NonlinearSolverBase<Scalar> >& solver
89 typedef Teuchos::ScalarTraits<Scalar> ST;
90 this->defaultInitializeAll_();
97 template<
class Scalar>
100 typedef Teuchos::ScalarTraits<Scalar> ST;
101 isInitialized_ =
false;
102 haveInitialCondition_ =
false;
103 model_ = Teuchos::null;
104 solver_ = Teuchos::null;
105 scaled_x_old_ = Teuchos::null;
106 x_dot_old_ = Teuchos::null;
109 x_dot_ = Teuchos::null;
114 neModel_ = Teuchos::null;
115 parameterList_ = Teuchos::null;
116 interpolator_ = Teuchos::null;
121 template<
class Scalar>
126 #ifdef HAVE_RYTHMOS_DEBUG 127 TEUCHOS_TEST_FOR_EXCEPT(is_null(interpolator));
129 interpolator_ = interpolator;
130 isInitialized_ =
false;
133 template<
class Scalar>
134 RCP<InterpolatorBase<Scalar> >
137 return interpolator_;
140 template<
class Scalar>
141 RCP<const InterpolatorBase<Scalar> >
144 return interpolator_;
147 template<
class Scalar>
148 RCP<InterpolatorBase<Scalar> >
151 RCP<InterpolatorBase<Scalar> > temp_interpolator = interpolator_;
152 interpolator_ = Teuchos::null;
153 return(temp_interpolator);
154 isInitialized_ =
false;
161 template<
class Scalar>
163 const RCP<Thyra::NonlinearSolverBase<Scalar> > &solver
168 TEUCHOS_TEST_FOR_EXCEPTION(solver == Teuchos::null, std::logic_error,
169 "Error! Thyra::NonlinearSolverBase RCP passed in through BackwardEulerStepper::setSolver is null!" 172 RCP<Teuchos::FancyOStream> out = this->getOStream();
173 Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
174 Teuchos::OSTab ostab(out,1,
"BES::setSolver");
175 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH) ) {
176 *out <<
"solver = " << solver->description() << std::endl;
181 isInitialized_ =
false;
186 template<
class Scalar>
187 RCP<Thyra::NonlinearSolverBase<Scalar> >
194 template<
class Scalar>
195 RCP<const Thyra::NonlinearSolverBase<Scalar> >
205 template<
class Scalar>
212 template<
class Scalar>
213 RCP<StepperBase<Scalar> >
216 RCP<BackwardEulerStepper<Scalar> >
218 stepper->isInitialized_ = isInitialized_;
219 stepper->model_ = model_;
220 if (!is_null(solver_))
221 stepper->solver_ = solver_->cloneNonlinearSolver().assert_not_null();
223 stepper->x_ = x_->clone_v().assert_not_null();
224 if (!is_null(scaled_x_old_))
225 stepper->scaled_x_old_ = scaled_x_old_->clone_v().assert_not_null();
227 stepper->t_old_ = t_old_;
229 stepper->numSteps_ = numSteps_;
230 if (!is_null(neModel_))
233 if (!is_null(parameterList_))
234 stepper->parameterList_ = parameterList(*parameterList_);
235 if (!is_null(interpolator_))
236 stepper->interpolator_
237 = interpolator_->cloneInterpolator().assert_not_null();
241 template<
class Scalar>
247 template<
class Scalar>
249 const RCP<
const Thyra::ModelEvaluator<Scalar> >& model
255 TEUCHOS_TEST_FOR_EXCEPT( is_null(model) );
256 assertValidModel( *
this, *model );
258 RCP<Teuchos::FancyOStream> out = this->getOStream();
259 Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
260 Teuchos::OSTab ostab(out,1,
"BES::setModel");
261 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH) ) {
262 *out <<
"model = " << model->description() << std::endl;
279 template<
class Scalar>
281 const RCP<Thyra::ModelEvaluator<Scalar> >& model
284 this->setModel(model);
287 template<
class Scalar>
288 RCP<const Thyra::ModelEvaluator<Scalar> >
295 template<
class Scalar>
296 RCP<Thyra::ModelEvaluator<Scalar> >
299 return Teuchos::null;
303 template<
class Scalar>
305 const Thyra::ModelEvaluatorBase::InArgs<Scalar> &initialCondition
309 typedef Teuchos::ScalarTraits<Scalar> ST;
310 typedef Thyra::ModelEvaluatorBase MEB;
312 basePoint_ = initialCondition;
316 RCP<const Thyra::VectorBase<Scalar> >
317 x_init = initialCondition.get_x();
319 #ifdef HAVE_RYTHMOS_DEBUG 320 TEUCHOS_TEST_FOR_EXCEPTION(
321 is_null(x_init), std::logic_error,
322 "Error, if the client passes in an intial condition to setInitialCondition(...),\n" 323 "then x can not be null!" );
326 x_ = x_init->clone_v();
330 RCP<const Thyra::VectorBase<Scalar> >
331 x_dot_init = initialCondition.get_x_dot();
333 if (!is_null(x_dot_init)) {
334 x_dot_ = x_dot_init->clone_v();
337 x_dot_ = createMember(x_->space());
338 assign(x_dot_.ptr(),ST::zero());
343 t_ = initialCondition.get_t();
349 scaled_x_old_ = x_->clone_v();
353 x_dot_old_ = x_dot_->clone_v();
356 haveInitialCondition_ =
true;
361 template<
class Scalar>
362 Thyra::ModelEvaluatorBase::InArgs<Scalar>
369 template<
class Scalar>
374 using Teuchos::incrVerbLevel;
375 typedef Teuchos::ScalarTraits<Scalar> ST;
376 typedef Thyra::NonlinearSolverBase<Scalar> NSB;
377 typedef Teuchos::VerboseObjectTempState<NSB> VOTSNSB;
381 RCP<Teuchos::FancyOStream> out = this->getOStream();
382 Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
383 Teuchos::OSTab ostab(out,1,
"BES::takeStep");
384 VOTSNSB solver_outputTempState(solver_,out,incrVerbLevel(verbLevel,-1));
386 if ( !is_null(out) && as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW) ) {
388 <<
"\nEntering " << Teuchos::TypeNameTraits<BackwardEulerStepper<Scalar> >::name()
389 <<
"::takeStep("<<dt<<
","<<toString(stepSizeType)<<
") ...\n";
394 if ((stepSizeType == STEP_TYPE_VARIABLE) || (dt == ST::zero())) {
395 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW) )
396 *out <<
"\nThe arguments to takeStep are not valid for BackwardEulerStepper at this time." << std::endl;
398 return(Scalar(-ST::one()));
400 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH) ) {
401 *out <<
"\ndt = " << dt << std::endl;
411 V_StV( scaled_x_old_.ptr(), Scalar(-ST::one()/dt), *x_ );
413 if(!neModel_.get()) {
416 neModel_->initializeSingleResidualModel(
418 Scalar(ST::one()/dt), scaled_x_old_,
419 ST::one(), Teuchos::null,
423 if( solver_->getModel().get() != neModel_.get() ) {
424 solver_->setModel(neModel_);
433 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW) ) {
434 *out <<
"\nSolving the implicit backward-Euler timestep equation ...\n";
437 Thyra::SolveStatus<Scalar>
438 neSolveStatus = solver_->solve(&*x_);
444 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW) ) {
445 *out <<
"\nOutput status of nonlinear solve:\n" << neSolveStatus;
457 assign( x_dot_old_.ptr(), *x_dot_ );
460 V_StV( x_dot_.ptr(), Scalar(ST::one()/dt), *x_ );
461 Vp_StV( x_dot_.ptr(), Scalar(ST::one()), *scaled_x_old_ );
467 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH) ) {
468 *out <<
"\nt_old_ = " << t_old_ << std::endl;
469 *out <<
"\nt_ = " << t_ << std::endl;
472 #ifdef HAVE_RYTHMOS_DEBUG 475 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
476 *out <<
"\nChecking to make sure that solution and the interpolated solution are the same! ...\n";
480 typedef ScalarTraits<Scalar> ST;
481 typedef ScalarTraits<ScalarMag> SMT;
483 Teuchos::OSTab tab(out);
487 RCP<const Thyra::VectorBase<Scalar> >
491 Array<Scalar> time_vec = Teuchos::tuple(stepStatus.
time);
492 Array<RCP<const Thyra::VectorBase<Scalar> > > x_vec, xdot_vec;
493 this->getPoints(time_vec,&x_vec,&xdot_vec,0);
495 RCP<const Thyra::VectorBase<Scalar> >
497 xdot_interp = xdot_vec[0];
499 TEUCHOS_TEST_FOR_EXCEPT(
500 !Thyra::testRelNormDiffErr(
501 "x", *x,
"x_interp", *x_interp,
502 "2*epsilon",
ScalarMag(100.0*SMT::eps()),
503 "2*epsilon",
ScalarMag(100.0*SMT::eps()),
504 includesVerbLevel(verbLevel,Teuchos::VERB_HIGH) ? out.get() : 0
508 TEUCHOS_TEST_FOR_EXCEPT(
509 !Thyra::testRelNormDiffErr(
510 "xdot", *xdot,
"xdot_interp", *xdot_interp,
511 "2*epsilon",
ScalarMag(100.0*SMT::eps()),
512 "2*epsilon",
ScalarMag(100.0*SMT::eps()),
513 includesVerbLevel(verbLevel,Teuchos::VERB_HIGH) ? out.get() : 0
522 #endif // HAVE_RYTHMOS_DEBUG 524 if ( !is_null(out) && as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW) ) {
526 <<
"\nLeaving " << Teuchos::TypeNameTraits<BackwardEulerStepper<Scalar> >::name()
527 <<
"::takeStep(...) ...\n";
535 template<
class Scalar>
539 typedef Teuchos::ScalarTraits<Scalar> ST;
543 if (!isInitialized_) {
544 stepStatus.
stepStatus = STEP_STATUS_UNINITIALIZED;
546 else if (numSteps_ > 0) {
547 stepStatus.
stepStatus = STEP_STATUS_CONVERGED;
552 stepStatus.
order = 1;
553 stepStatus.
time = t_;
565 template<
class Scalar>
566 RCP<const Thyra::VectorSpaceBase<Scalar> >
569 return ( !is_null(model_) ? model_->get_x_space() : Teuchos::null );
573 template<
class Scalar>
575 const Array<Scalar>& time_vec,
576 const Array<RCP<
const Thyra::VectorBase<Scalar> > >& x_vec,
577 const Array<RCP<
const Thyra::VectorBase<Scalar> > >& xdot_vec
581 typedef Teuchos::ScalarTraits<Scalar> ST;
586 #ifdef HAVE_RYTHMOS_DEBUG 587 TEUCHOS_TEST_FOR_EXCEPTION(
588 time_vec.size() == 0, std::logic_error,
589 "Error, addPoints called with an empty time_vec array!\n");
590 #endif // HAVE_RYTHMOS_DEBUG 592 RCP<Teuchos::FancyOStream> out = this->getOStream();
593 Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
594 Teuchos::OSTab ostab(out,1,
"BES::setPoints");
596 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH) ) {
597 *out <<
"time_vec = " << std::endl;
598 for (
int i=0 ; i<Teuchos::as<int>(time_vec.size()) ; ++i) {
599 *out <<
"time_vec[" << i <<
"] = " << time_vec[i] << std::endl;
602 else if (time_vec.size() == 1) {
606 Thyra::V_V(x_.ptr(),*x_vec[n]);
607 Thyra::V_V(scaled_x_old_.ptr(),*x_);
610 int n = time_vec.size()-1;
611 int nm1 = time_vec.size()-2;
613 t_old_ = time_vec[nm1];
614 Thyra::V_V(x_.ptr(),*x_vec[n]);
615 Scalar dt = t_ - t_old_;
616 Thyra::V_StV(scaled_x_old_.ptr(),Scalar(-ST::one()/dt),*x_vec[nm1]);
621 template<
class Scalar>
624 if ( !isInitialized_ && haveInitialCondition_ )
625 return timeRange<Scalar>(t_,t_);
626 if ( !isInitialized_ && !haveInitialCondition_ )
627 return invalidTimeRange<Scalar>();
628 return timeRange<Scalar>(t_old_,t_);
632 template<
class Scalar>
634 const Array<Scalar>& time_vec,
635 Array<RCP<
const Thyra::VectorBase<Scalar> > >* x_vec,
636 Array<RCP<
const Thyra::VectorBase<Scalar> > >* xdot_vec,
637 Array<ScalarMag>* accuracy_vec
640 typedef Teuchos::ScalarTraits<Scalar> ST;
641 using Teuchos::constOptInArg;
643 #ifdef HAVE_RYTHMOS_DEBUG 644 TEUCHOS_ASSERT(haveInitialCondition_);
645 #endif // HAVE_RYTHMOS_DEBUG 646 RCP<Thyra::VectorBase<Scalar> > x_temp = x_;
647 if (compareTimeValues(t_old_,t_)!=0) {
648 Scalar dt = t_ - t_old_;
649 x_temp = scaled_x_old_->clone_v();
650 Thyra::Vt_S(x_temp.ptr(),Scalar(-ST::one()*dt));
652 defaultGetPoints<Scalar>(
653 t_old_, constOptInArg(*x_temp), constOptInArg(*x_dot_old_),
654 t_, constOptInArg(*x_), constOptInArg(*x_dot_),
655 time_vec, ptr(x_vec), ptr(xdot_vec), ptr(accuracy_vec),
656 ptr(interpolator_.get())
760 template<
class Scalar>
765 TEUCHOS_ASSERT( time_vec != NULL );
769 if (!haveInitialCondition_) {
773 time_vec->push_back(t_old_);
776 time_vec->push_back(t_);
779 RCP<Teuchos::FancyOStream> out = this->getOStream();
780 Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
781 Teuchos::OSTab ostab(out,1,
"BES::getNodes");
782 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH) ) {
783 *out << this->description() << std::endl;
784 for (
int i=0 ; i<Teuchos::as<int>(time_vec->size()) ; ++i) {
785 *out <<
"time_vec[" << i <<
"] = " << (*time_vec)[i] << std::endl;
791 template<
class Scalar>
796 RCP<Teuchos::FancyOStream> out = this->getOStream();
797 Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
798 Teuchos::OSTab ostab(out,1,
"BES::removeNodes");
799 if ( as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH) ) {
800 *out <<
"time_vec = " << std::endl;
801 for (
int i=0 ; i<Teuchos::as<int>(time_vec.size()) ; ++i) {
802 *out <<
"time_vec[" << i <<
"] = " << time_vec[i] << std::endl;
805 TEUCHOS_TEST_FOR_EXCEPTION(
true,std::logic_error,
"Error, removeNodes is not implemented for BackwardEulerStepper at this time.\n");
813 template<
class Scalar>
823 template <
class Scalar>
825 RCP<Teuchos::ParameterList>
const& paramList
828 TEUCHOS_TEST_FOR_EXCEPT(is_null(paramList));
829 paramList->validateParametersAndSetDefaults(*this->getValidParameters());
830 parameterList_ = paramList;
831 Teuchos::readVerboseObjectSublist(&*parameterList_,
this);
835 template <
class Scalar>
836 RCP<Teuchos::ParameterList>
839 return(parameterList_);
843 template <
class Scalar>
844 RCP<Teuchos::ParameterList>
847 RCP<Teuchos::ParameterList>
848 temp_param_list = parameterList_;
849 parameterList_ = Teuchos::null;
850 return(temp_param_list);
854 template<
class Scalar>
855 RCP<const Teuchos::ParameterList>
858 using Teuchos::ParameterList;
859 static RCP<const ParameterList> validPL;
860 if (is_null(validPL)) {
861 RCP<ParameterList> pl = Teuchos::parameterList();
862 Teuchos::setupVerboseObjectSublist(&*pl);
872 template<
class Scalar>
874 Teuchos::FancyOStream &out,
875 const Teuchos::EVerbosityLevel verbLevel
879 Teuchos::OSTab tab(out);
880 if (!isInitialized_) {
881 out << this->description() <<
" : This stepper is not initialized yet" << std::endl;
885 as<int>(verbLevel) == as<int>(Teuchos::VERB_DEFAULT)
887 as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW)
890 out << this->description() <<
"::describe:" << std::endl;
891 out <<
"model = " << model_->description() << std::endl;
892 out <<
"solver = " << solver_->description() << std::endl;
893 if (neModel_ == Teuchos::null) {
894 out <<
"neModel = Teuchos::null" << std::endl;
896 out <<
"neModel = " << neModel_->description() << std::endl;
899 else if (as<int>(verbLevel) >= as<int>(Teuchos::VERB_LOW)) {
900 out <<
"t_ = " << t_ << std::endl;
901 out <<
"t_old_ = " << t_old_ << std::endl;
903 else if (as<int>(verbLevel) >= as<int>(Teuchos::VERB_MEDIUM)) {
905 else if (as<int>(verbLevel) >= as<int>(Teuchos::VERB_HIGH)) {
906 out <<
"model_ = " << std::endl;
907 model_->describe(out,verbLevel);
908 out <<
"solver_ = " << std::endl;
909 solver_->describe(out,verbLevel);
910 if (neModel_ == Teuchos::null) {
911 out <<
"neModel = Teuchos::null" << std::endl;
913 out <<
"neModel = " << std::endl;
914 neModel_->describe(out,verbLevel);
916 out <<
"x_ = " << std::endl;
917 x_->describe(out,verbLevel);
918 out <<
"scaled_x_old_ = " << std::endl;
919 scaled_x_old_->describe(out,verbLevel);
927 template <
class Scalar>
934 TEUCHOS_TEST_FOR_EXCEPT(is_null(model_));
935 TEUCHOS_TEST_FOR_EXCEPT(is_null(solver_));
936 TEUCHOS_TEST_FOR_EXCEPT(!haveInitialCondition_);
938 #ifdef HAVE_RYTHMOS_DEBUG 939 THYRA_ASSERT_VEC_SPACES(
940 "Rythmos::BackwardEulerStepper::initialize(...)",
941 *x_->space(), *model_->get_x_space() );
942 #endif // HAVE_RYTHMOS_DEBUG 944 if ( is_null(interpolator_) ) {
947 interpolator_ = linearInterpolator<Scalar>();
952 isInitialized_ =
true;
956 template<
class Scalar>
957 RCP<const MomentoBase<Scalar> >
961 momento->set_scaled_x_old(scaled_x_old_);
962 momento->set_x_dot_old(x_dot_old_);
964 momento->set_x_dot(x_dot_);
966 momento->set_t_old(t_old_);
967 momento->set_dt(dt_);
968 momento->set_numSteps(numSteps_);
969 momento->set_isInitialized(isInitialized_);
970 momento->set_haveInitialCondition(haveInitialCondition_);
971 momento->set_parameterList(parameterList_);
972 momento->set_basePoint(basePoint_);
973 momento->set_neModel(neModel_);
974 momento->set_interpolator(interpolator_);
978 template<
class Scalar>
981 const RCP<Thyra::ModelEvaluator<Scalar> >& model,
982 const RCP<Thyra::NonlinearSolverBase<Scalar> >& solver
985 Ptr<const BackwardEulerStepperMomento<Scalar> > feMomentoPtr =
990 scaled_x_old_ = feMomento.get_scaled_x_old();
991 x_dot_old_ = feMomento.get_x_dot_old();
992 x_ = feMomento.get_x();
993 x_dot_ = feMomento.get_x_dot();
994 t_ = feMomento.get_t();
995 t_old_ = feMomento.get_t_old();
996 dt_ = feMomento.get_dt();
997 numSteps_ = feMomento.get_numSteps();
998 isInitialized_ = feMomento.get_isInitialized();
999 haveInitialCondition_ = feMomento.get_haveInitialCondition();
1000 parameterList_ = feMomento.get_parameterList();
1001 basePoint_ = feMomento.get_basePoint();
1002 neModel_ = feMomento.get_neModel();
1003 interpolator_ = feMomento.get_interpolator();
1004 this->checkConsistentState_();
1007 template<
class Scalar>
1010 if (isInitialized_) {
1011 TEUCHOS_ASSERT( !Teuchos::is_null(model_) );
1012 TEUCHOS_ASSERT( !Teuchos::is_null(solver_) );
1013 TEUCHOS_ASSERT( haveInitialCondition_ );
1014 TEUCHOS_ASSERT( !Teuchos::is_null(interpolator_) );
1016 if (haveInitialCondition_) {
1018 typedef Teuchos::ScalarTraits<Scalar> ST;
1019 TEUCHOS_ASSERT( !ST::isnaninf(t_) );
1020 TEUCHOS_ASSERT( !ST::isnaninf(t_old_) );
1021 TEUCHOS_ASSERT( !Teuchos::is_null(scaled_x_old_) );
1022 TEUCHOS_ASSERT( !Teuchos::is_null(x_dot_old_) );
1023 TEUCHOS_ASSERT( !Teuchos::is_null(x_) );
1024 TEUCHOS_ASSERT( !Teuchos::is_null(x_dot_) );
1025 TEUCHOS_ASSERT( t_ >= basePoint_.get_t() );
1026 TEUCHOS_ASSERT( t_old_ >= basePoint_.get_t() );
1028 if (numSteps_ > 0) {
1029 TEUCHOS_ASSERT(isInitialized_);
1040 #define RYTHMOS_BACKWARD_EULER_STEPPER_INSTANT(SCALAR) \ 1042 template class BackwardEulerStepper< SCALAR >; \ 1044 template RCP< BackwardEulerStepper< SCALAR > > \ 1045 backwardEulerStepper( \ 1046 const RCP<Thyra::ModelEvaluator< SCALAR > >& model, \ 1047 const RCP<Thyra::NonlinearSolverBase< SCALAR > >& solver \ 1049 template RCP< BackwardEulerStepper< SCALAR > > \ 1050 backwardEulerStepper(); 1057 #endif //Rythmos_BACKWARD_EULER_STEPPER_DEF_H Simple concrete stepper subclass implementing an implicit backward Euler method.
bool supportsCloning() const
Returns true.
Base strategy class for interpolation functionality.
RCP< const InterpolatorBase< Scalar > > getInterpolator() const
void setSolver(const RCP< Thyra::NonlinearSolverBase< Scalar > > &solver)
void getNodes(Array< Scalar > *time_vec) const
RCP< Teuchos::ParameterList > unsetParameterList()
void setInitialCondition(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &initialCondition)
void setModel(const RCP< const Thyra::ModelEvaluator< Scalar > > &model)
void removeNodes(Array< Scalar > &time_vec)
Scalar takeStep(Scalar dt, StepSizeType flag)
void addPoints(const Array< Scalar > &time_vec, const Array< RCP< const Thyra::VectorBase< Scalar > > > &x_vec, const Array< RCP< const Thyra::VectorBase< Scalar > > > &xdot_vec)
RCP< Teuchos::ParameterList > getNonconstParameterList()
RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
void setNonconstModel(const RCP< Thyra::ModelEvaluator< Scalar > > &model)
RCP< InterpolatorBase< Scalar > > unSetInterpolator()
Thyra::ModelEvaluatorBase::InArgs< Scalar > getInitialCondition() const
Teuchos::ScalarTraits< Scalar >::magnitudeType ScalarMag
void getPoints(const Array< Scalar > &time_vec, Array< RCP< const Thyra::VectorBase< Scalar > > > *x_vec, Array< RCP< const Thyra::VectorBase< Scalar > > > *xdot_vec, Array< ScalarMag > *accuracy_vec) const
RCP< const Thyra::VectorBase< Scalar > > solutionDot
void setMomento(const Ptr< const MomentoBase< Scalar > > &momentoPtr, const RCP< Thyra::ModelEvaluator< Scalar > > &model, const RCP< Thyra::NonlinearSolverBase< Scalar > > &solver)
Set momento object for use in restarts.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Concrete momento class for the BackwardEulerStepper.
RCP< Thyra::NonlinearSolverBase< Scalar > > getNonconstSolver()
RCP< const MomentoBase< Scalar > > getMomento() const
Get momento object for use in restarts.
Decorator subclass for a steady-state version of a DAE for single-residual time stepper methods...
RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
RCP< const Teuchos::ParameterList > getValidParameters() const
RCP< StepperBase< Scalar > > cloneStepperAlgorithm() const
Creates copies of all internal data (including the parameter list) except the model which is assumed ...
const StepStatus< Scalar > getStepStatus() const
RCP< const Thyra::VectorBase< Scalar > > solution
RCP< const Thyra::NonlinearSolverBase< Scalar > > getSolver() const
RCP< InterpolatorBase< Scalar > > getNonconstInterpolator()
void setParameterList(RCP< Teuchos::ParameterList > const ¶mList)
RCP< Thyra::ModelEvaluator< Scalar > > getNonconstModel()
Base class for a momento object.
void setInterpolator(const RCP< InterpolatorBase< Scalar > > &interpolator)
TimeRange< Scalar > getTimeRange() const