VTK  9.0.20210123
vtkGAMBITReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGAMBITReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef vtkGAMBITReader_h
33 #define vtkGAMBITReader_h
34 
35 #include "vtkIOGeometryModule.h" // For export macro
37 
38 class vtkDoubleArray;
39 class VTKIOGEOMETRY_EXPORT vtkGAMBITReader : public vtkUnstructuredGridAlgorithm
40 {
41 public:
42  static vtkGAMBITReader* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
50  vtkSetStringMacro(FileName);
51  vtkGetStringMacro(FileName);
53 
55 
59  vtkGetMacro(NumberOfCells, int);
61 
63 
67  vtkGetMacro(NumberOfNodes, int);
69 
71 
74  vtkGetMacro(NumberOfNodeFields, int);
75  vtkGetMacro(NumberOfCellFields, int);
77 
78 protected:
80  ~vtkGAMBITReader() override;
83 
84  char* FileName;
85 
94  istream* FileStream;
95 
97  {
98  EDGE = 1,
99  QUAD = 2,
100  TRI = 3,
101  BRICK = 4,
102  PRISM = 5,
103  TETRA = 6,
104  PYRAMID = 7
105  };
106 
107 private:
108  void ReadFile(vtkUnstructuredGrid* output);
109  void ReadGeometry(vtkUnstructuredGrid* output);
110  void ReadNodeData(vtkUnstructuredGrid* output);
111  void ReadCellData(vtkUnstructuredGrid* output);
112 
113  void ReadXYZCoords(vtkDoubleArray* coords);
114 
115  void ReadCellConnectivity(vtkUnstructuredGrid* output);
116  void ReadMaterialTypes(vtkUnstructuredGrid* output);
117  void ReadBoundaryConditionSets(vtkUnstructuredGrid* output);
118 
119  vtkGAMBITReader(const vtkGAMBITReader&) = delete;
120  void operator=(const vtkGAMBITReader&) = delete;
121 };
122 
123 #endif
vtkGAMBITReader::NumberOfBoundaryConditionSets
int NumberOfBoundaryConditionSets
Definition: vtkGAMBITReader.h:91
vtkGAMBITReader::NumberOfVelocityComponents
int NumberOfVelocityComponents
Definition: vtkGAMBITReader.h:93
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkGAMBITReader::NumberOfElementGroups
int NumberOfElementGroups
Definition: vtkGAMBITReader.h:90
vtkGAMBITReader::FileStream
istream * FileStream
Definition: vtkGAMBITReader.h:94
vtkGAMBITReader::NumberOfCoordinateDirections
int NumberOfCoordinateDirections
Definition: vtkGAMBITReader.h:92
vtkGAMBITReader::NumberOfCellFields
int NumberOfCellFields
Definition: vtkGAMBITReader.h:89
vtkUnstructuredGridAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkUnstructuredGridAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGAMBITReader::FileName
char * FileName
Definition: vtkGAMBITReader.h:84
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkGAMBITReader::NumberOfCells
int NumberOfCells
Definition: vtkGAMBITReader.h:87
vtkGAMBITReader::GAMBITCellType
GAMBITCellType
Definition: vtkGAMBITReader.h:96
vtkUnstructuredGridAlgorithm::New
static vtkUnstructuredGridAlgorithm * New()
vtkUnstructuredGridAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridAlgorithm.h
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:40
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkGAMBITReader
reads a dataset in Fluent GAMBIT neutral file format
Definition: vtkGAMBITReader.h:39
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:93
vtkGAMBITReader::NumberOfNodeFields
int NumberOfNodeFields
Definition: vtkGAMBITReader.h:88
vtkGAMBITReader::NumberOfNodes
int NumberOfNodes
Definition: vtkGAMBITReader.h:86