Fixed types for loading large simulations

This commit is contained in:
Guilhem Lavaux 2014-11-28 08:55:07 +01:00
parent df50699799
commit 37c677fd1f
4 changed files with 29 additions and 8 deletions

View file

@ -67,7 +67,7 @@ void loadGadgetHeader(UnformattedRead *f, GadgetHeader& h, SimuData *data, int i
data->Hubble = h.HubbleParam = f->readReal64();
f->endCheckpoint(true);
long NumPart = 0, NumPartTotal = 0;
ssize_t NumPart = 0, NumPartTotal = 0;
for(int k=0; k<6; k++)
{
NumPart += h.npart[k];
@ -112,7 +112,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id,
return 0;
}
long NumPart = 0, NumPartTotal = 0;
ssize_t NumPart = 0, NumPartTotal = 0;
try
{

View file

@ -74,8 +74,8 @@ namespace CosmoTool
float Omega_M;
float Omega_Lambda;
long NumPart;
long TotalNumPart;
ssize_t NumPart;
ssize_t TotalNumPart;
long *Id;
float *Pos[3];
float *Vel[3];