From c07aeba3c4a363831a9032e1eb11b3737e240fa6 Mon Sep 17 00:00:00 2001
From: Lisa Julia Nebel <lisa_julia.nebel@tu-dresden.de>
Date: Mon, 30 Mar 2020 15:49:22 +0200
Subject: [PATCH] Print total time needed for the whole program to run (in
 main)

---
 src/film-on-substrate.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/film-on-substrate.cc b/src/film-on-substrate.cc
index 5f2ce251..8158d7af 100644
--- a/src/film-on-substrate.cc
+++ b/src/film-on-substrate.cc
@@ -14,6 +14,7 @@
 #include <dune/common/bitsetvector.hh>
 #include <dune/common/parametertree.hh>
 #include <dune/common/parametertreeparser.hh>
+#include <dune/common/timer.hh>
 #include <dune/common/version.hh>
 
 #include <dune/grid/uggrid.hh>
@@ -115,6 +116,7 @@ struct NeumannFunction
 
 int main (int argc, char *argv[]) try
 {
+  Dune::Timer overallTimer;
   // initialize MPI, finalize is done automatically on exit
   Dune::MPIHelper& mpiHelper = MPIHelper::instance(argc, argv);
 
@@ -528,6 +530,8 @@ int main (int argc, char *argv[]) try
 
     x = solver.getSol();
 
+    std::cout << "Overall calculation took " << overallTimer.elapsed() << " sec." << std::endl;
+
     /////////////////////////////////
     //   Output result
     /////////////////////////////////
-- 
GitLab