VTK  9.3.1
vtkTecplotReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) 2000 - 2009, Lawrence Livermore National Security, LLC
3 // SPDX-License-Identifier: BSD-3-Clause
4 
54 #ifndef vtkTecplotReader_h
55 #define vtkTecplotReader_h
56 
57 #include "vtkIOGeometryModule.h" // For export macro
59 
60 #include <string> // STL Header; Required for string
61 #include <vector> // STL Header; Required for vector
62 
63 VTK_ABI_NAMESPACE_BEGIN
64 class vtkPoints;
65 class vtkCellData;
66 class vtkPointData;
67 class vtkCallbackCommand;
71 class vtkTecplotReaderInternal;
72 
73 class VTKIOGEOMETRY_EXPORT vtkTecplotReader : public vtkMultiBlockDataSetAlgorithm
74 {
75 public:
76  static vtkTecplotReader* New();
78  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
81 
84  vtkGetMacro(NumberOfVariables, int);
86 
90  void SetFileName(VTK_FILEPATH const char* fileName);
91 
95  const char* GetDataTitle();
96 
100  int GetNumberOfBlocks();
101 
106  const char* GetBlockName(int blockIdx);
107 
112  int GetNumberOfDataAttributes();
113 
118  const char* GetDataAttributeName(int attrIndx);
119 
125  int IsDataAttributeCellBased(const char* attrName);
126 
132  int IsDataAttributeCellBased(int attrIndx);
133 
137  int GetNumberOfDataArrays();
138 
142  const char* GetDataArrayName(int arrayIdx);
143 
147  int GetDataArrayStatus(const char* arayName);
148 
153  void SetDataArrayStatus(const char* arayName, int bChecked);
154 
155 protected:
157  ~vtkTecplotReader() override;
158 
160  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
161  vtkInformationVector* outputVector) override;
163 
167  static void SelectionModifiedCallback(vtkObject*, unsigned long, void* tpReader, void*);
168 
174  void Init();
175 
179  void GetDataArraysList();
180 
185  void ReadFile(vtkMultiBlockDataSet* multZone);
186 
193  void GetArraysFromBlockPackingZone(
194  int numNodes, int numCells, vtkPoints* theNodes, vtkPointData* nodeData, vtkCellData* cellData);
195 
204  void GetArraysFromPointPackingZone(int numNodes, vtkPoints* theNodes, vtkPointData* nodeData);
205 
213  void GetStructuredGridFromBlockPackingZone(int iDimSize, int jDimSize, int kDimSize, int zoneIndx,
214  const char* zoneName, vtkMultiBlockDataSet* multZone);
215 
223  void GetStructuredGridFromPointPackingZone(int iDimSize, int jDimSize, int kDimSize, int zoneIndx,
224  const char* zoneName, vtkMultiBlockDataSet* multZone);
225 
233  void GetUnstructuredGridFromBlockPackingZone(int numNodes, int numCells, const char* cellType,
234  int zoneIndx, const char* zoneName, vtkMultiBlockDataSet* multZone);
235 
243  void GetPolyhedralGridFromBlockPackingZone(int numNodes, int numElements, int numFaces,
244  int zoneIndex, const char* zoneName, vtkMultiBlockDataSet* multZone);
245 
253  void GetPolygonalGridFromBlockPackingZone(int numNodes, int numElements, int numFaces,
254  int zoneIndex, const char* zoneName, vtkMultiBlockDataSet* multZone);
255 
260  void GetPolyhedralGridCells(int numberCells, int numFaces, vtkUnstructuredGrid* unstruct) const;
261 
266  void GetPolygonalGridCells(int numFaces, int numEdges, vtkUnstructuredGrid* unstruct) const;
267 
275  void GetUnstructuredGridFromPointPackingZone(int numNodes, int numCells, const char* cellType,
276  int zoneIndx, const char* zoneName, vtkMultiBlockDataSet* multZone);
277 
282  void GetUnstructuredGridCells(
283  int numberCells, const char* cellTypeStr, vtkUnstructuredGrid* unstrctGrid);
284 
286  char* FileName;
289  vtkTecplotReaderInternal* Internal;
290 
292  std::vector<int> CellBased;
293  std::vector<std::string> ZoneNames;
294  std::vector<std::string> Variables;
295 
296 private:
297  vtkTecplotReader(const vtkTecplotReader&) = delete;
298  void operator=(const vtkTecplotReader&) = delete;
299 };
300 
301 VTK_ABI_NAMESPACE_END
302 #endif
vtkCallbackCommand * SelectionObserver
abstract base class for most VTK objects
Definition: vtkObject.h:51
represent and manipulate point attribute data
Definition: vtkPointData.h:29
Store vtkAlgorithm input/output information.
vtkDataArraySelection * DataArraySelection
represent and manipulate cell attribute data
Definition: vtkCellData.h:30
std::vector< int > CellBased
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
static vtkMultiBlockDataSetAlgorithm * New()
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:28
Store on/off settings for data arrays, etc.
dataset represents arbitrary combinations of all possible cell types
vtkTecplotReaderInternal * Internal
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::vector< std::string > Variables
std::string DataTitle
#define VTK_FILEPATH
Composite dataset that organizes datasets into blocks.
Store zero or more vtkInformation instances.
std::vector< std::string > ZoneNames
A concrete class to read an ASCII Tecplot file.
represent and manipulate 3D points
Definition: vtkPoints.h:28
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.