#include <clock.h>
Clock with explicitly defined time steps. 
Definition at line 317 of file clock.h.
 
◆ CustomClock()
  
  
      
        
          | smash::CustomClock::CustomClock  | 
          ( | 
          std::vector< double >  | 
          times | ) | 
           | 
         
       
   | 
  
inlineexplicit   | 
  
 
Initialises a custom clock with explicitly given output times. 
- Parameters
 - 
  
    | [in] | times | vector of desired output times  | 
  
   
Definition at line 324 of file clock.h.
 
 
◆ current_time()
  
  
      
        
          | double smash::CustomClock::current_time  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
- Returns
 - the current time 
 
- Exceptions
 - 
  
    | runtime_error | if the clock has never been advanced  | 
  
   
Implements smash::Clock.
Definition at line 332 of file clock.h.
  337       throw std::runtime_error(
"Trying to access undefined zeroth output time");
 
 
 
 
◆ next_time()
  
  
      
        
          | double smash::CustomClock::next_time  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
 
◆ timestep_duration()
  
  
      
        
          | double smash::CustomClock::timestep_duration  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
 
◆ reset()
  
  
      
        
          | void smash::CustomClock::reset  | 
          ( | 
          double  | 
          start_time,  | 
         
        
           | 
           | 
          bool  | 
          is_output_clock  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
reset the clock to the starting time of the simulation 
- Parameters
 - 
  
    | [in] | start_time | starting time of the imulation  | 
    | [in] | is_output_clock | whether this is an output clock rather than a lab clock  | 
  
   
Implements smash::Clock.
Definition at line 347 of file clock.h.
 
 
◆ remove_times_in_past()
  
  
      
        
          | void smash::CustomClock::remove_times_in_past  | 
          ( | 
          double  | 
          start_time | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Remove all custom times before start_time. 
- Parameters
 - 
  
    | [in] | start_time | starting time of the simulation  | 
  
   
Implements smash::Clock.
Definition at line 357 of file clock.h.
  359                    [start_time](
double t) {
 
  360                      if (t <= start_time) {
 
  361                        logg[
LClock].warn(
"Removing custom output time ", t,
 
  362                                          " fm since it is earlier than the " 
  363                                          "starting time of the simulation");
 
 
 
 
◆ custom_times_
  
  
      
        
          | std::vector<double> smash::CustomClock::custom_times_ | 
         
       
   | 
  
private   | 
  
 
Vector of times where output is generated. 
Definition at line 373 of file clock.h.
 
 
◆ start_time_
  
  
      
        
          | double smash::CustomClock::start_time_ = 0. | 
         
       
   | 
  
private   | 
  
 
Starting time of the simulation. 
Definition at line 375 of file clock.h.
 
 
The documentation for this class was generated from the following file: