]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clean things up with a delegating constructor call.
authorDavid Wells <wellsd2@rpi.edu>
Thu, 17 Aug 2017 23:12:37 +0000 (19:12 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Fri, 18 Aug 2017 22:24:40 +0000 (18:24 -0400)
source/base/timer.cc

index 0b3cc34f6e158d538d38ac7af8cfd3b1b733345e..ac443cce6b143fbef3c9521cccc8a45a51b77398 100644 (file)
 
 DEAL_II_NAMESPACE_OPEN
 
-// in case we use an MPI compiler, need
-// to create a communicator just for the
-// current process
 Timer::Timer()
   :
-  current_lap_starting_cpu_time (0.),
-  current_lap_starting_wall_time (0.),
-  accumulated_cpu_time (0.),
-  accumulated_wall_time (0.),
-  last_lap_time (numbers::signaling_nan<double>()),
-  last_lap_cpu_time(numbers::signaling_nan<double>()),
-  running (false)
-#ifdef DEAL_II_WITH_MPI
-  ,
-  mpi_communicator (MPI_COMM_SELF),
-  sync_wall_time (false)
-#endif
-{
-#ifdef DEAL_II_WITH_MPI
-  mpi_data.sum = mpi_data.min = mpi_data.max = mpi_data.avg = numbers::signaling_nan<double>();
-  mpi_data.min_index = mpi_data.max_index = numbers::invalid_unsigned_int;
-  mpi_total_data.sum = mpi_total_data.min = mpi_total_data.max = mpi_total_data.avg = 0.;
-  mpi_total_data.min_index = mpi_total_data.max_index = 0;
-#endif
-
-  start();
-}
+  Timer(MPI_COMM_SELF, /*sync_wall_time=*/false)
+{}
 
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.