------------------------------------------------------------------------------
| 1152 | |
| 1153 | //------------------------------------------------------------------------------ |
| 1154 | void vtkFlashReaderInternal::ReadParticlesComponent( |
| 1155 | hid_t dataIndx, const char* compName, double* dataBuff) |
| 1156 | { |
| 1157 | if (!compName || this->FileFormatVersion < FLASH_READER_FLASH3_FFV8) |
| 1158 | { |
| 1159 | vtkGenericWarningMacro("Invalid component name of particles or " |
| 1160 | << "non FLASH3_FFV8 file format." << endl); |
| 1161 | return; |
| 1162 | } |
| 1163 | |
| 1164 | hsize_t spaceIdx = H5Dget_space(dataIndx); // data space index |
| 1165 | hsize_t thisSize = this->NumberOfParticles; |
| 1166 | hsize_t spaceMem = H5Screate_simple(1, &thisSize, nullptr); |
| 1167 | int attrIndx = this->ParticleAttributeNamesToIds[compName]; |
| 1168 | |
| 1169 | hsize_t theShift[2] = { 0, static_cast<hsize_t>(attrIndx) }; |
| 1170 | hsize_t numReads[2] = { static_cast<hsize_t>(this->NumberOfParticles), 1 }; |
| 1171 | H5Sselect_hyperslab(spaceIdx, H5S_SELECT_SET, theShift, nullptr, numReads, nullptr); |
| 1172 | H5Dread(dataIndx, H5T_NATIVE_DOUBLE, spaceMem, spaceIdx, H5P_DEFAULT, dataBuff); |
| 1173 | |
| 1174 | H5Sclose(spaceIdx); |
| 1175 | H5Sclose(spaceMem); |
| 1176 | } |
| 1177 | |
| 1178 | //------------------------------------------------------------------------------ |
| 1179 | void vtkFlashReaderInternal::ReadParticleAttributes() |
no test coverage detected