Improved parameter parsing from config file
This commit is contained in:
parent
cd282cc406
commit
bb9a343763
4 changed files with 127 additions and 25 deletions
31
phigrape.cpp
31
phigrape.cpp
|
|
@ -53,18 +53,27 @@ Coded by : Peter Berczik
|
|||
Version number : 19.04
|
||||
Last redaction : 2019.04.16 12:55
|
||||
*****************************************************************************/
|
||||
#include "phigrape.h"
|
||||
Parameters parameters;
|
||||
|
||||
struct Parameters {
|
||||
int live_smbh_count = 2; // ADD_BH1 or ADD_BH2
|
||||
double live_smbh_custom_eps = 0; // ADD_N_BH
|
||||
bool live_smbh_output = true; // BH_OUT
|
||||
bool live_smbh_neighbor_output = true; // BH_OUT_NB // NOTE needs `live_smbh_neighbor_number`
|
||||
bool binary_smbh_influence_sphere_output = true; // BBH_INF // NOTE needs `binary_smbh_influence_radius_factor`
|
||||
double binary_smbh_influence_radius_factor = 3.162277660168379497918067e+03; // R_INF
|
||||
int live_smbh_neighbor_number = 10; // TODO make sure it's smaller than N? or just warn if it's not
|
||||
bool binary_smbh_pn = true; // ADD_PN_BH
|
||||
bool dt_min_warning = true; // DT_MIN_WARNING
|
||||
} parameters;
|
||||
// struct Parameters {
|
||||
// double eps = 1E-4;
|
||||
// double t_end = 1;
|
||||
// double dt_disk = 0.125;
|
||||
// double dt_contr = 0.125;
|
||||
// double dt_bh = 0.125;
|
||||
// double eta = 0.01;
|
||||
// std::string input_file_name = "data.con";
|
||||
// bool dt_min_warning = true; // DT_MIN_WARNING
|
||||
// int live_smbh_count = 2; // ADD_BH1 or ADD_BH2
|
||||
// double live_smbh_custom_eps = 0; // ADD_N_BH
|
||||
// bool live_smbh_output = true; // BH_OUT
|
||||
// bool live_smbh_neighbor_output = true; // BH_OUT_NB // NOTE needs `live_smbh_neighbor_number`
|
||||
// int live_smbh_neighbor_number = 10; // TODO make sure it's smaller than N? or just warn if it's not
|
||||
// bool binary_smbh_pn = true; // ADD_PN_BH
|
||||
// bool binary_smbh_influence_sphere_output = true; // BBH_INF // NOTE needs `binary_smbh_influence_radius_factor`
|
||||
// double binary_smbh_influence_radius_factor = 3.162277660168379497918067e+03; // R_INF
|
||||
// } parameters;
|
||||
|
||||
//#define NORM // Physical normalization
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue