29 #ifndef RYTHMOS_DEFAULT_INTEGRATOR_DEF_HPP 30 #define RYTHMOS_DEFAULT_INTEGRATOR_DEF_HPP 32 #include "Rythmos_DefaultIntegrator_decl.hpp" 33 #include "Rythmos_InterpolationBufferHelpers.hpp" 34 #include "Rythmos_IntegrationControlStrategyBase.hpp" 35 #include "Rythmos_IntegrationObserverBase.hpp" 36 #include "Rythmos_InterpolationBufferAppenderBase.hpp" 37 #include "Rythmos_PointwiseInterpolationBufferAppender.hpp" 38 #include "Rythmos_StepperHelpers.hpp" 39 #include "Teuchos_VerboseObjectParameterListHelpers.hpp" 40 #include "Teuchos_Assert.hpp" 41 #include "Teuchos_as.hpp" 50 template<
class Scalar>
51 RCP<DefaultIntegrator<Scalar> >
54 RCP<DefaultIntegrator<Scalar> >
64 template<
class Scalar>
65 RCP<DefaultIntegrator<Scalar> >
71 RCP<DefaultIntegrator<Scalar> >
73 integrator->setIntegrationControlStrategy(integrationControlStrategy);
74 integrator->setIntegrationObserver(integrationObserver);
83 template<
class Scalar>
84 RCP<DefaultIntegrator<Scalar> >
89 RCP<DefaultIntegrator<Scalar> >
91 integrator->setIntegrationControlStrategy(integrationControlStrategy);
100 template<
class Scalar>
101 RCP<DefaultIntegrator<Scalar> >
106 RCP<DefaultIntegrator<Scalar> >
108 integrator->setIntegrationObserver(integrationObserver);
121 template<
class Scalar>
134 template<
class Scalar>
136 :landOnFinalTime_(true),
137 maxNumTimeSteps_(std::numeric_limits<int>::max()),
138 currTimeStepIndex_(-1)
142 template<
class Scalar>
147 #ifdef HAVE_RYTHMOS_DEBUG 148 TEUCHOS_TEST_FOR_EXCEPT(is_null(integrationControlStrategy));
150 integrationControlStrategy_ = integrationControlStrategy;
153 template<
class Scalar>
154 RCP<IntegrationControlStrategyBase<Scalar> >
157 return integrationControlStrategy_;
160 template<
class Scalar>
161 RCP<const IntegrationControlStrategyBase<Scalar> >
164 return integrationControlStrategy_;
168 template<
class Scalar>
173 #ifdef HAVE_RYTHMOS_DEBUG 174 TEUCHOS_TEST_FOR_EXCEPT(is_null(integrationObserver));
176 integrationObserver_ = integrationObserver;
180 template<
class Scalar>
185 interpBufferAppender_ = interpBufferAppender.assert_not_null();
189 template<
class Scalar>
190 RCP<const InterpolationBufferAppenderBase<Scalar> >
193 return interpBufferAppender_;
196 template<
class Scalar>
197 RCP<InterpolationBufferAppenderBase<Scalar> >
200 return interpBufferAppender_;
203 template<
class Scalar>
204 RCP<InterpolationBufferAppenderBase<Scalar> >
207 RCP<InterpolationBufferAppenderBase<Scalar> > InterpBufferAppender;
208 std::swap( InterpBufferAppender, interpBufferAppender_ );
209 return InterpBufferAppender;
216 template<
class Scalar>
218 RCP<ParameterList>
const& paramList
221 TEUCHOS_TEST_FOR_EXCEPT(is_null(paramList));
223 this->setMyParamList(paramList);
224 maxNumTimeSteps_ = paramList->get(
225 maxNumTimeSteps_name_, std::numeric_limits<int>::max());
226 Teuchos::readVerboseObjectSublist(&*paramList,
this);
230 template<
class Scalar>
231 RCP<const ParameterList>
234 static RCP<const ParameterList> validPL;
235 if (is_null(validPL) ) {
236 RCP<ParameterList> pl = Teuchos::parameterList();
237 pl->set(maxNumTimeSteps_name_, std::numeric_limits<int>::max(),
238 "Set the maximum number of integration time-steps allowed." 240 Teuchos::setupVerboseObjectSublist(&*pl);
250 template<
class Scalar>
251 RCP<IntegratorBase<Scalar> >
256 RCP<DefaultIntegrator<Scalar> >
259 newIntegrator->stepper_ = Teuchos::null;
260 const RCP<const ParameterList> paramList = this->getParameterList();
261 if (!is_null(paramList)) {
262 newIntegrator->setParameterList(Teuchos::parameterList(*paramList));
264 if (!is_null(integrationControlStrategy_)) {
265 newIntegrator->integrationControlStrategy_ =
266 integrationControlStrategy_->cloneIntegrationControlStrategy().assert_not_null();
268 if (!is_null(integrationObserver_)) {
269 newIntegrator->integrationObserver_ =
270 integrationObserver_->cloneIntegrationObserver().assert_not_null();
272 if (!is_null(trailingInterpBuffer_)) {
274 newIntegrator->trailingInterpBuffer_ = null;
278 if (!is_null(interpBufferAppender_)) {
280 newIntegrator->interpBufferAppender_ = null;
284 return newIntegrator;
288 template<
class Scalar>
291 const Scalar &finalTime,
292 const bool landOnFinalTime
295 typedef Teuchos::ScalarTraits<Scalar> ST;
296 TEUCHOS_TEST_FOR_EXCEPT(is_null(stepper));
297 TEUCHOS_TEST_FOR_EXCEPT( finalTime < stepper->
getTimeRange().lower() );
298 TEUCHOS_ASSERT( stepper->getTimeRange().length() == ST::zero() );
301 integrationTimeDomain_ = timeRange(stepper_->getTimeRange().lower(), finalTime);
302 landOnFinalTime_ = landOnFinalTime;
303 currTimeStepIndex_ = 0;
305 if (!is_null(integrationControlStrategy_))
306 integrationControlStrategy_->resetIntegrationControlStrategy(
307 integrationTimeDomain_
309 if (!is_null(integrationObserver_))
310 integrationObserver_->resetIntegrationObserver(
311 integrationTimeDomain_
316 template<
class Scalar>
319 RCP<StepperBase<Scalar> > stepper_temp = stepper_;
320 stepper_ = Teuchos::null;
321 return(stepper_temp);
325 template<
class Scalar>
332 template<
class Scalar>
339 template<
class Scalar>
344 trailingInterpBuffer_ = trailingInterpBuffer.assert_not_null();
348 template<
class Scalar>
349 RCP<InterpolationBufferBase<Scalar> >
352 return trailingInterpBuffer_;
356 template<
class Scalar>
357 RCP<const InterpolationBufferBase<Scalar> >
360 return trailingInterpBuffer_;
363 template<
class Scalar>
364 RCP<InterpolationBufferBase<Scalar> >
367 RCP<InterpolationBufferBase<Scalar> > trailingInterpBuffer;
368 std::swap( trailingInterpBuffer, trailingInterpBuffer_ );
369 return trailingInterpBuffer;
373 template<
class Scalar>
375 const Array<Scalar>& time_vec,
376 Array<RCP<
const Thyra::VectorBase<Scalar> > >* x_vec,
377 Array<RCP<
const Thyra::VectorBase<Scalar> > >* xdot_vec,
378 Array<ScalarMag>* accuracy_vec
382 RYTHMOS_FUNC_TIME_MONITOR_DIFF(
"Rythmos:DefaultIntegrator::getFwdPoints",
385 using Teuchos::incrVerbLevel;
387 using Teuchos::Describable;
389 typedef Teuchos::ScalarTraits<Scalar> ST;
391 typedef Teuchos::VerboseObjectTempState<IBB> VOTSIBB;
395 RCP<Teuchos::FancyOStream> out = this->getOStream();
396 Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
397 Teuchos::OSTab tab(out);
398 VOTSIBB stepper_outputTempState(stepper_,out,incrVerbLevel(verbLevel,-1));
400 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
401 *out <<
"\nEntering " << this->Describable::description() <<
"::getFwdPoints(...) ...\n" 402 <<
"\nStepper: " << Teuchos::describe(*stepper_,verbLevel);
404 if ( includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) )
405 *out <<
"\nRequested time points: " << Teuchos::toString(time_vec) <<
"\n";
408 if (!is_null(integrationObserver_)) {
409 integrationObserver_->setOStream(out);
410 integrationObserver_->setVerbLevel(incrVerbLevel(verbLevel,-1));
411 integrationObserver_->observeStartTimeIntegration(*stepper_);
418 const int numTimePoints = time_vec.size();
422 TEUCHOS_TEST_FOR_EXCEPT(accuracy_vec!=0);
426 x_vec->resize(numTimePoints);
428 xdot_vec->resize(numTimePoints);
433 int nextTimePointIndex = 0;
442 RYTHMOS_FUNC_TIME_MONITOR(
"Rythmos:DefaultIntegrator::getFwdPoints: getPoints");
452 while ( nextTimePointIndex < numTimePoints ) {
456 const Scalar t = time_vec[nextTimePointIndex];
457 bool advanceStepperToTimeSucceeded =
false;
459 RYTHMOS_FUNC_TIME_MONITOR(
"Rythmos:DefaultIntegrator::getFwdPoints: advanceStepperToTime");
460 advanceStepperToTimeSucceeded= advanceStepperToTime(t);
462 if (!advanceStepperToTimeSucceeded) {
463 bool reachedMaxNumTimeSteps = (currTimeStepIndex_ >= maxNumTimeSteps_);
464 if (reachedMaxNumTimeSteps) {
468 TEUCHOS_TEST_FOR_EXCEPTION(
470 this->description() <<
"\n\n" 471 "Error: The integration failed to get to time " << t <<
" and only achieved\n" 472 "getting to " << stepper_->getTimeRange().upper() <<
"!" 478 RYTHMOS_FUNC_TIME_MONITOR(
"Rythmos:DefaultIntegrator::getFwdPoints: getPoints (fwd)");
485 if (!is_null(integrationObserver_)) {
486 integrationObserver_->observeEndTimeIntegration(*stepper_);
489 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
490 *out <<
"\nLeaving " << this->Describable::description() <<
"::getFwdPoints(...) ...\n";
495 template<
class Scalar>
500 stepper_->getTimeRange().lower(),
501 integrationTimeDomain_.
upper()
509 template<
class Scalar>
510 RCP<const Thyra::VectorSpaceBase<Scalar> >
513 return stepper_->get_x_space();
517 template<
class Scalar>
519 const Array<Scalar>& time_vec,
520 const Array<RCP<
const Thyra::VectorBase<Scalar> > >& x_vec,
521 const Array<RCP<
const Thyra::VectorBase<Scalar> > >& xdot_vec
524 stepper_->addPoints(time_vec,x_vec,xdot_vec);
528 template<
class Scalar>
530 const Array<Scalar>& time_vec,
531 Array<RCP<
const Thyra::VectorBase<Scalar> > >* x_vec,
532 Array<RCP<
const Thyra::VectorBase<Scalar> > >* xdot_vec,
533 Array<ScalarMag>* accuracy_vec
548 stepper_->getPoints(time_vec, x_vec, xdot_vec, accuracy_vec);
553 template<
class Scalar>
556 if (nonnull(trailingInterpBuffer_)) {
557 return timeRange(trailingInterpBuffer_->getTimeRange().lower(),
558 stepper_->getTimeRange().upper());
560 return stepper_->getTimeRange();
564 template<
class Scalar>
567 stepper_->getNodes(time_vec);
571 template<
class Scalar>
574 stepper_->removeNodes(time_vec);
578 template<
class Scalar>
581 return stepper_->getOrder();
588 template<
class Scalar>
591 if (!is_null(trailingInterpBuffer_) && is_null(interpBufferAppender_))
592 interpBufferAppender_ = pointwiseInterpolationBufferAppender<Scalar>();
597 template<
class Scalar>
601 RYTHMOS_FUNC_TIME_MONITOR_DIFF(
"Rythmos:DefaultIntegrator::advanceStepperToTime",
605 typedef std::numeric_limits<Scalar> NL;
606 using Teuchos::incrVerbLevel;
608 using Teuchos::Describable;
610 using Teuchos::OSTab;
611 typedef Teuchos::ScalarTraits<Scalar> ST;
613 RCP<Teuchos::FancyOStream> out = this->getOStream();
614 Teuchos::EVerbosityLevel verbLevel = this->getVerbLevel();
616 if (!is_null(integrationControlStrategy_)) {
617 integrationControlStrategy_->setOStream(out);
618 integrationControlStrategy_->setVerbLevel(incrVerbLevel(verbLevel,-1));
621 if (!is_null(integrationObserver_)) {
622 integrationObserver_->setOStream(out);
623 integrationObserver_->setVerbLevel(incrVerbLevel(verbLevel,-1));
626 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
627 *out <<
"\nEntering " << this->Describable::description()
628 <<
"::advanceStepperToTime("<<advance_to_t<<
") ...\n";
631 const int initCurrTimeStepIndex = currTimeStepIndex_;
638 bool return_val =
true;
640 while ( !currStepperTimeRange.
isInRange(advance_to_t) ) {
643 if (currTimeStepIndex_ >= maxNumTimeSteps_) {
644 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
647 <<
"\n*** NOTICE: currTimeStepIndex = "<<currTimeStepIndex_
648 <<
" >= maxNumTimeSteps = "<<maxNumTimeSteps_<<
", halting time integration!" 654 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) ) {
655 *out <<
"\nTake step: current_stepper_t = " << currStepperTimeRange.
upper()
656 <<
", currTimeStepIndex = " << currTimeStepIndex_ << endl;
665 if (stepCtrlInfoLast_.limitedByBreakPoint) {
666 if ( stepCtrlInfoLast_.breakPointType == BREAK_POINT_TYPE_HARD ) {
667 RYTHMOS_FUNC_TIME_MONITOR(
"Rythmos:DefaultIntegrator::restart");
668 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
669 *out <<
"\nAt a hard-breakpoint, restarting time integrator ...\n";
673 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
674 *out <<
"\nAt a soft-breakpoint, NOT restarting time integrator ...\n";
684 bool foundAcceptableTimeStep =
false;
690 while (!foundAcceptableTimeStep) {
698 RYTHMOS_FUNC_TIME_MONITOR(
"Rythmos:DefaultIntegrator::advanceStepperToTime: getStepCtrl");
699 if (!is_null(integrationControlStrategy_)) {
702 trialStepCtrlInfo = integrationControlStrategy_->getNextStepControlInfo(
703 *stepper_, stepCtrlInfoLast_, currTimeStepIndex_
708 trialStepCtrlInfo.
stepType = STEP_TYPE_VARIABLE;
709 trialStepCtrlInfo.
stepSize = NL::max();
714 if ( includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) ) {
715 *out <<
"\nTrial step:\n";
717 *out << trialStepCtrlInfo;
721 if (trialStepCtrlInfo.
stepSize < ST::zero()) {
722 if ( includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) )
725 <<
"\n*** NOTICE: The IntegrationControlStrategy object return stepSize < 0.0, halting time integration!" 732 bool updatedTrialStepCtrlInfo =
false;
734 const Scalar finalTime = integrationTimeDomain_.
upper();
735 if (landOnFinalTime_ && trialStepCtrlInfo.
stepSize + currStepperTimeRange.
upper() > finalTime) {
736 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
737 *out <<
"\nCutting trial step to avoid stepping past final time ...\n";
738 trialStepCtrlInfo.
stepSize = finalTime - currStepperTimeRange.
upper();
739 updatedTrialStepCtrlInfo =
true;
744 if ( updatedTrialStepCtrlInfo
745 && includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) )
747 *out <<
"\nUpdated trial step:\n";
749 *out << trialStepCtrlInfo;
757 if (!is_null(integrationObserver_))
758 integrationObserver_->observeStartTimeStep(
759 *stepper_, trialStepCtrlInfo, currTimeStepIndex_
763 if ( includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) ) {
764 if (trialStepCtrlInfo.
stepType == STEP_TYPE_VARIABLE)
765 *out <<
"\nTaking a variable time step with max step size = " 766 << trialStepCtrlInfo.
stepSize <<
" ....\n";
768 *out <<
"\nTaking a fixed time step of size = " 769 << trialStepCtrlInfo.
stepSize <<
" ....\n";
773 Scalar stepSizeTaken;
775 RYTHMOS_FUNC_TIME_MONITOR(
"Rythmos:DefaultIntegrator::advanceStepperToTime: takeStep");
776 stepSizeTaken = stepper_->takeStep(
782 currStepperTimeRange = stepper_->getTimeRange();
783 stepCtrlInfo = stepCtrlInfoTaken(trialStepCtrlInfo,stepSizeTaken);
786 if ( includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) ) {
787 *out <<
"\nStep actually taken:\n";
789 *out << stepCtrlInfo;
793 const bool timeStepFailed = (stepCtrlInfo.
stepSize <= ST::zero());
794 if (timeStepFailed && includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM)) {
795 *out <<
"\nWARNING: timeStep = "<<trialStepCtrlInfo.
stepSize<<
" failed!\n";
799 if (timeStepFailed) {
800 if (nonnull(integrationObserver_))
801 integrationObserver_->observeFailedTimeStep(
802 *stepper_, stepCtrlInfo, currTimeStepIndex_
806 const bool handlesFailedTimeSteps =
807 nonnull(integrationControlStrategy_) &&
808 integrationControlStrategy_->handlesFailedTimeSteps();
809 if (handlesFailedTimeSteps)
812 if (integrationControlStrategy_->resetForFailedTimeStep(
813 *stepper_, stepCtrlInfoLast_, currTimeStepIndex_, trialStepCtrlInfo)
816 if ( includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) ) {
817 *out <<
"\nThe IntegrationControlStrategy object indicated that" 818 <<
" it would like to suggest another timestep!\n";
827 if ( includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) ) {
828 *out <<
"\nThe IntegrationControlStrategy object could not suggest" 829 <<
" a better time step! Allowing to fail the time step!\n";
837 if (trialStepCtrlInfo.
stepType == STEP_TYPE_VARIABLE) {
838 TEUCHOS_TEST_FOR_EXCEPTION(
839 stepSizeTaken < ST::zero(), std::logic_error,
840 "Error, stepper took negative step of dt = " << stepSizeTaken <<
"!\n" 842 TEUCHOS_TEST_FOR_EXCEPTION(
843 stepSizeTaken > trialStepCtrlInfo.
stepSize, std::logic_error,
844 "Error, stepper took step of dt = " << stepSizeTaken
845 <<
" > max step size of = " << trialStepCtrlInfo.
stepSize <<
"!\n" 849 TEUCHOS_TEST_FOR_EXCEPTION(
850 stepSizeTaken != trialStepCtrlInfo.
stepSize, std::logic_error,
851 "Error, stepper took step of dt = " << stepSizeTaken
852 <<
" when asked to take step of dt = " << trialStepCtrlInfo.
stepSize <<
"\n" 857 foundAcceptableTimeStep =
true;
860 if (!is_null(trailingInterpBuffer_)) {
861 interpBufferAppender_->append(*stepper_,currStepperTimeRange,
862 trailingInterpBuffer_.ptr() );
871 RYTHMOS_FUNC_TIME_MONITOR(
"Rythmos:DefaultIntegrator::advanceStepperToTime: output");
874 if ( includesVerbLevel(verbLevel,Teuchos::VERB_MEDIUM) ) {
876 *out <<
"\nTime point reached = " << stepStatus.
time << endl;
877 *out <<
"\nstepStatus:\n" << stepStatus;
878 if ( includesVerbLevel(verbLevel,Teuchos::VERB_EXTREME) ) {
879 RCP<const Thyra::VectorBase<Scalar> >
881 solutionDot = stepStatus.solutionDot;
882 if (!is_null(solution))
883 *out <<
"\nsolution = \n" << Teuchos::describe(*solution,verbLevel);
884 if (!is_null(solutionDot))
885 *out <<
"\nsolutionDot = \n" << Teuchos::describe(*solutionDot,verbLevel);
890 if (!is_null(integrationObserver_))
891 integrationObserver_->observeCompletedTimeStep(
892 *stepper_, stepCtrlInfo, currTimeStepIndex_
903 stepCtrlInfoLast_ = stepCtrlInfo;
904 ++currTimeStepIndex_;
908 if ( includesVerbLevel(verbLevel,Teuchos::VERB_LOW) )
909 *out <<
"\nNumber of steps taken in this call to advanceStepperToTime(...) = " 910 << (currTimeStepIndex_ - initCurrTimeStepIndex) << endl
911 <<
"\nLeaving" << this->Describable::description()
912 <<
"::advanceStepperToTime("<<advance_to_t<<
") ...\n";
924 #define RYTHMOS_DEFAULT_INTEGRATOR_INSTANT(SCALAR) \ 926 template class DefaultIntegrator< SCALAR >; \ 928 template RCP<DefaultIntegrator< SCALAR > > \ 929 defaultIntegrator(); \ 931 template RCP<DefaultIntegrator< SCALAR > > \ 933 const RCP<IntegrationControlStrategyBase< SCALAR > > &integrationControlStrategy, \ 934 const RCP<IntegrationObserverBase< SCALAR > > &integrationObserver \ 937 template RCP<DefaultIntegrator< SCALAR > > \ 938 controlledDefaultIntegrator( \ 939 const RCP<IntegrationControlStrategyBase< SCALAR > > &integrationControlStrategy \ 942 template RCP<DefaultIntegrator< SCALAR > > \ 943 observedDefaultIntegrator( \ 944 const RCP<IntegrationObserverBase< SCALAR > > &integrationObserver \ 950 #endif //RYTHMOS_DEFAULT_INTEGRATOR_DEF_HPP RCP< const ParameterList > getValidParameters() const
RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
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< StepperBase< Scalar > > unSetStepper()
RCP< const InterpolationBufferAppenderBase< Scalar > > getInterpolationBufferAppender()
RCP< InterpolationBufferBase< Scalar > > unSetTrailingInterpolationBuffer()
Base class for defining stepper functionality.
RCP< IntegratorBase< Scalar > > cloneIntegrator() const
RCP< const StepperBase< Scalar > > getStepper() const
RCP< IntegrationControlStrategyBase< Scalar > > getNonconstIntegrationControlStrategy()
Simple strict to aggregate integration/stepper control information.
void getNodes(Array< Scalar > *time_vec) const
Base class for strategy objects that control integration by selecting step sizes for a stepper...
RCP< const IntegrationControlStrategyBase< Scalar > > getIntegrationControlStrategy() const
bool getCurrentPoints(const InterpolationBufferBase< Scalar > &interpBuffer, const Array< Scalar > &time_vec, Array< RCP< const Thyra::VectorBase< Scalar > > > *x_vec, Array< RCP< const Thyra::VectorBase< Scalar > > > *xdot_vec, int *nextTimePointIndex)
Get time points in the current range of an interpolation buffer object.
TimeRange< Scalar > getFwdTimeRange() const
Base class for strategy objects that observe and time integration by observing the stepper object...
RCP< DefaultIntegrator< Scalar > > defaultIntegrator(const RCP< IntegrationControlStrategyBase< Scalar > > &integrationControlStrategy, const RCP< IntegrationObserverBase< Scalar > > &integrationObserver)
void assertNoTimePointsBeforeCurrentTimeRange(const InterpolationBufferBase< Scalar > &interpBuffer, const Array< Scalar > &time_vec, const int &startingTimePointIndex=0)
Assert that none of the time points fall before the current time range for an interpolation buffer ob...
RCP< InterpolationBufferAppenderBase< Scalar > > unSetInterpolationBufferAppender()
RCP< DefaultIntegrator< Scalar > > defaultIntegrator()
Scalar stepSize
The size of the time step.
virtual bool isInRange(const TimeType &t) const
void setIntegrationControlStrategy(const RCP< IntegrationControlStrategyBase< Scalar > > &integrationControlStrategy)
A concrete subclass for IntegratorBase that allows a good deal of customization.
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)
void setTrailingInterpolationBuffer(const RCP< InterpolationBufferBase< Scalar > > &trailingInterpBuffer)
RCP< StepperBase< Scalar > > getNonconstStepper() const
Base class for an interpolation buffer.
RCP< const InterpolationBufferBase< Scalar > > getTrailingInterpolationBuffer() const
RCP< DefaultIntegrator< Scalar > > controlledDefaultIntegrator(const RCP< IntegrationControlStrategyBase< Scalar > > &integrationControlStrategy)
void getFwdPoints(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)
Base class for strategy objects that append data from one InterplationBufferBase object to another...
void removeNodes(Array< Scalar > &time_vec)
void setInterpolationBufferAppender(const RCP< InterpolationBufferAppenderBase< Scalar > > &interpBufferAppender)
RCP< InterpolationBufferBase< Scalar > > getNonconstTrailingInterpolationBuffer()
StepSizeType stepType
The type of time step.
TimeRange< Scalar > getTimeRange() const
RCP< DefaultIntegrator< Scalar > > observedDefaultIntegrator(const RCP< IntegrationObserverBase< Scalar > > &integrationObserver)
RCP< const Thyra::VectorBase< Scalar > > solution
RCP< InterpolationBufferAppenderBase< Scalar > > getNonconstInterpolationBufferAppender()
void assertTimePointsAreSorted(const Array< Scalar > &time_vec)
Assert that a time point vector is sorted.
void setIntegrationObserver(const RCP< IntegrationObserverBase< Scalar > > &integrationObserver)
void setParameterList(RCP< ParameterList > const ¶mList)
void setStepper(const RCP< StepperBase< Scalar > > &stepper, const Scalar &finalTime, const bool landOnFinalTime=true)