mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
large files now appear to be supported
This commit is contained in:
parent
acd9329b06
commit
7f020f15e5
2 changed files with 3 additions and 2 deletions
|
@ -359,7 +359,7 @@ void saveBox(SimuData *&boxed, const std::string& outbox)
|
||||||
NcVar *v4 = f.add_var("unique_ids_lsb", ncLong, NumPart_dim);
|
NcVar *v4 = f.add_var("unique_ids_lsb", ncLong, NumPart_dim);
|
||||||
NcVar *v5 = f.add_var("unique_ids_msb", ncLong, NumPart_dim);
|
NcVar *v5 = f.add_var("unique_ids_msb", ncLong, NumPart_dim);
|
||||||
|
|
||||||
nclong *tmp_int = new nclong(boxed->NumPart);
|
nclong *tmp_int = new nclong[boxed->NumPart];
|
||||||
for (long i = 0; i < boxed->NumPart; i++)
|
for (long i = 0; i < boxed->NumPart; i++)
|
||||||
tmp_int[i] = (nclong)(((unsigned long)uniqueID[i]) & 0xffffffff);
|
tmp_int[i] = (nclong)(((unsigned long)uniqueID[i]) & 0xffffffff);
|
||||||
v4->put(tmp_int, boxed->NumPart);
|
v4->put(tmp_int, boxed->NumPart);
|
||||||
|
|
|
@ -53,6 +53,7 @@ public:
|
||||||
simu->Vel[2] = new float[simu->NumPart];
|
simu->Vel[2] = new float[simu->NumPart];
|
||||||
simu->Id = new long[simu->NumPart];
|
simu->Id = new long[simu->NumPart];
|
||||||
long *uniqueID = new long[simu->NumPart];
|
long *uniqueID = new long[simu->NumPart];
|
||||||
|
double tempData;
|
||||||
|
|
||||||
simu->new_attribute("uniqueID", uniqueID, delete_adaptor<long>);
|
simu->new_attribute("uniqueID", uniqueID, delete_adaptor<long>);
|
||||||
|
|
||||||
|
@ -61,7 +62,7 @@ public:
|
||||||
for (long i = 0; i < simu->NumPart; i++) {
|
for (long i = 0; i < simu->NumPart; i++) {
|
||||||
|
|
||||||
fp >> simu->Id[i] >> simu->Pos[0][i] >> simu->Pos[1][i]
|
fp >> simu->Id[i] >> simu->Pos[0][i] >> simu->Pos[1][i]
|
||||||
>> simu->Pos[2][i] >> simu->Vel[2][i];
|
>> simu->Pos[2][i] >> simu->Vel[2][i] >> tempData >> tempData;
|
||||||
|
|
||||||
uniqueID[i] = simu->Id[i];
|
uniqueID[i] = simu->Id[i];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue