vtkGAMBITReader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00045 #ifndef __vtkGAMBITReader_h
00046 #define __vtkGAMBITReader_h
00047
00048 #include "vtkUnstructuredGridSource.h"
00049
00050 class vtkDoubleArray;
00051 class VTK_IO_EXPORT vtkGAMBITReader : public vtkUnstructuredGridSource
00052 {
00053 public:
00054 static vtkGAMBITReader *New();
00055 vtkTypeRevisionMacro(vtkGAMBITReader,vtkUnstructuredGridSource);
00056 void PrintSelf(ostream& os, vtkIndent indent);
00057
00059
00060 vtkSetStringMacro(FileName);
00061 vtkGetStringMacro(FileName);
00063
00065
00066 vtkGetMacro(NumberOfCells,int);
00068
00070
00071 vtkGetMacro(NumberOfNodes,int);
00073
00075
00076 vtkGetMacro(NumberOfNodeFields,int);
00077 vtkGetMacro(NumberOfCellFields,int);
00079
00080 protected:
00081 vtkGAMBITReader();
00082 ~vtkGAMBITReader();
00083 void ExecuteInformation();
00084 void Execute();
00085
00086 char *FileName;
00087
00088 int NumberOfNodes;
00089 int NumberOfCells;
00090 int NumberOfNodeFields;
00091 int NumberOfCellFields;
00092 int NumberOfElementGroups;
00093 int NumberOfBoundaryConditionSets;
00094 int NumberOfCoordinateDirections;
00095 int NumberOfVelocityComponents;
00096 ifstream *FileStream;
00097
00098
00099 enum GAMBITCellType
00100 {
00101 EDGE = 1,
00102 QUAD = 2,
00103 TRI = 3,
00104 BRICK = 4,
00105 PRISM = 5,
00106 TETRA = 6,
00107 PYRAMID = 7
00108 };
00109
00110
00111 private:
00112 void ReadFile();
00113 void ReadGeometry();
00114 void ReadNodeData();
00115 void ReadCellData();
00116
00117 void ReadXYZCoords(vtkDoubleArray *coords);
00118
00119 void ReadCellConnectivity();
00120 void ReadMaterialTypes();
00121 void ReadBoundaryConditionSets();
00122
00123 vtkGAMBITReader(const vtkGAMBITReader&);
00124 void operator=(const vtkGAMBITReader&);
00125 };
00126
00127 #endif