/usr/include/vtk-7.1/vtkFLUENTReader.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkFLUENTReader.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkFLUENTReader
* @brief reads a dataset in Fluent file format
*
* vtkFLUENTReader creates an unstructured grid dataset. It reads .cas and
* .dat files stored in FLUENT native format.
*
* @par Thanks:
* Thanks to Brian W. Dotson & Terry E. Jordan (Department of Energy, National
* Energy Technology Laboratory) & Douglas McCorkle (Iowa State University)
* who developed this class.
* Please address all comments to Brian Dotson (brian.dotson@netl.doe.gov) &
* Terry Jordan (terry.jordan@sa.netl.doe.gov)
* & Doug McCorkle (mccdo@iastate.edu)
*
*
* @sa
* vtkGAMBITReader
*/
#ifndef vtkFLUENTReader_h
#define vtkFLUENTReader_h
#include "vtkIOGeometryModule.h" // For export macro
#include "vtkMultiBlockDataSetAlgorithm.h"
class vtkDataArraySelection;
class vtkPoints;
class vtkTriangle;
class vtkTetra;
class vtkQuad;
class vtkHexahedron;
class vtkPyramid;
class vtkWedge;
class vtkConvexPointSet;
class VTKIOGEOMETRY_EXPORT vtkFLUENTReader : public vtkMultiBlockDataSetAlgorithm
{
public:
static vtkFLUENTReader *New();
vtkTypeMacro(vtkFLUENTReader,vtkMultiBlockDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
//@{
/**
* Specify the file name of the Fluent case file to read.
*/
vtkSetStringMacro(FileName);
vtkGetStringMacro(FileName);
//@}
//@{
/**
* Get the total number of cells. The number of cells is only valid after a
* successful read of the data file is performed. Initial value is 0.
*/
vtkGetMacro(NumberOfCells,int);
//@}
/**
* Get the number of cell arrays available in the input.
*/
int GetNumberOfCellArrays(void);
/**
* Get the name of the cell array with the given index in
* the input.
*/
const char* GetCellArrayName(int index);
//@{
/**
* Get/Set whether the cell array with the given name is to
* be read.
*/
int GetCellArrayStatus(const char* name);
void SetCellArrayStatus(const char* name, int status);
//@}
//@{
/**
* Turn on/off all cell arrays.
*/
void DisableAllCellArrays();
void EnableAllCellArrays();
//@}
//@{
/**
* These methods should be used instead of the SwapBytes methods.
* They indicate the byte ordering of the file you are trying
* to read in. These methods will then either swap or not swap
* the bytes depending on the byte ordering of the machine it is
* being run on. For example, reading in a BigEndian file on a
* BigEndian machine will result in no swapping. Trying to read
* the same file on a LittleEndian machine will result in swapping.
* As a quick note most UNIX machines are BigEndian while PC's
* and VAX tend to be LittleEndian. So if the file you are reading
* in was generated on a VAX or PC, SetDataByteOrderToLittleEndian
* otherwise SetDataByteOrderToBigEndian. Not used when reading
* text files.
*/
void SetDataByteOrderToBigEndian();
void SetDataByteOrderToLittleEndian();
int GetDataByteOrder();
void SetDataByteOrder(int);
const char *GetDataByteOrderAsString();
//
// Structures
//
struct Cell;
struct Face;
struct ScalarDataChunk;
struct VectorDataChunk;
struct stdString;
struct intVector;
struct doubleVector;
struct stringVector;
struct cellVector;
struct faceVector;
struct stdMap;
struct scalarDataVector;
struct vectorDataVector;
struct intVectorVector;
//@}
protected:
vtkFLUENTReader();
~vtkFLUENTReader();
int RequestInformation(vtkInformation *,
vtkInformationVector **, vtkInformationVector *);
int RequestData(vtkInformation *, vtkInformationVector **,
vtkInformationVector *);
//@{
/**
* Set/Get the byte swapping to explicitly swap the bytes of a file.
* Not used when reading text files.
*/
vtkSetMacro(SwapBytes,int);
int GetSwapBytes() {return this->SwapBytes;}
vtkBooleanMacro(SwapBytes,int);
//@}
vtkDataArraySelection* CellDataArraySelection;
char * FileName;
int NumberOfCells;
int NumberOfCellArrays;
virtual bool OpenCaseFile(const char *filename);
virtual bool OpenDataFile(const char *filename);
virtual int GetCaseChunk ();
virtual void GetNumberOfCellZones();
virtual int GetCaseIndex();
virtual void LoadVariableNames();
virtual int GetDataIndex();
virtual int GetDataChunk();
virtual void GetSpeciesVariableNames();
virtual void ParseCaseFile();
virtual int GetDimension();
virtual void GetLittleEndianFlag();
virtual void GetNodesAscii();
virtual void GetNodesSinglePrecision();
virtual void GetNodesDoublePrecision();
virtual void GetCellsAscii();
virtual void GetCellsBinary();
virtual void GetFacesAscii();
virtual void GetFacesBinary();
virtual void GetPeriodicShadowFacesAscii();
virtual void GetPeriodicShadowFacesBinary();
virtual void GetCellTreeAscii();
virtual void GetCellTreeBinary();
virtual void GetFaceTreeAscii();
virtual void GetFaceTreeBinary();
virtual void GetInterfaceFaceParentsAscii();
virtual void GetInterfaceFaceParentsBinary();
virtual void GetNonconformalGridInterfaceFaceInformationAscii();
virtual void GetNonconformalGridInterfaceFaceInformationBinary();
virtual void GetPartitionInfo() {}
virtual void CleanCells();
virtual void PopulateCellNodes();
virtual int GetCaseBufferInt(int ptr);
virtual float GetCaseBufferFloat(int ptr);
virtual double GetCaseBufferDouble(int ptr);
virtual void PopulateTriangleCell(int i);
virtual void PopulateTetraCell(int i);
virtual void PopulateQuadCell(int i);
virtual void PopulateHexahedronCell(int i);
virtual void PopulatePyramidCell(int i);
virtual void PopulateWedgeCell(int i);
virtual void PopulatePolyhedronCell(int i);
virtual void ParseDataFile();
virtual int GetDataBufferInt(int ptr);
virtual float GetDataBufferFloat(int ptr);
virtual double GetDataBufferDouble(int ptr);
virtual void GetData(int dataType);
virtual bool ParallelCheckCell(int vtkNotUsed(i)) { return true; }
//
// Variables
//
ifstream *FluentCaseFile;
ifstream *FluentDataFile;
stdString *CaseBuffer;
stdString *DataBuffer;
vtkPoints *Points;
vtkTriangle *Triangle;
vtkTetra *Tetra;
vtkQuad *Quad;
vtkHexahedron *Hexahedron;
vtkPyramid *Pyramid;
vtkWedge *Wedge;
vtkConvexPointSet *ConvexPointSet;
cellVector *Cells;
faceVector *Faces;
stdMap *VariableNames;
intVector *CellZones;
scalarDataVector *ScalarDataChunks;
vectorDataVector *VectorDataChunks;
intVectorVector *SubSectionZones;
intVector *SubSectionIds;
intVector *SubSectionSize;
stringVector *ScalarVariableNames;
intVector *ScalarSubSectionIds;
stringVector *VectorVariableNames;
intVector *VectorSubSectionIds;
int SwapBytes;
int GridDimension;
int DataPass;
int NumberOfScalars;
int NumberOfVectors;
private:
vtkFLUENTReader(const vtkFLUENTReader&) VTK_DELETE_FUNCTION;
void operator=(const vtkFLUENTReader&) VTK_DELETE_FUNCTION;
};
#endif
|