From 22affead655da3e7c2d2d2fe88625f76ca533e6e Mon Sep 17 00:00:00 2001 From: James Willis <james.s.willis@durham.ac.uk> Date: Fri, 27 Jul 2018 13:47:13 +0100 Subject: [PATCH] Commented out the setting of G from the parameter file. This bug will be fixed in the future. --- src/engine.h | 2 +- src/physical_constants.c | 4 ++-- src/velociraptor_interface.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/engine.h b/src/engine.h index d556ae88ef..13929ed7be 100644 --- a/src/engine.h +++ b/src/engine.h @@ -412,7 +412,7 @@ void engine_clean(struct engine *e); int engine_estimate_nr_tasks(struct engine *e); #ifdef HAVE_SETAFFINITY -cpu_set_t *engine_entry_affinity(); +cpu_set_t *engine_entry_affinity(void); #endif /* Struct dump/restore support. */ diff --git a/src/physical_constants.c b/src/physical_constants.c index 3936d07f42..d6480c37e0 100644 --- a/src/physical_constants.c +++ b/src/physical_constants.c @@ -48,8 +48,8 @@ void phys_const_init(const struct unit_system *us, struct swift_params *params, const_newton_G_cgs / units_general_cgs_conversion_factor(us, dimension_G); /* Overwrite G if present in the file */ - internal_const->const_newton_G = parser_get_opt_param_double( - params, "PhysicalConstants:G", internal_const->const_newton_G); + //internal_const->const_newton_G = parser_get_opt_param_double( + // params, "PhysicalConstants:G", internal_const->const_newton_G); const float dimension_c[5] = {0, 1, -1, 0, 0}; /* [cm s^-1] */ internal_const->const_speed_light_c = diff --git a/src/velociraptor_interface.c b/src/velociraptor_interface.c index ad20c288de..caf18ac36c 100644 --- a/src/velociraptor_interface.c +++ b/src/velociraptor_interface.c @@ -82,8 +82,7 @@ void velociraptor_init(struct engine *e) { e->stf_conv_fac->velocitytokms = units_conversion_factor(e->internal_units, e->stf_units, UNIT_CONV_SPEED); /* 1km/s <=> 1e5cm/s */ e->stf_conv_fac->masstosolarmass = units_conversion_factor(e->internal_units, e->stf_units, UNIT_CONV_MASS); /* 1M_sol <=> 1.99e33g */ e->stf_conv_fac->energyperunitmass = units_conversion_factor(e->internal_units, e->stf_units, UNIT_CONV_ENERGY_PER_UNIT_MASS); /* Conversion for gravitational potential. */ - //e->stf_conv_fac->gravity = vel_const.const_newton_G; /* TODO: G = 6.67408e-8 (cgs) */ - e->stf_conv_fac->gravity = 4.302051e-06; /* TODO: G = 6.67408e-8 (cgs) */ + e->stf_conv_fac->gravity = vel_const.const_newton_G; /* TODO: G = 6.67408e-8 (cgs) */ e->stf_conv_fac->hubbleunit = e->cosmology->H; /* TODO: double check this. */ unit_info = *e->stf_conv_fac; -- GitLab