Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | 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. More...
 
virtual ~IntegratorObserverLogging ()
 Destructor. More...
 
void resetLogCounters ()
 
Teuchos::RCP< const std::map
< std::string, int > > 
getCounters ()
 
Teuchos::RCP< const std::list
< std::string > > 
getOrder ()
 
- Public Member Functions inherited from Tempus::IntegratorObserver< Scalar >
virtual ~IntegratorObserver ()=default
 default destructor More...
 

Private Member Functions

void logCall (const std::string call) const
 Asserts next call on the stack is correct and removes from stack. More...
 

Private Attributes

Teuchos::RCP< std::map
< std::string, int > > 
counters_
 
Teuchos::RCP< std::list
< std::string > > 
order_
 

Override IntegratorObserver basic methods

virtual void observeStartIntegrator (const Integrator< Scalar > &integrator) override
 Observe the beginning of the time integrator. More...
 
virtual void observeStartTimeStep (const Integrator< Scalar > &integrator) override
 Observe the beginning of the time step loop. More...
 
virtual void observeNextTimeStep (const Integrator< Scalar > &integrator) override
 Observe after the next time step size is selected. More...
 
virtual void observeBeforeTakeStep (const Integrator< Scalar > &integrator) override
 Observe before Stepper takes step. More...
 
virtual void observeAfterTakeStep (const Integrator< Scalar > &integrator) override
 Observe after Stepper takes step. More...
 
virtual void observeAfterCheckTimeStep (const Integrator< Scalar > &integrator) override
 Observe after checking time step. More...
 
virtual void observeEndTimeStep (const Integrator< Scalar > &integrator) override
 Observe the end of the time step loop. More...
 
virtual void observeEndIntegrator (const Integrator< Scalar > &integrator) override
 Observe the end of the time integrator. More...
 

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_
 

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

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

Constructor.

Definition at line 18 of file Tempus_IntegratorObserverLogging_impl.hpp.

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

Destructor.

Definition at line 34 of file Tempus_IntegratorObserverLogging_impl.hpp.

Member Function Documentation

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 39 of file Tempus_IntegratorObserverLogging_impl.hpp.

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 46 of file Tempus_IntegratorObserverLogging_impl.hpp.

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 53 of file Tempus_IntegratorObserverLogging_impl.hpp.

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 60 of file Tempus_IntegratorObserverLogging_impl.hpp.

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 67 of file Tempus_IntegratorObserverLogging_impl.hpp.

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 74 of file Tempus_IntegratorObserverLogging_impl.hpp.

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 81 of file Tempus_IntegratorObserverLogging_impl.hpp.

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 88 of file Tempus_IntegratorObserverLogging_impl.hpp.

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

Definition at line 95 of file Tempus_IntegratorObserverLogging_impl.hpp.

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

Definition at line 110 of file Tempus_IntegratorObserverLogging_impl.hpp.

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

Definition at line 117 of file Tempus_IntegratorObserverLogging_impl.hpp.

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 123 of file Tempus_IntegratorObserverLogging_impl.hpp.

Member Data Documentation

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

Definition at line 78 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 79 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 80 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 81 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 82 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 83 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 84 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 85 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 96 of file Tempus_IntegratorObserverLogging_decl.hpp.

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

Definition at line 97 of file Tempus_IntegratorObserverLogging_decl.hpp.


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