exposed grapite_set_eps_bh in conf

This commit is contained in:
Yohai Meiron 2021-08-30 09:31:53 -04:00
parent 6048c7748e
commit 15227a9eee
4 changed files with 13 additions and 0 deletions

View file

@ -237,6 +237,7 @@ Config::Config(std::string file_name)
grapite_mask_file_name = get_parameter<std::string>(dictionary, "grapite_mask_file_name", "grapite.mask"); grapite_mask_file_name = get_parameter<std::string>(dictionary, "grapite_mask_file_name", "grapite.mask");
etics_dump_coeffs = get_parameter<bool>(dictionary, "etics_dump_coeffs", false); etics_dump_coeffs = get_parameter<bool>(dictionary, "etics_dump_coeffs", false);
grapite_active_search = get_parameter<bool>(dictionary, "grapite_active_search", false); grapite_active_search = get_parameter<bool>(dictionary, "grapite_active_search", false);
grapite_smbh_star_eps = get_parameter<double>(dictionary, "grapite_smbh_star_eps", -1);
grapite_dev_exec_threshold = get_parameter<int>(dictionary, "grapite_dev_exec_threshold", 32); grapite_dev_exec_threshold = get_parameter<int>(dictionary, "grapite_dev_exec_threshold", 32);
#endif #endif

View file

@ -61,6 +61,7 @@ public:
std::string grapite_mask_file_name; std::string grapite_mask_file_name;
bool etics_dump_coeffs; bool etics_dump_coeffs;
bool grapite_active_search; bool grapite_active_search;
double grapite_smbh_star_eps;
int grapite_dev_exec_threshold; int grapite_dev_exec_threshold;
#endif #endif

View file

@ -217,6 +217,15 @@ dt_scf = 0.015625
# accelerate the calculation in some circumstances [default: false] # accelerate the calculation in some circumstances [default: false]
#grapite_active_search = true #grapite_active_search = true
# Custom softening length for SMBH-star interactions in the hybrid scheme only.
# This value (can also be zero) is used in the direct gravity calculation
# between SMBHs (tag=3) and both core (tag=0) and halo (tag=1) stars. If
# negative, the Plummer softening parameter (`eps`) is used in these
# interactions. Do not confuse with `live_smbh_custom_eps`, which is the
# softening length for SMBH-SMBH interactions, and works both in the normal and
# hybrid schemes. [default: -1]
#grapite_smbh_star_eps = 1E-6
# If the number of active particles in a particular bunch is bigger than this # If the number of active particles in a particular bunch is bigger than this
# threshold, then the execution is on the GPU, otherwise on the CPU. When the # threshold, then the execution is on the GPU, otherwise on the CPU. When the
# active bunch is small, the overhead of calculating the SCF gravity on the GPU # active bunch is small, the overhead of calculating the SCF gravity on the GPU

View file

@ -400,6 +400,8 @@ int main(int argc, char *argv[])
v[grapite_cep_index] = vdc; v[grapite_cep_index] = vdc;
grapite_update_cep(time_cur, xdc, vdc, zeros, zeros); grapite_update_cep(time_cur, xdc, vdc, zeros, zeros);
} }
if (config.grapite_smbh_star_eps >= 0) grapite_set_eps_bh(config.grapite_smbh_star_eps);
#endif #endif
std::vector<double3> a(N), adot(N); std::vector<double3> a(N), adot(N);