diff --git a/dumux/common/timemanager.hh b/dumux/common/timemanager.hh index 3667e2bd4c65fcbddf5d68c22214a9e1da09ca79..6164676dc3aef97d06e69ccac899185d8f5e051a 100644 --- a/dumux/common/timemanager.hh +++ b/dumux/common/timemanager.hh @@ -105,6 +105,8 @@ public: Scalar tEnd, bool restart = false) { + timer_.reset(); + problem_ = &problem; time_ = tStart; timeStepSize_ = dtInitial; @@ -129,6 +131,13 @@ public: time_ += timeStepSize_; } + if (verbose_) { + int numProcesses = Dune::MPIHelper::getCollectiveCommunication().size(); + std::cout << "Initialization took " << timer_.elapsed() <<" seconds on " + << numProcesses << " processes.\n" + << "The cumulative CPU time was " << timer_.elapsed()*numProcesses << " seconds.\n"; + } + } /*!