|
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. | |
Algorithm iteration state notification | |
| virtual void | initialize () |
| Reinitialize the track object right before it is used. | |
| virtual void | output_iteration (const Algorithm &algo) const |
| Output information about an iteration just completed. | |
| virtual void | output_final (const Algorithm &algo, EAlgoReturn algo_return) const |
| Output information about a just completed algorithm. | |
Journal file access | |
| virtual void | set_journal_out (const ostream_ptr_t &journal_out) |
| Set a smart pointer to the journal file. | |
| const ostream_ptr_t & | get_journal_out () const |
| Get the smart pointer to the journal file. | |
| virtual std::ostream & | journal_out () const |
Return a reference to a std::ostream to be used to output debug information and the like. | |
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.
| virtual IterationPack::AlgorithmTracker::~AlgorithmTracker | ( | ) | [inline, virtual] |
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.
| void IterationPack::AlgorithmTracker::initialize | ( | ) | [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.
| void IterationPack::AlgorithmTracker::output_iteration | ( | const Algorithm & | algo | ) | const [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.
| void IterationPack::AlgorithmTracker::output_final | ( | const Algorithm & | algo, |
| EAlgoReturn | algo_return | ||
| ) | const [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.
| void IterationPack::AlgorithmTracker::set_journal_out | ( | const ostream_ptr_t & | journal_out | ) | [virtual] |
Set a smart pointer to the journal file.
Definition at line 59 of file IterationPack_AlgorithmTracker.cpp.
Get the smart pointer to the journal file.
Definition at line 65 of file IterationPack_AlgorithmTracker.cpp.
| std::ostream & IterationPack::AlgorithmTracker::journal_out | ( | ) | const [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.
1.7.6.1