diff --git a/examples/parameter_example.yml b/examples/parameter_example.yml index 5ae4235a0d2c6f26c8628f1f6ebdfaff86d13115..1eff349e0b6d6666a4b84a253864f5a8a44575da 100644 --- a/examples/parameter_example.yml +++ b/examples/parameter_example.yml @@ -60,18 +60,20 @@ Stars: # Parameters for the self-gravity scheme Gravity: - mesh_side_length: 32 # Number of cells along each axis for the periodic gravity mesh. - eta: 0.025 # Constant dimensionless multiplier for time integration. - theta: 0.7 # Opening angle (Multipole acceptance criterion). - comoving_DM_softening: 0.0026994 # Comoving Plummer-equivalent softening length for DM particles (in internal units). - max_physical_DM_softening: 0.0007 # Maximal Plummer-equivalent softening length in physical coordinates for DM particles (in internal units). + mesh_side_length: 128 # Number of cells along each axis for the periodic gravity mesh. + eta: 0.025 # Constant dimensionless multiplier for time integration. + theta: 0.7 # Opening angle (Multipole acceptance criterion). + comoving_DM_softening: 0.0026994 # Comoving Plummer-equivalent softening length for DM particles (in internal units). + max_physical_DM_softening: 0.0007 # Maximal Plummer-equivalent softening length in physical coordinates for DM particles (in internal units). comoving_baryon_softening: 0.0026994 # Comoving Plummer-equivalent softening length for baryon particles (in internal units). max_physical_baryon_softening: 0.0007 # Maximal Plummer-equivalent softening length in physical coordinates for baryon particles (in internal units). softening_ratio_background: 0.04 # Fraction of the mean inter-particle separation to use as Plummer-equivalent softening for the background DM particles. - rebuild_frequency: 0.01 # (Optional) Frequency of the gravity-tree rebuild in units of the number of g-particles (this is the default value). - a_smooth: 1.25 # (Optional) Smoothing scale in top-level cell sizes to smooth the long-range forces over (this is the default value). - r_cut_max: 4.5 # (Optional) Cut-off in number of top-level cells beyond which no FMM forces are computed (this is the default value). - r_cut_min: 0.1 # (Optional) Cut-off in number of top-level cells below which no truncation of FMM forces are performed (this is the default value). + rebuild_frequency: 0.01 # (Optional) Frequency of the gravity-tree rebuild in units of the number of g-particles (this is the default value). + a_smooth: 1.25 # (Optional) Smoothing scale in top-level cell sizes to smooth the long-range forces over (this is the default value). + r_cut_max: 4.5 # (Optional) Cut-off in number of top-level cells beyond which no FMM forces are computed (this is the default value). + r_cut_min: 0.1 # (Optional) Cut-off in number of top-level cells below which no truncation of FMM forces are performed (this is the default value). + dithering: 1 # (Optional) Activate the dithering of the gravity mesh at every rebuild (this is the default value). + dithering_ratio: 1.0 # (Optional) Magnitude of each component of the dithering vector in units of the top-level cell sizes (this is the default value). # Parameters for the Friends-Of-Friends algorithm FOF: diff --git a/src/gravity_properties.c b/src/gravity_properties.c index 701a8cc0c92c9b831ad12a01812e12df884b846d..6b21b20b8ee8ab3986f7c04f0b4442f9e276e0d7 100644 --- a/src/gravity_properties.c +++ b/src/gravity_properties.c @@ -92,10 +92,10 @@ void gravity_props_init(struct gravity_props *p, struct swift_params *params, /* Mesh dithering */ if (periodic && !with_external_potential) { p->with_dithering = - parser_get_opt_param_int(params, "InitialConditions:dithering", 1); + parser_get_opt_param_int(params, "Gravity:dithering", 1); if (p->with_dithering) { - p->dithering_ratio = parser_get_opt_param_double( - params, "InitialConditions:dithering_ratio", 1.0); + p->dithering_ratio = + parser_get_opt_param_double(params, "Gravity:dithering_ratio", 1.0); } }