MCPcopy Create free account
hub / github.com/Kitware/VTK / ReadVector

Method ReadVector

IO/MPIParallel/vtkMPIMultiBlockPLOT3DReader.cxx:285–311  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

283
284//------------------------------------------------------------------------------
285int vtkMPIMultiBlockPLOT3DReader::ReadVector(void* vfp, int extent[6], int wextent[6], int numDims,
286 vtkDataArray* vector, vtkTypeUInt64 offset, const vtkMultiBlockPLOT3DReaderRecord& record)
287{
288 if (!this->CanUseMPIIO())
289 {
290 return this->Superclass::ReadVector(vfp, extent, wextent, numDims, vector, offset, record);
291 }
292
293 vtkIdType n = vtkStructuredData::GetNumberOfPoints(extent);
294 vtkIdType nValues = n * numDims;
295 if (this->Internal->Settings.Precision == 4)
296 {
297 vtkMPIPLOT3DArrayReader<float> arrayReader;
298 arrayReader.ByteOrder = this->Internal->Settings.ByteOrder;
299 vtkFloatArray* floatArray = static_cast<vtkFloatArray*>(vector);
300 return arrayReader.ReadVector(
301 vfp, offset, extent, wextent, numDims, floatArray->GetPointer(0), record) == nValues;
302 }
303 else
304 {
305 vtkMPIPLOT3DArrayReader<double> arrayReader;
306 arrayReader.ByteOrder = this->Internal->Settings.ByteOrder;
307 vtkDoubleArray* doubleArray = static_cast<vtkDoubleArray*>(vector);
308 return arrayReader.ReadVector(
309 vfp, offset, extent, wextent, numDims, doubleArray->GetPointer(0), record) == nValues;
310 }
311}
312
313//------------------------------------------------------------------------------
314void vtkMPIMultiBlockPLOT3DReader::PrintSelf(ostream& os, vtkIndent indent)

Callers

nothing calls this directly

Calls 3

CanUseMPIIOMethod · 0.95
GetNumberOfPointsFunction · 0.50
GetPointerMethod · 0.45

Tested by

no test coverage detected