Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Tempus::IntegratorObserverLogging< Scalar > Class Template Reference

This observer logs calls to observer functions. This observer simply logs and counts the calls to each of the observer functions. This is useful in monirtoring and debugging the time integration. More...

#include <Tempus_IntegratorObserverLogging_decl.hpp>

Inheritance diagram for Tempus::IntegratorObserverLogging< Scalar >:
Tempus::IntegratorObserver< Scalar >

Public Member Functions

 IntegratorObserverLogging ()
 Constructor.
 
virtual ~IntegratorObserverLogging ()
 Destructor.
 
- Public Member Functions inherited from Tempus::IntegratorObserver< Scalar >
virtual ~IntegratorObserver ()=default
 default destructor
 

String names logged in map

Use these strings to validate a call stack with this observer

const std::string nameObserveStartIntegrator_
 
const std::string nameObserveStartTimeStep_
 
const std::string nameObserveNextTimeStep_
 
const std::string nameObserveBeforeTakeStep_
 
const std::string nameObserveAfterTakeStep_
 
const std::string nameObserveAfterCheckTimeStep_
 
const std::string nameObserveEndTimeStep_
 
const std::string nameObserveEndIntegrator_
 
Teuchos::RCP< std::map< std::string, int > > counters_
 
Teuchos::RCP< std::list< std::string > > order_
 
void logCall (const std::string call) const
 Asserts next call on the stack is correct and removes from stack.
 

Override IntegratorObserver basic methods

virtual void observeStartIntegrator (const Integrator< Scalar > &integrator) override
 Observe the beginning of the time integrator.
 
virtual void observeStartTimeStep (const Integrator< Scalar > &integrator) override
 Observe the beginning of the time step loop.
 
virtual void observeNextTimeStep (const Integrator< Scalar > &integrator) override
 Observe after the next time step size is selected.
 
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 observeAfterCheckTimeStep (const Integrator< Scalar > &integrator) override
 Observe after checking time step.
 
virtual void observeEndTimeStep (const Integrator< Scalar > &integrator) override
 Observe the end of the time step loop.
 
virtual void observeEndIntegrator (const Integrator< Scalar > &integrator) override
 Observe the end of the time integrator.
 
void resetLogCounters ()
 
Teuchos::RCP< const std::map< std::string, int > > getCounters ()
 
Teuchos::RCP< const std::list< std::string > > getOrder ()
 

Detailed Description

template<class Scalar>
class Tempus::IntegratorObserverLogging< Scalar >

This observer logs calls to observer functions. This observer simply logs and counts the calls to each of the observer functions. This is useful in monirtoring and debugging the time integration.

Definition at line 24 of file Tempus_IntegratorObserverLogging_decl.hpp.

Constructor & Destructor Documentation

◆ IntegratorObserverLogging()

template<class Scalar >
Tempus::IntegratorObserverLogging< Scalar >::IntegratorObserverLogging

Constructor.

Definition at line 18 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ ~IntegratorObserverLogging()

template<class Scalar >
Tempus::IntegratorObserverLogging< Scalar >::~IntegratorObserverLogging
virtual

Destructor.

Definition at line 34 of file Tempus_IntegratorObserverLogging_impl.hpp.

Member Function Documentation

◆ observeStartIntegrator()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::observeStartIntegrator ( const Integrator< Scalar > &  integrator)
overridevirtual

Observe the beginning of the time integrator.

Implements Tempus::IntegratorObserver< Scalar >.

Definition at line 37 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ observeStartTimeStep()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::observeStartTimeStep ( const Integrator< Scalar > &  integrator)
overridevirtual

Observe the beginning of the time step loop.

Implements Tempus::IntegratorObserver< Scalar >.

Definition at line 42 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ observeNextTimeStep()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::observeNextTimeStep ( const Integrator< Scalar > &  integrator)
overridevirtual

Observe after the next time step size is selected.

Implements Tempus::IntegratorObserver< Scalar >.

Definition at line 47 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ observeBeforeTakeStep()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::observeBeforeTakeStep ( const Integrator< Scalar > &  integrator)
overridevirtual

Observe before Stepper takes step.

Implements Tempus::IntegratorObserver< Scalar >.

Definition at line 52 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ observeAfterTakeStep()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::observeAfterTakeStep ( const Integrator< Scalar > &  integrator)
overridevirtual

Observe after Stepper takes step.

Implements Tempus::IntegratorObserver< Scalar >.

Definition at line 57 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ observeAfterCheckTimeStep()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::observeAfterCheckTimeStep ( const Integrator< Scalar > &  integrator)
overridevirtual

Observe after checking time step.

Implements Tempus::IntegratorObserver< Scalar >.

Definition at line 62 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ observeEndTimeStep()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::observeEndTimeStep ( const Integrator< Scalar > &  integrator)
overridevirtual

Observe the end of the time step loop.

Implements Tempus::IntegratorObserver< Scalar >.

Definition at line 67 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ observeEndIntegrator()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::observeEndIntegrator ( const Integrator< Scalar > &  integrator)
overridevirtual

Observe the end of the time integrator.

Implements Tempus::IntegratorObserver< Scalar >.

Definition at line 72 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ resetLogCounters()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::resetLogCounters

Definition at line 77 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ getCounters()

template<class Scalar >
Teuchos::RCP< const std::map< std::string, int > > Tempus::IntegratorObserverLogging< Scalar >::getCounters

Definition at line 92 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ getOrder()

template<class Scalar >
Teuchos::RCP< const std::list< std::string > > Tempus::IntegratorObserverLogging< Scalar >::getOrder

Definition at line 97 of file Tempus_IntegratorObserverLogging_impl.hpp.

◆ logCall()

template<class Scalar >
void Tempus::IntegratorObserverLogging< Scalar >::logCall ( const std::string  call) const
private

Asserts next call on the stack is correct and removes from stack.

This is a const method so that it can be called from the derived IntegratorObserver methods that are const.

Definition at line 101 of file Tempus_IntegratorObserverLogging_impl.hpp.

Member Data Documentation

◆ nameObserveStartIntegrator_

template<class Scalar >
const std::string Tempus::IntegratorObserverLogging< Scalar >::nameObserveStartIntegrator_

Definition at line 72 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ nameObserveStartTimeStep_

template<class Scalar >
const std::string Tempus::IntegratorObserverLogging< Scalar >::nameObserveStartTimeStep_

Definition at line 73 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ nameObserveNextTimeStep_

template<class Scalar >
const std::string Tempus::IntegratorObserverLogging< Scalar >::nameObserveNextTimeStep_

Definition at line 74 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ nameObserveBeforeTakeStep_

template<class Scalar >
const std::string Tempus::IntegratorObserverLogging< Scalar >::nameObserveBeforeTakeStep_

Definition at line 75 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ nameObserveAfterTakeStep_

template<class Scalar >
const std::string Tempus::IntegratorObserverLogging< Scalar >::nameObserveAfterTakeStep_

Definition at line 76 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ nameObserveAfterCheckTimeStep_

template<class Scalar >
const std::string Tempus::IntegratorObserverLogging< Scalar >::nameObserveAfterCheckTimeStep_

Definition at line 77 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ nameObserveEndTimeStep_

template<class Scalar >
const std::string Tempus::IntegratorObserverLogging< Scalar >::nameObserveEndTimeStep_

Definition at line 78 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ nameObserveEndIntegrator_

template<class Scalar >
const std::string Tempus::IntegratorObserverLogging< Scalar >::nameObserveEndIntegrator_

Definition at line 79 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ counters_

template<class Scalar >
Teuchos::RCP< std::map<std::string,int> > Tempus::IntegratorObserverLogging< Scalar >::counters_
private

Definition at line 91 of file Tempus_IntegratorObserverLogging_decl.hpp.

◆ order_

template<class Scalar >
Teuchos::RCP< std::list<std::string> > Tempus::IntegratorObserverLogging< Scalar >::order_
private

Definition at line 92 of file Tempus_IntegratorObserverLogging_decl.hpp.


The documentation for this class was generated from the following files: