IterationPack: General framework for building iterative algorithms
Version of the Day
|
Used to ouput iteration results and other information. More...
#include <IterationPack_AlgorithmTracker.hpp>
Public Member Functions | |
virtual | ~AlgorithmTracker () |
Public types | |
typedef Teuchos::RCP < std::ostream > | ostream_ptr_t |
Constructors | |
AlgorithmTracker (const ostream_ptr_t &journal_out) | |
Construct with an output stream for journal_out. More... | |
Algorithm iteration state notification | |
virtual void | initialize () |
Reinitialize the track object right before it is used. More... | |
virtual void | output_iteration (const Algorithm &algo) const |
Output information about an iteration just completed. More... | |
virtual void | output_final (const Algorithm &algo, EAlgoReturn algo_return) const |
Output information about a just completed algorithm. More... | |
Journal file access | |
virtual void | set_journal_out (const ostream_ptr_t &journal_out) |
Set a smart pointer to the journal file. More... | |
const ostream_ptr_t & | get_journal_out () const |
Get the smart pointer to the journal file. More... | |
virtual std::ostream & | journal_out () const |
Return a reference to a std::ostream to be used to output debug information and the like. More... | |
Used to ouput iteration results and other information.
This interface can be implemented by outside clients of an iterative algorithm to monitor or "track" the progress of the algorithm.
ToDo: Write more documentation!
Definition at line 59 of file IterationPack_AlgorithmTracker.hpp.
typedef Teuchos::RCP<std::ostream> IterationPack::AlgorithmTracker::ostream_ptr_t |
Definition at line 69 of file IterationPack_AlgorithmTracker.hpp.
|
inlinevirtual |
Definition at line 63 of file IterationPack_AlgorithmTracker.hpp.
IterationPack::AlgorithmTracker::AlgorithmTracker | ( | const ostream_ptr_t & | journal_out | ) |
Construct with an output stream for journal_out.
Preconditions:
journal_out.get() != NULL
(throw std::invalid_argument
). Definition at line 46 of file IterationPack_AlgorithmTracker.cpp.
|
virtual |
Reinitialize the track object right before it is used.
The default implementation does nothing.
Reimplemented in IterationPack::AlgorithmTrackerComposite.
Definition at line 50 of file IterationPack_AlgorithmTracker.cpp.
|
virtual |
Output information about an iteration just completed.
The default just does nothing.
Reimplemented in IterationPack::AlgorithmTrackerComposite.
Definition at line 53 of file IterationPack_AlgorithmTracker.cpp.
|
virtual |
Output information about a just completed algorithm.
The default just does nothing.
Reimplemented in IterationPack::AlgorithmTrackerComposite.
Definition at line 56 of file IterationPack_AlgorithmTracker.cpp.
|
virtual |
Set a smart pointer to the journal file.
Definition at line 59 of file IterationPack_AlgorithmTracker.cpp.
const AlgorithmTracker::ostream_ptr_t & IterationPack::AlgorithmTracker::get_journal_out | ( | ) | const |
Get the smart pointer to the journal file.
Definition at line 65 of file IterationPack_AlgorithmTracker.cpp.
|
virtual |
Return a reference to a std::ostream
to be used to output debug information and the like.
Definition at line 71 of file IterationPack_AlgorithmTracker.cpp.