40#ifndef vtkFLUENTReader_h
41#define vtkFLUENTReader_h
43#include "vtkIOGeometryModule.h"
48#include <unordered_set>
50VTK_ABI_NAMESPACE_BEGIN
90 vtkGetMacro(CacheData,
bool);
91 vtkSetMacro(CacheData,
bool);
92 vtkBooleanMacro(CacheData,
bool);
158 struct ScalarDataChunk;
159 struct VectorDataChunk;
228 int GetCaseBufferInt(
size_t ptr);
229 float GetCaseBufferFloat(
size_t ptr);
230 double GetCaseBufferDouble(
size_t ptr);
231 int GetDataBufferInt(
size_t ptr);
232 float GetDataBufferFloat(
size_t ptr);
233 double GetDataBufferDouble(
size_t ptr);
238 bool AreCellsEnabled();
242 void DisableZones(std::unordered_set<unsigned int>& disabledZones,
bool& areAllZonesDisabled);
246 bool FillMultiblock(std::unordered_set<unsigned int>& disabledZones,
247 const std::map<unsigned int, size_t>& zoneIDToBlockIdx,
252 void FillMultiblockData(std::unordered_set<unsigned int>& disabledZones,
253 const std::map<unsigned int, size_t>& zoneIDToBlockIdx,
258 void GetArraysFromSubSections();
263 std::map<unsigned int, size_t>& zoneIDToBlockIdx,
268 void ParseDataZone(
int index);
275 void ParseDataZones(
bool areCellsEnabled);
279 void ParseZone(
int index);
286 void ParseZones(
bool areCellsEnabled);
291 bool PreParseDataFile();
297 bool PreParseFluentFile();
302 bool ReadDataZoneSectionId(
unsigned int& zoneSectionId);
307 bool ReadZoneSectionId(
unsigned int& zoneSectionId);
312 bool ReadZoneSection(
int limit);
317 void UpdateZoneSectionSelection();
331 const std::map<unsigned int, size_t>& zoneIDToBlockIdx,
332 std::unordered_set<unsigned int>& disabledZones);
342 char* FileName =
nullptr;
344 bool CacheData =
true;
346 istream* FluentFile =
nullptr;
347 istream* FluentDataFile =
nullptr;
348 std::string FluentBuffer;
349 std::string DataBuffer;
353 std::vector<Cell>
Cells;
354 std::vector<Face> Faces;
355 std::vector<ZoneSection> ZoneSections;
356 std::map<size_t, std::string> VariableNames;
357 std::vector<ScalarDataChunk> ScalarDataChunks;
358 std::vector<VectorDataChunk> VectorDataChunks;
359 std::vector<SubSection> SubSections;
361 std::vector<std::string> ScalarVariableNames;
362 std::vector<int> ScalarSubSectionIds;
363 std::vector<std::string> VectorVariableNames;
364 std::vector<int> VectorSubSectionIds;
367 int GridDimension = 0;
368 int NumberOfScalars = 0;
369 int NumberOfVectors = 0;
371 std::vector<Zone> Zones;
372 std::vector<Zone> DataZones;
373 std::vector<ZoneSection> CurrentZoneSections;
375 bool IsFilePreParsed =
false;
a 3D cell defined by a set of convex points
Store on/off settings for data arrays, etc.
reads a dataset in Fluent file format
virtual void PopulateWedgeCell(size_t cellIdx)
virtual void GetPeriodicShadowFacesBinary()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void GetPartitionInfo()
virtual void PopulateQuadCell(size_t cellIdx)
~vtkFLUENTReader() override
virtual void GetData(int dataType)
virtual void GetSpeciesVariableNames()
virtual void GetFaceTreeAscii()
virtual void PopulatePolyhedronCell(size_t cellIdx)
virtual void GetNonconformalGridInterfaceFaceInformationBinary()
virtual void GetInterfaceFaceParentsAscii()
virtual void PopulatePyramidCell(size_t cellIdx)
virtual void GetNodesDoublePrecision()
virtual void CleanCells()
vtkGetFilePathMacro(FileName)
Specify the file name of the Fluent file to read.
virtual bool OpenDataFile(const char *filename)
virtual void GetCellsBinary()
virtual void GetPeriodicShadowFacesAscii()
virtual void PopulateCellNodes()
virtual void GetCellTreeBinary()
const char * GetCellArrayName(int index)
Get the name of the cell array with the given index in the input.
void SetDataByteOrder(int)
These methods should be used instead of the SwapBytes methods.
void SetDataByteOrderToLittleEndian()
These methods should be used instead of the SwapBytes methods.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTypeBool GetSwapBytes()
Set/Get the byte swapping to explicitly swap the bytes of a file.
virtual void PopulateHexahedronCell(size_t cellIdx)
virtual void GetInterfaceFaceParentsBinary()
vtkDataArraySelection * GetZoneSectionSelection()
Zone section selection, to determine which zone sections are loaded.
void SetCellArrayStatus(const char *name, int status)
Get/Set whether the cell array with the given name is to be read.
virtual void GetFaceTreeBinary()
virtual void GetCellsAscii()
int GetCellArrayStatus(const char *name)
Get/Set whether the cell array with the given name is to be read.
virtual void PopulateTetraCell(size_t cellIdx)
void EnableAllCellArrays()
Turn on/off all cell arrays.
virtual void GetFacesBinary()
virtual void GetNodesAscii()
virtual int GetCaseIndex()
virtual int GetCaseChunk()
virtual void GetNonconformalGridInterfaceFaceInformationAscii()
int GetDataByteOrder()
These methods should be used instead of the SwapBytes methods.
vtkSetFilePathMacro(FileName)
Specify the file name of the Fluent file to read.
void SetDataByteOrderToBigEndian()
These methods should be used instead of the SwapBytes methods.
virtual bool ParallelCheckCell(int i)
const char * GetDataByteOrderAsString()
These methods should be used instead of the SwapBytes methods.
virtual void PopulateTriangleCell(size_t cellIdx)
virtual void GetLittleEndianFlag()
virtual int GetDataChunk()
virtual void GetNodesSinglePrecision()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual bool GetFacesAscii()
virtual void GetCellTreeAscii()
virtual bool OpenCaseFile(const char *filename)
virtual int GetDimension()
virtual void LoadVariableNames()
vtkMTimeType GetMTime() override
Get the last modified time of this filter.
int GetNumberOfCellArrays()
Get the number of cell arrays available in the input.
static vtkFLUENTReader * New()
virtual int GetDataIndex()
void DisableAllCellArrays()
Turn on/off all cell arrays.
a cell that represents a linear 3D hexahedron
a simple class to control print indentation
vtkMultiBlockDataSetAlgorithm()
Composite dataset that organizes datasets into blocks.
Allocate and hold a VTK object.
represent and manipulate 3D points
a 3D cell that represents a linear pyramid
a cell that represents a 2D quadrilateral
Hold a reference to a vtkObjectBase instance.
a 3D cell that represents a tetrahedron
a cell that represents a triangle
dataset represents arbitrary combinations of all possible cell types
a 3D cell that represents a linear wedge
@ Cells
A cell specified by degrees of freedom held in arrays.
vtkTypeUInt32 vtkMTimeType