1
0
Fork 0
mirror of https://github.com/cosmo-sims/MUSIC.git synced 2024-09-19 17:03:46 +02:00

Gadget2-plugins does not spread coarse particles across all types by default any more.

Fixed a bug causing wrong number of particle masses being written out.
Type spreading is enabled using gadget_spreadcoarse=yes
This commit is contained in:
Oliver Hahn 2013-12-09 16:05:48 +01:00
parent de436d5672
commit 2888f0d2d0

View file

@ -798,7 +798,7 @@ public:
//... write displacements in kpc/h rather than Mpc/h?
kpcunits_ = cf.getValueSafe<bool>("output","gadget_usekpc",false);
msolunits_ = cf.getValueSafe<bool>("output","gadget_usemsol",false);
spread_coarse_acrosstypes_ = cf.getValueSafe<bool>("output","gadget_spreadcoarse",true);
spread_coarse_acrosstypes_ = cf.getValueSafe<bool>("output","gadget_spreadcoarse",false);
bndparticletype_ = 5;
if( !spread_coarse_acrosstypes_ )
@ -914,7 +914,7 @@ public:
if( !spread_coarse_acrosstypes_ )
levelmaxcoarse = gh.levelmax()-1;
for( int ilevel=gh.levelmax()-4; ilevel>=(int)gh.levelmin(); --ilevel )
for( int ilevel=levelmaxcoarse; ilevel>=(int)gh.levelmin(); --ilevel )
{
// baryon particles live only on finest grid
// these particles here are total matter particles