#pragma once #include #include #include "double3.h" struct Input_data { int N, step_num; double t; std::vector m; std::vector x, v; }; bool is_hdf5(std::string file_name); // This function is implemented independently of the HDF5 library Input_data ascii_read(const std::string &file_name); void ascii_write(const std::string file_name, const int step_num, const int N, const double t, const std::vector &m, const std::vector &x, const std::vector &v, int precision=10); Input_data h5_read(const std::string &file_name); // In case the code is compiled without HDF5 support, the implementation of this function just throws an error void h5_write(const std::string file_name, const int step_num, const int N, const double t, const std::vector &m, const std::vector &x, const std::vector &v, const std::vector &pot, const std::vector &acc, const std::vector &jrk, const int extra_mode=0, const bool use_double_precision=true); // In case the code is compiled without HDF5 support, the implementation of this function just throws an error