Got rid of remaining manual allocations, moved some variable declarations to where they are needed

This commit is contained in:
Yohai Meiron 2020-10-28 19:18:37 -04:00
parent aef0f26878
commit d9ed8e5131
8 changed files with 67 additions and 90 deletions

2
io.h
View file

@ -12,5 +12,5 @@ void ascii_write(const std::string file_name, const int step_num, const int N, c
void h5_read(const std::string file_name, int *step_num, int *N, double *t, double m[], double3 x[], double3 v[]);
// 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, std::vector<double> &m, std::vector<double3> &x, std::vector<double3> &v, const std::vector<double> &pot, const double3 *acc, const double3 *jrk, const int extra_mode=0, const bool use_double_precision=true);
void h5_write(const std::string file_name, const int step_num, const int N, const double t, const std::vector<double> &m, const std::vector<double3> &x, const std::vector<double3> &v, const std::vector<double> &pot, const std::vector<double3> &acc, const std::vector<double3> &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