VTK
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 =========================================================================*/
34 #ifndef __vtkGAMBITReader_h
35 #define __vtkGAMBITReader_h
36 
38 
39 class vtkDoubleArray;
41 {
42 public:
43  static vtkGAMBITReader *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
49  vtkSetStringMacro(FileName);
50  vtkGetStringMacro(FileName);
52 
54 
56  vtkGetMacro(NumberOfCells,int);
58 
60 
62  vtkGetMacro(NumberOfNodes,int);
64 
66 
67  vtkGetMacro(NumberOfNodeFields,int);
68  vtkGetMacro(NumberOfCellFields,int);
70 
71 protected:
73  ~vtkGAMBITReader();
76 
77  char *FileName;
78 
87  ifstream *FileStream;
88 
89  //BTX
91  {
92  EDGE = 1,
93  QUAD = 2,
94  TRI = 3,
95  BRICK = 4,
96  PRISM = 5,
97  TETRA = 6,
98  PYRAMID = 7
99  };
100  //ETX
101 
102 private:
103  void ReadFile(vtkUnstructuredGrid *output);
104  void ReadGeometry(vtkUnstructuredGrid *output);
105  void ReadNodeData(vtkUnstructuredGrid *output);
106  void ReadCellData(vtkUnstructuredGrid *output);
107 
108  void ReadXYZCoords(vtkDoubleArray *coords);
109 
110  void ReadCellConnectivity(vtkUnstructuredGrid *output);
111  void ReadMaterialTypes(vtkUnstructuredGrid *output);
112  void ReadBoundaryConditionSets(vtkUnstructuredGrid *output);
113 
114  vtkGAMBITReader(const vtkGAMBITReader&); // Not implemented.
115  void operator=(const vtkGAMBITReader&); // Not implemented.
116 };
117 
118 #endif