consecutive_snapshots.hpp
Go to the documentation of this file.
1 
6 #ifndef CONSECUTIVE_SNAPSHOTS_HPP
7 #define CONSECUTIVE_SNAPSHOTS_HPP 1
8 
9 #include <memory>
10 #include "main_loop_2d.hpp"
11 #include "index2filename.hpp"
12 #include "trigger.hpp"
13 #include "../two_dimensional/hdf5_diagnostics.hpp"
14 
17 {
18 public:
19 
25  Index2FileName* i2fn);
26 
33  Index2FileName* i2fn,
34  const vector<DiagnosticAppendix*>& appendices);
35 
36  void operator()(const hdsim& sim);
37 
38  ~ConsecutiveSnapshots(void);
39 
40 private:
41 #if (__cplusplus >= 201103L)
42  std::unique_ptr<Trigger> trigger_;
43  std::unique_ptr<Index2FileName> i2fn_;
44 #else
45  std::auto_ptr<Trigger> trigger_;
46  std::auto_ptr<Index2FileName> i2fn_;
47 #endif
48  int counter_;
49  const vector<DiagnosticAppendix*> appendices_;
50 };
51 
52 #endif // CONSECUTIVE_SNAPSHOTS_HPP
A diagnostic class that writes snapshots at regular intervals.
Newtonian hydrodynamic simulation.
Definition: hdsim2d.hpp:43
ConsecutiveSnapshots(Trigger *trigger, Index2FileName *i2fn)
Class constructor.
Standard simulation time advance loop.
Abstract class for a diagnostic function.
Class for generating sequential file names.
void operator()(const hdsim &sim)
Perform diagnostics.
Abstract class for triggering events.
Definition: trigger.hpp:12
Trigger for diagnostic function.