Added asserts and docs about methods that cannot be called if done().

This commit is contained in:
Atgeirr Flø Rasmussen committed 2012-03-12 16:19:41 +01:00
1 parent 2132b0ed79
commit 87cad4ccff
2 files changed
+4

No files matched your search

+2
View File
@@ -69,6 +69,7 @@ namespace Opm
/// Current step length.
double SimulatorTimer::currentStepLength() const
{
ASSERT(!done());
return timesteps_[current_step_];
}
@@ -97,6 +98,7 @@ namespace Opm
/// Next step.
SimulatorTimer& SimulatorTimer::operator++()
{
ASSERT(!done());
current_time_ += timesteps_[current_step_];
++current_step_;
return *this;
+2
View File
@@ -51,6 +51,7 @@ namespace Opm
int currentStepNum() const;
/// Current step length.
/// Note: if done(), it is an error to call currentStepLength().
double currentStepLength() const;
/// Current time.
@@ -60,6 +61,7 @@ namespace Opm
double totalTime() const;
/// Print a report with current and total time etc.
/// Note: if done(), it is an error to call report().
void report(std::ostream& os) const;
/// Next step.