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

Set the smoothing-lengths to the mean inter-particle separation including the correct h-scaling

This commit is contained in:
Matthieu Schaller 2021-02-28 17:33:27 +01:00
parent 1ef2b417e3
commit 622b61cac7

View file

@ -152,7 +152,11 @@ public:
std::vector<write_real_t> data( npart_[0], ceint );
HDFWriteDataset(this_fname_, "PartType0/InternalEnergy", data);
data.assign( npart_[0], boxsize_ / cf_.get_value<double>("setup","GridRes") );
const double h = boxsize_ / hubble_param_ / cf_.get_value<double>("setup","GridRes");
music::ilog.Print("Swift : set initial smoothing length to mean inter-part separation: %.2f Mpc", h);
data.assign( npart_[0], h);
HDFWriteDataset(this_fname_, "PartType0/SmoothingLength", data);
}