Completed HDF5 support
This commit is contained in:
parent
b2943be7c1
commit
5cb4282be4
8 changed files with 258 additions and 185 deletions
|
|
@ -106,6 +106,10 @@ T Config::get_parameter(Dictionary dictionary, std::string name, T default_value
|
|||
|
||||
void Config::error_checking()
|
||||
{
|
||||
#ifndef HAS_HDF5
|
||||
if (output_hdf5)
|
||||
throw std::runtime_error("HDF5 output format (output_hdf5=true) requires the code to be compiled with HAS_HDF5");
|
||||
#endif
|
||||
if ((live_smbh_count < 0) || (live_smbh_count > 2))
|
||||
throw std::runtime_error("The number of live black holes (live_smbh_count) can be 0, 1, or 2");
|
||||
if (binary_smbh_pn && (live_smbh_count!=2))
|
||||
|
|
@ -148,6 +152,7 @@ Config::Config(std::string file_name)
|
|||
dt_bh = get_parameter<double>(dictionary, "dt_bh", dt_contr);
|
||||
eta = get_parameter<double>(dictionary, "eta");
|
||||
input_file_name = get_parameter<std::string>(dictionary, "input_file_name", "data.con");
|
||||
output_hdf5 = get_parameter<bool>(dictionary, "output_hdf5", false);
|
||||
dt_min_warning = get_parameter<bool>(dictionary, "dt_min_warning", false);
|
||||
|
||||
live_smbh_count = get_parameter<int>(dictionary, "live_smbh_count", 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue