Revert "ProcessFields fix: hdf5 dumps need dynamic memory allocation"

This reverts commit ae3e15770e.
pull/1/head
Thorsten Liebig 2011-01-24 08:03:45 +01:00
parent d93c3f70fe
commit 4f97ec4bc8
1 changed files with 2 additions and 6 deletions

View File

@ -449,8 +449,7 @@ bool ProcessFields::DumpVectorArray2HDF5(string filename, string groupName, stri
// I have not the slightest idea why this array-copy action is necessary... but it's the only way hdf5 does what it is supposed to do anyway!!
// at least it is save in case FDTD_FLOAT was defined as double...
// why does hdf5 write the dimensions backwards??? or matlab???
unsigned int reverse_numLines[] = {numLines[2], numLines[1], numLines[0]};
float ****hdf5array = Create_N_3DArray<float>(reverse_numLines);
float hdf5array[3][numLines[2]][numLines[1]][numLines[0]];
for (int n=0; n<3; ++n)
{
for (unsigned int i=0; i<numLines[0]; ++i)
@ -465,7 +464,6 @@ bool ProcessFields::DumpVectorArray2HDF5(string filename, string groupName, stri
}
}
dataset.write( hdf5array, H5::PredType::NATIVE_FLOAT );
Delete_N_3DArray(hdf5array,reverse_numLines);
return true;
}
@ -498,8 +496,7 @@ bool ProcessFields::DumpVectorArray2HDF5(string filename, string groupName, stri
// I have not the slightest idea why this array-copy action is necessary... but it's the only way hdf5 does what it is supposed to do anyway!!
// at least it is save in case FDTD_FLOAT was defined as double...
// why does hdf5 write the dimensions backwards??? or matlab???
unsigned int reverse_numLines[] = {numLines[2], numLines[1], numLines[0]};
float ****hdf5array = Create_N_3DArray<float>(reverse_numLines);
float hdf5array[3][numLines[2]][numLines[1]][numLines[0]];
for (int n=0; n<3; ++n)
{
for (unsigned int i=0; i<numLines[0]; ++i)
@ -536,7 +533,6 @@ bool ProcessFields::DumpVectorArray2HDF5(string filename, string groupName, stri
}
}
dataset.write( hdf5array, H5::PredType::NATIVE_FLOAT );
Delete_N_3DArray(hdf5array,reverse_numLines);
return true;
}