Added mass to 3d filter

This commit is contained in:
Guilhem Lavaux 2014-07-05 22:10:17 +02:00
parent 15e824a097
commit 7df2cdbe7c
2 changed files with 8 additions and 6 deletions

View file

@ -64,12 +64,12 @@ int main(int argc, char **argv)
SimuData *p = loadGadgetMulti(fname, 0, 0);
double L0 = p->BoxSize/1000;
array_type parts(boost::extents[p->TotalNumPart][6]);
array_type parts(boost::extents[p->TotalNumPart][7]);
uint64_t q = 0;
try {
for (int cpuid=0;;cpuid++) {
p = loadGadgetMulti(fname, cpuid, NEED_POSITION|NEED_VELOCITY);
p = loadGadgetMulti(fname, cpuid, NEED_POSITION|NEED_VELOCITY|NEED_MASS);
for (uint32_t i = 0; i < p->NumPart; i++)
{
parts[q][0] = p->Pos[0][i]/1000;
@ -83,6 +83,7 @@ int main(int argc, char **argv)
parts[q][3] = p->Vel[0][i];
parts[q][4] = p->Vel[1][i];
parts[q][5] = p->Vel[2][i];
parts[q][6] = p->Mass[i];
q++;
}