Skip to content
Snippets Groups Projects
Commit 80bbba88 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Put the dithering parameters in the 'Gravity' section of the YAML parameter file.

parent 088bbbfc
No related branches found
No related tags found
1 merge request!952Gravity dithering
...@@ -60,18 +60,20 @@ Stars: ...@@ -60,18 +60,20 @@ Stars:
# Parameters for the self-gravity scheme # Parameters for the self-gravity scheme
Gravity: Gravity:
mesh_side_length: 32 # Number of cells along each axis for the periodic gravity mesh. mesh_side_length: 128 # Number of cells along each axis for the periodic gravity mesh.
eta: 0.025 # Constant dimensionless multiplier for time integration. eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion). theta: 0.7 # Opening angle (Multipole acceptance criterion).
comoving_DM_softening: 0.0026994 # Comoving Plummer-equivalent softening length for DM particles (in internal units). 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). 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). 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). 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. 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). 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). 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_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). 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 # Parameters for the Friends-Of-Friends algorithm
FOF: FOF:
......
...@@ -92,10 +92,10 @@ void gravity_props_init(struct gravity_props *p, struct swift_params *params, ...@@ -92,10 +92,10 @@ void gravity_props_init(struct gravity_props *p, struct swift_params *params,
/* Mesh dithering */ /* Mesh dithering */
if (periodic && !with_external_potential) { if (periodic && !with_external_potential) {
p->with_dithering = 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) { if (p->with_dithering) {
p->dithering_ratio = parser_get_opt_param_double( p->dithering_ratio =
params, "InitialConditions:dithering_ratio", 1.0); parser_get_opt_param_double(params, "Gravity:dithering_ratio", 1.0);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment