15#ifndef vtkMultiBlockPLOT3DReaderInternals_h
16#define vtkMultiBlockPLOT3DReaderInternals_h
19#include "vtkIOParallelModule.h"
30#define vtk_fseek _fseeki64
31#define vtk_ftell _ftelli64
32#define vtk_off_t __int64
34#define vtk_fseek fseek
35#define vtk_ftell ftell
50 std::vector<vtkSmartPointer<vtkStructuredGrid>>
Blocks;
91 int blanking,
int ndims,
int hasByteCount,
int nGrids,
int* gridDims);
93 int blanking,
int ndims,
int hasByteCount,
int* gridDims);
99 preskip = nPtsInPlane * extent[4];
100 postskip = nPtsInPlane * (wextent[5] - extent[5]);
106class Plot3DException :
public std::exception
123 vtkTypeUInt64 HeaderOffset;
124 vtkTypeUInt64 FooterOffset;
127 typedef std::vector<vtkSubRecord> VectorOfSubRecords;
128 VectorOfSubRecords SubRecords;
140 static const int SubRecordSeparatorWidth =
sizeof(int) * 2;
161 return (this->SubRecords.empty() || this->SubRecords.front().HeaderOffset == offset);
171 this->SubRecords.empty() || (this->SubRecords.back().FooterOffset +
sizeof(
int) == offset));
184 vtkTypeUInt64 start, vtkTypeUInt64 length,
const std::vector<vtkTypeUInt64>& markers);
194 vtkTypeUInt64 start, vtkTypeUInt64 length)
const
196 return this->GetChunksToRead(start, length, this->GetSubRecordSeparators(start, length));
bool AtEnd(vtkTypeUInt64 offset)
bool AtStart(vtkTypeUInt64 offset)
vtkTypeUInt64 GetLengthWithSeparators(vtkTypeUInt64 start, vtkTypeUInt64 length) const
std::vector< vtkTypeUInt64 > SubRecordSeparators
bool Initialize(FILE *fp, vtkTypeUInt64 offset, const vtkMultiBlockPLOT3DReaderInternals::InternalSettings &settings, vtkMultiProcessController *controller)
static std::vector< std::pair< vtkTypeUInt64, vtkTypeUInt64 > > GetChunksToRead(vtkTypeUInt64 start, vtkTypeUInt64 length, const std::vector< vtkTypeUInt64 > &markers)
SubRecordSeparators GetSubRecordSeparators(vtkTypeUInt64 startOffset, vtkTypeUInt64 length) const
std::vector< std::pair< vtkTypeUInt64, vtkTypeUInt64 > > GetChunksToRead(vtkTypeUInt64 start, vtkTypeUInt64 length) const
Multiprocessing communication superclass.
static void CalculateSkips(const int extent[6], const int wextent[6], vtkIdType &preskip, vtkIdType &postskip)
std::vector< Dims > Dimensions
int ReadInts(FILE *fp, int n, int *val)
std::vector< vtkSmartPointer< vtkStructuredGrid > > Blocks
int CheckByteOrder(FILE *fp)
size_t CalculateFileSizeForBlock(int precision, int blanking, int ndims, int hasByteCount, int *gridDims)
int CheckByteCount(FILE *fp)
int CheckBlankingAndPrecision(FILE *fp)
size_t CalculateFileSize(int mgrid, int precision, int blanking, int ndims, int hasByteCount, int nGrids, int *gridDims)
int CheckCFile(FILE *fp, size_t fileSize)
InternalSettings Settings
int Check2DGeom(FILE *fp)
int CheckBinaryFile(FILE *fp, size_t fileSize)
vtkMultiBlockPLOT3DReaderInternals()
int CheckMultiGrid(FILE *fp)