ReFRACtor
log_timing.h
Go to the documentation of this file.
1 #ifndef LOG_TIMING_H
2 #define LOG_TIMING_H
3 #include "printable.h"
4 #include "connor_solver.h"
5 #include <boost/timer.hpp>
6 
7 namespace FullPhysics {
8 
9 /****************************************************************/
14 class LogTiming : public Printable<LogTiming>, public Observer<ConnorSolver> {
15 public:
16  LogTiming();
17  virtual ~LogTiming() {};
18  virtual void notify_update(const ConnorSolver& Solver);
19  virtual void print(std::ostream& Os) { Os << "LogTiming";}
20  virtual void write_to_log(const std::string& Prefix = "") const;
21 private:
22  int number_divergent;
23  int number_iteration;
24  boost::timer wall_clock;
25  double cpu_factor;
26  double speed_mhz;
27  std::string cpu_model;
28  std::string hostname;
29  static const double cpu_reference_speed;
30 };
31 }
32 
33 #endif
virtual void notify_update(const ConnorSolver &Solver)
Called when the Observed object is updated.
Definition: log_timing.cc:20
virtual void print(std::ostream &Os)
Definition: log_timing.h:19
This is a helper class that logs basic timing information to the Logger.
Definition: log_timing.h:14
This is a Mixin for classes that can be printed.
Definition: printable.h:24
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual void write_to_log(const std::string &Prefix="") const
Write data to disk.
Definition: log_timing.cc:75
LogTiming()
Constructor.
Definition: log_timing.cc:31
Simple Mixin to be and Observer of another object of class T.
Definition: observer.h:29

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:10