From 713e5db058ecb27e043a671ddcaeeaee4e4af381 Mon Sep 17 00:00:00 2001 From: James Willis <james.s.willis@durham.ac.uk> Date: Mon, 6 Aug 2018 10:37:25 +0100 Subject: [PATCH] Added extra parameter to yaml file for structure finding for the output frequency format. --- examples/EAGLE_6/eagle_6.yml | 20 +++++++------------ .../SmallCosmoVolume/small_cosmo_volume.yml | 14 ++++--------- src/engine.c | 4 ++-- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/examples/EAGLE_6/eagle_6.yml b/examples/EAGLE_6/eagle_6.yml index 56e894dc16..4539001585 100644 --- a/examples/EAGLE_6/eagle_6.yml +++ b/examples/EAGLE_6/eagle_6.yml @@ -8,19 +8,13 @@ InternalUnitSystem: # Structure finding options StructureFinding: - config_file_name: stf_input.cfg # Name of the STF config file. - basename: ./halo/stf # Common part of the name of output files. - output_time_format: 0 # Specifies format of delta_time. 0 for simulation steps and 1 for simulation time intervals. - time_first: 0. # Time of the first structure finding output (in internal units). - delta_time: 250 # Time difference between consecutive structure finding outputs (in internal units). Can either be given in simulation steps or simulation time intervals. - -# Define the system of units to use int VELOCIraptor. -VelociraptorUnitSystem: - UnitMass_in_cgs: 1.989e33 # M_sun in grams - UnitLength_in_cgs: 3.085678e21 # kpc in centimeters - UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second - UnitCurrent_in_cgs: 1 # Amperes - UnitTemp_in_cgs: 1 # Kelvin + config_file_name: stf_input.cfg # Name of the STF config file. + basename: ./stf # Common part of the name of output files. + output_time_format: 0 # Specifies the frequency format of structure finding. 0 for simulation steps (delta_step) and 1 for simulation time intervals (delta_time). + scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run) + time_first: 1000.0 # Time of the first structure finding output (in internal units). + delta_step: 1000 # Time difference between consecutive structure finding outputs (in internal units) in simulation steps. + delta_time: 1e-4 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals. # Cosmological parameters Cosmology: diff --git a/examples/SmallCosmoVolume/small_cosmo_volume.yml b/examples/SmallCosmoVolume/small_cosmo_volume.yml index 4e61fb35e6..f00f336ba7 100644 --- a/examples/SmallCosmoVolume/small_cosmo_volume.yml +++ b/examples/SmallCosmoVolume/small_cosmo_volume.yml @@ -10,17 +10,11 @@ InternalUnitSystem: StructureFinding: config_file_name: stf_input_6dfof_dmonly_sub.cfg # Name of the STF config file. basename: ./stf # Common part of the name of output files. - output_time_format: 0 # Specifies format of delta_time. 0 for simulation steps and 1 for simulation time intervals. + output_time_format: 0 # Specifies the frequency format of structure finding. 0 for simulation steps (delta_step) and 1 for simulation time intervals (delta_time). + scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run) time_first: 0. # Time of the first structure finding output (in internal units). - delta_time: 1000 # Time difference between consecutive structure finding outputs (in internal units). Can either be given in simulation steps or simulation time intervals. - -# Define the system of units to use int VELOCIraptor. -VelociraptorUnitSystem: - UnitMass_in_cgs: 1.989e33 # M_sun in grams - UnitLength_in_cgs: 3.085678e21 # kpc in centimeters - UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second - UnitCurrent_in_cgs: 1 # Amperes - UnitTemp_in_cgs: 1 # Kelvin + delta_step: 1000 # Time difference between consecutive structure finding outputs (in internal units) in simulation steps. + delta_time: 1e-4 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals. # WMAP9 cosmology Cosmology: diff --git a/src/engine.c b/src/engine.c index cffe1d9ce9..86a2672a7f 100644 --- a/src/engine.c +++ b/src/engine.c @@ -5559,11 +5559,11 @@ void engine_config(int restart, struct engine *e, struct swift_params *params, if (e->policy & engine_policy_structure_finding) { parser_get_param_string(params, "StructureFinding:basename", e->stfBaseName); e->timeFirstSTFOutput = parser_get_param_double(params, "StructureFinding:time_first"); - e->a_first_stf = parser_get_opt_param_double(params, "StructureFinding:a_time_first", 0.1); + e->a_first_stf = parser_get_opt_param_double(params, "StructureFinding:scale_factor_first", 0.1); //velociraptor_init(e); e->stf_output_freq_format = parser_get_param_int(params, "StructureFinding:output_time_format"); if(e->stf_output_freq_format == STEPS) { - e->deltaTimeSTF = (double)parser_get_param_int(params, "StructureFinding:delta_time"); + e->deltaTimeSTF = parser_get_param_int(params, "StructureFinding:delta_step"); } else if(e->stf_output_freq_format == TIME) { e->deltaTimeSTF = parser_get_param_double(params, "StructureFinding:delta_time"); -- GitLab