psim  1.0
Generalized 2D phonon transport using a Monte Carlo method
outputManager.h
Go to the documentation of this file.
1 #ifndef PSIM_OUTPUTMANAGER_H
2 #define PSIM_OUTPUTMANAGER_H
3 
4 #include "sensor.h"// for SensorMeasurements
5 #include <chrono>// for filesystem
6 #include <cstddef>// for size_t
7 #include <filesystem>// for path
8 #include <string>// for string
9 #include <vector>// for vector
10 
11 namespace fs = std::filesystem;
12 
13 
15 public:
16  OutputManager() = default;
17  void steadyStateExport(const fs::path& filepath, double time) const;
27  void periodicExport(const fs::path& filepath, double time) const;
28  void addMeasurement(SensorMeasurements&& measurement) noexcept;
29  void sortMeasurements() noexcept;
30  void setStepInterval(std::size_t interval) noexcept {
31  step_interval_ = interval;
32  }
33 
34 private:
35  std::size_t step_interval_{ 1 };
36  std::vector<SensorMeasurements> measurements_;
37 
38  [[nodiscard]] static std::filesystem::path adjustPath(const fs::path& filepath, const std::string& prepend);
39  [[nodiscard]] static std::string getCurrentDateTime();
40 };
41 
42 
43 #endif// PSIM_OUTPUTMANAGER_H
Definition: outputManager.h:14
void periodicExport(const fs::path &filepath, double time) const
Definition: outputManager.cpp:31
void sortMeasurements() noexcept
Definition: outputManager.cpp:72
void setStepInterval(std::size_t interval) noexcept
Definition: outputManager.h:30
void steadyStateExport(const fs::path &filepath, double time) const
Definition: outputManager.cpp:18
void addMeasurement(SensorMeasurements &&measurement) noexcept
Definition: outputManager.cpp:68
OutputManager()=default
Definition: sensor.h:81