Skip to content

Commit

Permalink
Relaxing radius condition in galaxy_mergers
Browse files Browse the repository at this point in the history
This is to avoid crashing the code when the PSO is running
combinations of parameters that give crazy galaxy populations.
  • Loading branch information
cdplagos committed Jul 17, 2024
1 parent e70ecda commit 7033ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/galaxy_mergers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ double GalaxyMergers::bulge_size_merger(double mass_ratio, double mgas_ratio, co

double r = r_remnant(mtotal_central, mbar_satellite, rcentral, rsatellite);

if((std::isnan(r) || r <= 0 || r >= 3) && (mtotal_central > 0 || mbar_satellite > 0)){
if((std::isnan(r) || r <= 0 || r >= 5) && (mtotal_central > 0 || mbar_satellite > 0)){
std::ostringstream os;
os << central << " has a bulge size not well defined in galaxy mergers: " << r << " with central and satellite radii " <<
rcentral << " and " << rsatellite << " and masses central satellite " << mtotal_central << " " << mbar_satellite
Expand Down

0 comments on commit 7033ece

Please sign in to comment.