9 #ifndef Tempus_IntegratorObserverSubcycling_impl_hpp
10 #define Tempus_IntegratorObserverSubcycling_impl_hpp
12 #include "Tempus_Stepper.hpp"
16 template<
class Scalar>
19 template<
class Scalar>
22 template<
class Scalar>
26 const Teuchos::RCP<Teuchos::FancyOStream> out = integrator.getOStream();
27 Teuchos::OSTab ostab(out,0,
"ScreenOutput");
28 *out <<
"\n Begin Subcycling -------------------------------------------------------\n";
33 template<
class Scalar>
37 template<
class Scalar>
41 template<
class Scalar>
45 template<
class Scalar>
49 template<
class Scalar>
53 template<
class Scalar>
60 if ((cs->getOutputScreen() ==
true) or
61 (cs->getOutput() ==
true) or
64 const Scalar steppertime = integrator.
getStepperTimer()->totalElapsedTime();
68 const Teuchos::RCP<Teuchos::FancyOStream> out = integrator.getOStream();
69 Teuchos::OSTab ostab(out,0,
"ScreenOutput");
71 <<std::setw( 6)<<std::setprecision(3)<<cs->getIndex()
72 <<std::setw(11)<<std::setprecision(3)<<cs->getTime()
73 <<std::setw(11)<<std::setprecision(3)<<cs->getTimeStep()
74 <<std::setw(11)<<std::setprecision(3)<<cs->getErrorAbs()
75 <<std::setw(11)<<std::setprecision(3)<<cs->getErrorRel()
76 <<std::fixed <<std::setw( 7)<<std::setprecision(1)<<cs->getOrder()
77 <<std::scientific<<std::setw( 7)<<std::setprecision(3)<<cs->getNFailures()
78 <<std::setw(11)<<std::setprecision(3)<<steppertime
84 template<
class Scalar>
88 const Teuchos::RCP<Teuchos::FancyOStream> out = integrator.getOStream();
89 Teuchos::OSTab ostab(out,0,
"ScreenOutput");
90 *out <<
" End Subcycling ---------------------------------------------------------\n\n";
94 #endif // Tempus_IntegratorObserverSubcycling_impl_hpp
virtual void observeEndIntegrator(const Integrator< Scalar > &integrator) override
Observe the end of the time integrator.
virtual Teuchos::RCP< Teuchos::Time > getStepperTimer() const =0
virtual void observeBeforeTakeStep(const Integrator< Scalar > &integrator) override
Observe before Stepper takes step.
virtual void observeAfterTakeStep(const Integrator< Scalar > &integrator) override
Observe after Stepper takes step.
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const =0
Returns the TimeStepControl for this Integrator.
virtual void observeAfterCheckTimeStep(const Integrator< Scalar > &integrator) override
Observe after checking time step. Observer can still fail the time step here.
virtual void observeStartTimeStep(const Integrator< Scalar > &integrator) override
Observe the beginning of the time step loop.
virtual ~IntegratorObserverSubcycling()
Destructor.
virtual void observeStartIntegrator(const Integrator< Scalar > &integrator) override
Observe the beginning of the time integrator.
virtual void observeNextTimeStep(const Integrator< Scalar > &integrator) override
Observe after the next time step size is selected.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
IntegratorObserverSubcycling()
Constructor.
virtual void observeEndTimeStep(const Integrator< Scalar > &integrator) override
Observe the end of the time step loop.
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const =0
Returns the SolutionHistory for this Integrator.