10#ifndef Tempus_IntegratorObserverSubcycling_impl_hpp
11#define Tempus_IntegratorObserverSubcycling_impl_hpp
13#include "Tempus_Stepper.hpp"
17template <
class Scalar>
22template <
class Scalar>
27template <
class Scalar>
31 const Teuchos::RCP<Teuchos::FancyOStream> out = integrator.getOStream();
32 out->setOutputToRootOnly(0);
33 Teuchos::OSTab ostab(out, 0,
"ScreenOutput");
34 *out <<
"\n Begin Subcycling "
35 "-------------------------------------------------------\n";
41template <
class Scalar>
47template <
class Scalar>
53template <
class Scalar>
59template <
class Scalar>
65template <
class Scalar>
71template <
class Scalar>
78 if ((cs->getOutputScreen() ==
true) || (cs->getOutput() ==
true) ||
80 const Scalar steppertime = integrator.
getStepperTimer()->totalElapsedTime();
84 const Teuchos::RCP<Teuchos::FancyOStream> out = integrator.getOStream();
85 out->setOutputToRootOnly(0);
86 Teuchos::OSTab ostab(out, 0,
"ScreenOutput");
87 *out << std::scientific << std::setw(6) << std::setprecision(3)
88 << cs->getIndex() << std::setw(11) << std::setprecision(3)
89 << cs->getTime() << std::setw(11) << std::setprecision(3)
90 << cs->getTimeStep() << std::setw(11) << std::setprecision(3)
91 << cs->getErrorAbs() << std::setw(11) << std::setprecision(3)
92 << cs->getErrorRel() << std::fixed << std::setw(7)
93 << std::setprecision(1) << cs->getOrder() << std::scientific
94 << std::setw(7) << std::setprecision(3) << cs->getNFailures()
95 << std::setw(11) << std::setprecision(3) << steppertime << std::endl;
99template <
class Scalar>
103 const Teuchos::RCP<Teuchos::FancyOStream> out = integrator.getOStream();
104 out->setOutputToRootOnly(0);
105 Teuchos::OSTab ostab(out, 0,
"ScreenOutput");
106 *out <<
" End Subcycling "
107 "---------------------------------------------------------\n\n";
IntegratorObserverSubcycling()
Constructor.
virtual void observeEndIntegrator(const Integrator< Scalar > &integrator) override
Observe the end of the time integrator.
virtual ~IntegratorObserverSubcycling()
Destructor.
virtual void observeAfterCheckTimeStep(const Integrator< Scalar > &integrator) override
virtual void observeStartTimeStep(const Integrator< Scalar > &integrator) override
Observe the beginning of the time step loop.
virtual void observeEndTimeStep(const Integrator< Scalar > &integrator) override
Observe the end of the time step loop.
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 void observeNextTimeStep(const Integrator< Scalar > &integrator) override
Observe after the next time step size is selected.
virtual void observeStartIntegrator(const Integrator< Scalar > &integrator) override
Observe the beginning of the time integrator.
Thyra Base interface for time integrators. Time integrators are designed to advance the solution from...
virtual Teuchos::RCP< const SolutionHistory< Scalar > > getSolutionHistory() const =0
Returns the SolutionHistory for this Integrator.
virtual Teuchos::RCP< const TimeStepControl< Scalar > > getTimeStepControl() const =0
Returns the TimeStepControl for this Integrator.
virtual Teuchos::RCP< Teuchos::Time > getStepperTimer() const =0