Lots of cleanup and started moving the PN out of the main

This commit is contained in:
Yohai Meiron 2020-04-18 21:48:46 -04:00
parent 30ae8631a9
commit 2a50f0fc9a
3 changed files with 278 additions and 219 deletions

6
io.cpp
View file

@ -174,9 +174,9 @@ void h5_write(const std::string file_name, const int step_num, const int N, cons
write_dataset("X", 2, (double*)x);
write_dataset("V", 2, (double*)v);
bool write_pot = (extra_mode ) % 2;
bool write_acc = (extra_mode >> 1) % 2;
bool write_jrk = (extra_mode >> 2) % 2;
bool write_pot = (extra_mode ) & 1;
bool write_acc = (extra_mode >> 1) & 1;
bool write_jrk = (extra_mode >> 2) & 1;
if (write_pot) write_dataset("POT", 1, (double*)pot);
if (write_acc) write_dataset("ACC", 2, (double*)acc);
if (write_jrk) write_dataset("JRK", 2, (double*)jrk);