#include <ProgressReporter.hpp>
Public Member Functions | |
ProgressReporter (std::string outputDirectory, double startTime, double endTime) | |
~ProgressReporter () | |
void | Update (double currentTime) |
void | PrintFinalising () |
void | PrintInitialising () |
Private Attributes | |
double | mStartTime |
double | mEndTime |
out_stream | mpFile |
unsigned | mLastPercentage |
Definition at line 40 of file ProgressReporter.hpp.
ProgressReporter::ProgressReporter | ( | std::string | outputDirectory, | |
double | startTime, | |||
double | endTime | |||
) | [inline] |
Constuctor saves times and opens output file ('progress_status.txt').
outputDirectory | where to open the output file | |
startTime | the start time | |
endTime | the end time |
Definition at line 61 of file ProgressReporter.hpp.
References mLastPercentage, mpFile, and OutputFileHandler::OpenOutputFile().
ProgressReporter::~ProgressReporter | ( | ) | [inline] |
Destructor.
Definition at line 77 of file ProgressReporter.hpp.
References mLastPercentage, and mpFile.
void ProgressReporter::Update | ( | double | currentTime | ) | [inline] |
Calculates the percentage completed using the time given and the start and end time and prints to file if another percent has been done.
currentTime | the given time |
Definition at line 93 of file ProgressReporter.hpp.
References mEndTime, mLastPercentage, mpFile, and mStartTime.
Referenced by AbstractCardiacProblem< SPACE_DIM, PROBLEM_DIM >::Solve().
void ProgressReporter::PrintFinalising | ( | ) | [inline] |
Print finalising message to file.
Definition at line 106 of file ProgressReporter.hpp.
References mpFile.
Referenced by AbstractCardiacProblem< SPACE_DIM, PROBLEM_DIM >::Solve().
void ProgressReporter::PrintInitialising | ( | ) | [inline] |
Print initialising message to file.
Definition at line 114 of file ProgressReporter.hpp.
References mpFile.
double ProgressReporter::mStartTime [private] |
Start time of the simulation
Definition at line 44 of file ProgressReporter.hpp.
Referenced by Update().
double ProgressReporter::mEndTime [private] |
End time of the simulation
Definition at line 46 of file ProgressReporter.hpp.
Referenced by Update().
out_stream ProgressReporter::mpFile [private] |
Progress status file
Definition at line 48 of file ProgressReporter.hpp.
Referenced by PrintFinalising(), PrintInitialising(), ProgressReporter(), Update(), and ~ProgressReporter().
unsigned ProgressReporter::mLastPercentage [private] |
Last percentage that was written
Definition at line 50 of file ProgressReporter.hpp.
Referenced by ProgressReporter(), Update(), and ~ProgressReporter().