VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPExodusReader.h 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 =========================================================================*/ 00015 /*---------------------------------------------------------------------------- 00016 Copyright (c) Sandia Corporation 00017 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. 00018 ----------------------------------------------------------------------------*/ 00019 00038 #ifndef __vtkPExodusReader_h 00039 #define __vtkPExodusReader_h 00040 00041 #include "vtkExodusReader.h" 00042 00043 #include <vector> // Required for vector 00044 00045 class vtkTimerLog; 00046 00047 class VTK_HYBRID_EXPORT vtkPExodusReader : public vtkExodusReader 00048 { 00049 public: 00050 static vtkPExodusReader *New(); 00051 vtkTypeMacro(vtkPExodusReader,vtkExodusReader); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00055 00062 vtkSetStringMacro(FilePattern); 00063 vtkGetStringMacro(FilePattern); 00064 vtkSetStringMacro(FilePrefix); 00065 vtkGetStringMacro(FilePrefix); 00067 00069 00071 void SetFileRange(int,int); 00072 void SetFileRange(int* r) { this->SetFileRange(r[0], r[1]); } 00073 vtkGetVector2Macro(FileRange, int); 00075 00080 VTK_LEGACY(void SetFileNames(int nfiles, const char **names)); 00081 00082 VTK_LEGACY(virtual void SetFileName(const char *name)); 00083 00085 char **GetFileNames(){return this->FileNames;} 00086 00088 int GetNumberOfFileNames(){return this->NumberOfFileNames;} 00089 00091 00092 vtkGetMacro(NumberOfFiles, int); 00094 00100 void SetGenerateFileIdArray(int flag); 00101 vtkGetMacro(GenerateFileIdArray, int); 00102 vtkBooleanMacro(GenerateFileIdArray, int); 00103 virtual int GetTotalNumberOfElements(); 00104 virtual int GetTotalNumberOfNodes(); 00105 00106 00107 //begin USE_EXO_DSP_FILTERS 00108 int GetNumberOfVariableArrays(); 00109 const char *GetVariableArrayName(int a_which); 00110 void EnableDSPFiltering(); 00111 void AddFilter(vtkDSPFilterDefinition *a_filter); 00112 void StartAddingFilter(); 00113 void AddFilterInputVar(char *name); 00114 void AddFilterOutputVar(char *name); 00115 void AddFilterNumeratorWeight(double weight); 00116 void AddFilterForwardNumeratorWeight(double weight); 00117 void AddFilterDenominatorWeight(double weight); 00118 void FinishAddingFilter(); 00119 void RemoveFilter(char *a_outputVariableName); 00120 //end USE_EXO_DSP_FILTERS 00121 00122 00123 protected: 00125 00126 vtkPExodusReader(); 00127 ~vtkPExodusReader(); 00129 00130 //begin USE_EXO_DSP_FILTERS 00131 void GetDSPOutputArrays(int exoid, vtkUnstructuredGrid* output); 00132 //end USE_EXO_DSP_FILTERS 00133 00135 00136 int DeterminePattern(const char* file); 00137 static int DetermineFileId(const char* file); 00139 00140 // This method sets up a ugrid with 00141 // all meta data but zero cells 00142 void SetUpEmptyGrid(); 00143 00144 // **KEN** Previous discussions concluded with std classes in header 00145 // files is bad. Perhaps we should change readerList. 00146 00147 char* FilePattern; 00148 char* CurrentFilePattern; 00149 char* FilePrefix; 00150 char* CurrentFilePrefix; 00151 char* MultiFileName; 00152 int FileRange[2]; 00153 int CurrentFileRange[2]; 00154 int NumberOfFiles; 00155 char **FileNames; 00156 int NumberOfFileNames; 00157 int GenerateFileIdArray; 00158 //BTX 00159 std::vector<vtkExodusReader*> readerList; 00160 //ETX 00161 00162 int Timing; 00163 vtkTimerLog *TimerLog; 00164 00165 int RequestInformation( 00166 vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00167 int RequestData( 00168 vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00169 00170 private: 00171 vtkPExodusReader(const vtkPExodusReader&); // Not implemented 00172 void operator=(const vtkPExodusReader&); // Not implemented 00173 }; 00174 00175 #endif