Commit f90688b0 authored by jclamber's avatar jclamber

fig bug with gadegt2 and big nbody bc of ntotmasses in float, changed to int

git-svn-id: http://svn.oamp.fr/repos/unsio/trunk@189 ce2cc22f-6084-46ce-a062-084b172ee5dc
parent 592e295c
......@@ -75,7 +75,7 @@ namespace uns {
bytes_counter = 0;
multiplefiles = 0;
lonely_file = true;
ntotmasses = 0.0;
ntotmasses = 0;
verbose = verb;
int fail = open(filename);
......@@ -375,7 +375,7 @@ int CSnapshotGadgetIn::read(uns::UserSelection &user_select)
load_bits |= MASS_BIT;
ok=true;
bytes_counter=0;
if (ntotmasses>0.) { // different masses
if (ntotmasses>0) { // different masses
len1 = readFRecord(); // we must read from disk
checkFileVsArray(len1,sizeof(float),ntotmasses);
}
......@@ -399,7 +399,7 @@ int CSnapshotGadgetIn::read(uns::UserSelection &user_select)
}
} // for n
} // for k
if (ntotmasses > 0.) { // different masses
if (ntotmasses > 0) { // different masses
len2 = readFRecord(); // we must read from disk
if (len2==len1) ; // remove warning....
assert(in.good() && len2==len1 && len1==bytes_counter);
......@@ -548,7 +548,7 @@ int CSnapshotGadgetIn::read(uns::UserSelection &user_select)
} // end of while readBlock
// add masses if no BLOCK_MASS present (mass inside the header)
if (ntotmasses == 0. && req_bits&MASS_BIT) { // no BLOCK_MASS present (mass inside the header)
if (ntotmasses == 0 && req_bits&MASS_BIT) { // no BLOCK_MASS present (mass inside the header)
load_bits |= MASS_BIT;
// allocate memory if NULL pointer
if (! mass ) mass = new float[nsel ];
......
......@@ -148,7 +148,7 @@ typedef struct particle_data_lite
int czs, czsmt; // constant for zs and zsmt
int bits; // to store the bits components
float tframe,redshift;
float ntotmasses;
int ntotmasses;
t_io_header_1 header;
int npartTotal, npart, npart_total_local;
int array_vs_file_size; // array vs file 0:same 1:smaler(half) 2:bigger(double)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment