Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkGAMBITReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGAMBITReader.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00034 #ifndef __vtkGAMBITReader_h
00035 #define __vtkGAMBITReader_h
00036 
00037 #include "vtkUnstructuredGridAlgorithm.h"
00038 
00039 class vtkDoubleArray;
00040 class VTK_IO_EXPORT vtkGAMBITReader : public vtkUnstructuredGridAlgorithm
00041 {
00042 public:
00043   static vtkGAMBITReader *New();
00044   vtkTypeRevisionMacro(vtkGAMBITReader,vtkUnstructuredGridAlgorithm);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00048 
00049   vtkSetStringMacro(FileName);
00050   vtkGetStringMacro(FileName);
00052 
00054 
00056   vtkGetMacro(NumberOfCells,int);
00058 
00060 
00062   vtkGetMacro(NumberOfNodes,int);
00064 
00066 
00067   vtkGetMacro(NumberOfNodeFields,int);
00068   vtkGetMacro(NumberOfCellFields,int);
00070 
00071 protected:
00072   vtkGAMBITReader();
00073   ~vtkGAMBITReader();
00074   int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00075   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00076 
00077   char *FileName;
00078 
00079   int NumberOfNodes;
00080   int NumberOfCells;
00081   int NumberOfNodeFields;
00082   int NumberOfCellFields;
00083   int NumberOfElementGroups;
00084   int NumberOfBoundaryConditionSets;
00085   int NumberOfCoordinateDirections;
00086   int NumberOfVelocityComponents;
00087   ifstream *FileStream;
00088 
00089   //BTX
00090   enum GAMBITCellType
00091   {
00092     EDGE    = 1,
00093     QUAD    = 2,
00094     TRI     = 3,
00095     BRICK   = 4,
00096     PRISM   = 5,
00097     TETRA   = 6,
00098     PYRAMID = 7
00099   };
00100   //ETX
00101 
00102 private:
00103   void ReadFile(vtkUnstructuredGrid *output);
00104   void ReadGeometry(vtkUnstructuredGrid *output);
00105   void ReadNodeData(vtkUnstructuredGrid *output);
00106   void ReadCellData(vtkUnstructuredGrid *output);
00107 
00108   void ReadXYZCoords(vtkDoubleArray *coords);
00109 
00110   void ReadCellConnectivity(vtkUnstructuredGrid *output);
00111   void ReadMaterialTypes(vtkUnstructuredGrid *output);
00112   void ReadBoundaryConditionSets(vtkUnstructuredGrid *output);
00113 
00114   vtkGAMBITReader(const vtkGAMBITReader&);  // Not implemented.
00115   void operator=(const vtkGAMBITReader&);  // Not implemented.
00116 };
00117 
00118 #endif

Generated on Mon Jan 21 23:07:31 2008 for VTK by  doxygen 1.4.3-20050530