Re-added ramses loader, multidark loader

This commit is contained in:
Guilhem Lavaux 2012-11-24 09:40:58 -06:00
parent 1a190a6be0
commit 6fbf034768
5 changed files with 149 additions and 106 deletions

View file

@ -44,14 +44,16 @@ public:
d = loadRamsesSimu(snapshot_name.c_str(), baseid, id, double_precision, load_flags);
assert(d != 0);
long *uniqueID = new long[d->NumPart];
for (long i = 0; i < d->NumPart; i++)
{
uniqueID[i] = d->Id[i];
}
d->new_attribute("uniqueID", uniqueID, delete_adaptor<long>);
if (d->Id != 0)
{
long *uniqueID = new long[d->NumPart];
for (long i = 0; i < d->NumPart; i++)
{
uniqueID[i] = d->Id[i];
}
d->new_attribute("uniqueID", uniqueID, delete_adaptor<long>);
}
applyTransformations(d);