From 880ca7dcf03ed858b02feb8d35c04adbee76a6b2 Mon Sep 17 00:00:00 2001 From: Folkert Nobels <nobels@strw.leidenuniv.nl> Date: Mon, 26 Nov 2018 16:14:24 +0100 Subject: [PATCH] Rename MD and MB to diskfraction and bulgefraction --- .../IsolatedGalaxy_potential/isolated_galaxy.yml | 4 ++-- examples/parameter_example.yml | 4 ++-- src/potential/hernquist/potential.h | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/IsolatedGalaxy_potential/isolated_galaxy.yml b/examples/IsolatedGalaxy_potential/isolated_galaxy.yml index 8c6455d99f..deee132ee3 100644 --- a/examples/IsolatedGalaxy_potential/isolated_galaxy.yml +++ b/examples/IsolatedGalaxy_potential/isolated_galaxy.yml @@ -49,8 +49,8 @@ HernquistPotential: M200: 30.0 # M200 of the galaxy disk h: 0.704 # reduced Hubble constant (value does not specify the used units!) concentration: 7.1 # concentration of the Halo - MD: 0.0434370991372 # Disk mass fraction - MB: 0.00705852860979 # Bulge mass fraction + diskfraction: 0.0434370991372 # Disk mass fraction + bulgefraction: 0.00705852860979 # Bulge mass fraction timestep_mult: 0.01 # Dimensionless pre-factor for the time-step condition, basically determines the fraction of the orbital time we use to do the time integration epsilon: 0.030 # Softening size (internal units) diff --git a/examples/parameter_example.yml b/examples/parameter_example.yml index 7681b34e55..6adccf2963 100644 --- a/examples/parameter_example.yml +++ b/examples/parameter_example.yml @@ -202,8 +202,8 @@ HernquistPotential: R200: 10. # (Optional 1c) R200 of the galaxy+halo (when used M200 and V200 are not used, if M200 or V200 are given they are used) h: 0.704 # (Optional 1) reduced Hubble constant concentration: 7.1 # (Optional 1) concentration of the Halo - MD: 0.0434370991372 # (Optional 1) Disk mass fraction - MB: 0.00705852860979 # (Optional 1) Bulge mass fraction + diskfraction: 0.0434370991372 # (Optional 1) Disk mass fraction (equal to MD in MakeNewDisk and GalIC) + bulgefraction: 0.00705852860979 # (Optional 1) Bulge mass fraction (equal to MB in MakeNewDisk and GalIC) timestep_mult: 0.01 # Dimensionless pre-factor for the time-step condition, basically determines the fraction of the orbital time we use to do the time integration epsilon: 0.1 # Softening size (internal units) diff --git a/src/potential/hernquist/potential.h b/src/potential/hernquist/potential.h index 19477974e2..1dcdc9d77c 100644 --- a/src/potential/hernquist/potential.h +++ b/src/potential/hernquist/potential.h @@ -259,13 +259,13 @@ static INLINE void potential_init_backend( /* Depending on the disk mass and and the bulge mass the halo * gets a different mass, because of this we read the fractions * from the parameter file and calculate the absolute mass*/ - const double MD = - parser_get_param_double(parameter_file, "HernquistPotential:MD"); - const double MB = - parser_get_param_double(parameter_file, "HernquistPotential:MB"); - /* Calculate the mass of the bulge and disk from the parameters */ - const double Mdisk = M200 * MD; - const double Mbulge = M200 * MB; + const double diskfraction = + parser_get_param_double(parameter_file, "HernquistPotential:diskfraction"); + const double bulgefraction = + parser_get_param_double(parameter_file, "HernquistPotential:bulgefraction"); + /* Calculate the mass of the bulge and disk from the parameters */ + const double Mdisk = M200 * diskfraction; + const double Mbulge = M200 * bulgefraction; /* Store the mass of the DM halo */ potential->mass = M200 - Mdisk - Mbulge; -- GitLab