3 #ifndef vtkMultiBlockPLOT3DReaderInternals_h
4 #define vtkMultiBlockPLOT3DReaderInternals_h
7 #include "vtkIOParallelModule.h"
15 VTK_ABI_NAMESPACE_BEGIN
29 std::vector<vtkSmartPointer<vtkStructuredGrid>>
Blocks;
45 , NumberOfDimensions(3)
56 : NeedToCheckXYZFile(true)
60 int ReadInts(FILE* fp,
int n,
int* val);
70 int blanking,
int ndims,
int hasByteCount,
int nGrids,
int* gridDims);
72 int blanking,
int ndims,
int hasByteCount,
int* gridDims);
78 preskip = nPtsInPlane * extent[4];
79 postskip = nPtsInPlane * (wextent[5] - extent[5]);
86 class Plot3DException :
public std::exception
91 VTK_ABI_NAMESPACE_BEGIN
104 vtkTypeUInt64 HeaderOffset;
105 vtkTypeUInt64 FooterOffset;
108 typedef std::vector<vtkSubRecord> VectorOfSubRecords;
109 VectorOfSubRecords SubRecords;
121 static const int SubRecordSeparatorWidth =
sizeof(int) * 2;
132 bool Initialize(FILE* fp, vtkTypeUInt64
offset,
142 return (this->SubRecords.empty() || this->SubRecords.front().HeaderOffset ==
offset);
152 this->SubRecords.empty() || (this->SubRecords.back().FooterOffset +
sizeof(int) == offset));
158 SubRecordSeparators GetSubRecordSeparators(vtkTypeUInt64 startOffset, vtkTypeUInt64
length)
const;
164 static std::vector<std::pair<vtkTypeUInt64, vtkTypeUInt64>> GetChunksToRead(
165 vtkTypeUInt64 start, vtkTypeUInt64
length,
const std::vector<vtkTypeUInt64>& markers);
172 vtkTypeUInt64 GetLengthWithSeparators(vtkTypeUInt64 start, vtkTypeUInt64
length)
const;
175 vtkTypeUInt64 start, vtkTypeUInt64
length)
const
178 start, length, this->GetSubRecordSeparators(start, length));
182 VTK_ABI_NAMESPACE_END
int ReadInts(FILE *fp, int n, int *val)
vtkMultiBlockPLOT3DReaderInternals()
int CheckBinaryFile(FILE *fp, size_t fileSize)
int CheckByteOrder(FILE *fp)
int CheckMultiGrid(FILE *fp)
std::vector< Dims > Dimensions
int Check2DGeom(FILE *fp)
static void CalculateSkips(const int extent[6], const int wextent[6], vtkIdType &preskip, vtkIdType &postskip)
bool AtEnd(vtkTypeUInt64 offset)
size_t CalculateFileSize(int mgrid, int precision, int blanking, int ndims, int hasByteCount, int nGrids, int *gridDims)
InternalSettings Settings
int CheckByteCount(FILE *fp)
int CheckBlankingAndPrecision(FILE *fp)
std::vector< vtkTypeUInt64 > SubRecordSeparators
size_t CalculateFileSizeForBlock(int precision, int blanking, int ndims, int hasByteCount, int *gridDims)
std::vector< vtkSmartPointer< vtkStructuredGrid > > Blocks
int CheckCFile(FILE *fp, size_t fileSize)
std::vector< std::pair< vtkTypeUInt64, vtkTypeUInt64 > > GetChunksToRead(vtkTypeUInt64 start, vtkTypeUInt64 length) const
static std::vector< std::pair< vtkTypeUInt64, vtkTypeUInt64 > > GetChunksToRead(vtkTypeUInt64 start, vtkTypeUInt64 length, const std::vector< vtkTypeUInt64 > &markers)
bool AtStart(vtkTypeUInt64 offset)
Multiprocessing communication superclass.