Commit 19d8094c authored by Markus Wolff's avatar Markus Wolff
Browse files

Bugfix in shouldWriteRestart()

   - avoid division by zero

   reviewed by Melanie



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10273 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent efd401f6
......@@ -450,9 +450,15 @@ public:
*/
bool shouldWriteRestartFile() const
{
return
timeManager().timeStepIndex() > 0 &&
(timeManager().timeStepIndex() % int(100*outputInterval_) == 0);
if (outputInterval_ > 0)
{
return
timeManager().timeStepIndex() > 0 &&
(timeManager().timeStepIndex() % int(100*outputInterval_) == 0);
}
else
return
shouldWriteOutput();
}
/*!
......@@ -508,11 +514,11 @@ public:
*/
void episodeEnd()
{
if (outputTimeInterval_ > 0.0 && !timeManager().willBeFinished())
if (outputTimeInterval_ > 0.0 && !timeManager().finished())
{
timeManager().startNextEpisode(outputTimeInterval_);
}
else if (!timeManager().willBeFinished())
else if (!timeManager().finished())
{
std::cerr << "The end of an episode is reached, but the problem "
<< "does not override the episodeEnd() method. "
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment