Fixes to SDF loader

This commit is contained in:
Guilhem Lavaux 2013-03-05 14:56:44 +01:00
parent 7737010071
commit 1c1c8b778e
2 changed files with 4 additions and 2 deletions

View file

@ -645,7 +645,7 @@ int main(int argc, char **argv)
#ifdef SDF_SUPPORT
else if (args_info.sdf_given)
{
loader = sdfLoader(args_info.sdf_arg, args_info.sdf_splitting_arg, NEED_POSITION|NEED_VELOCITY|NEED_GADGET_ID, preselector);
loader = sdfLoader(args_info.sdf_arg, NEED_POSITION|NEED_VELOCITY|NEED_GADGET_ID, args_info.sdf_splitting_arg, preselector);
}
#endif
else

View file

@ -193,6 +193,7 @@ SimulationLoader *sdfLoader(const std::string& snapshot, int flags,
{
return 0;
}
cout << "Loading SDF with artificial splitting " << num_splitting << endl;
SDFgetintOrDefault(sdfp, "version", &fileversion, 1);
if (fileversion == 1)
@ -215,7 +216,8 @@ SimulationLoader *sdfLoader(const std::string& snapshot, int flags,
}
double h0;
h0 = hdr->Hubble*10.0*(one_kpc/one_Gyr);
hdr->Hubble *= 10.0;
h0 = hdr->Hubble*(one_kpc/one_Gyr);
if (SDFhasname("R0", sdfp))
{