Skip to content
Snippets Groups Projects
Commit 9cb176a8 authored by James Willis's avatar James Willis
Browse files

Fix after merge with master. Hard coded G, needs fixing.

parent d51b401b
No related branches found
No related tags found
1 merge request!578Swift velociraptor
......@@ -366,6 +366,7 @@ void engine_barrier(struct engine *e);
void engine_compute_next_snapshot_time(struct engine *e);
void engine_compute_next_stf_time(struct engine *e);
void engine_compute_next_statistics_time(struct engine *e);
void engine_recompute_displacement_constraint(struct engine *e);
void engine_unskip(struct engine *e);
void engine_drift_all(struct engine *e);
void engine_drift_top_multipoles(struct engine *e);
......
......@@ -57,7 +57,7 @@ void velociraptor_init(struct engine *e) {
error("Failed to allocate VELOCIraptor conversion factors.");
/* Initialize velociraptor unit system and constants */
units_init(e->stf_units, e->parameter_file, "VelociraptorUnitSystem");
units_init_from_params(e->stf_units, e->parameter_file, "VelociraptorUnitSystem");
phys_const_init(e->stf_units, e->parameter_file, &vel_const);
/* Set cosmological constants. */
......@@ -82,7 +82,8 @@ 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 = 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->hubbleunit = e->cosmology->H; /* TODO: double check this. */
unit_info = *e->stf_conv_fac;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment