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 <vtkstd/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 00079 void SetFileNames(int nfiles, const char **names); 00080 00081 virtual void SetFileName(const char *name); 00082 00084 char **GetFileNames(){return this->FileNames;} 00085 00087 int GetNumberOfFileNames(){return this->NumberOfFileNames;} 00088 00090 00091 vtkGetMacro(NumberOfFiles, int); 00093 00099 void SetGenerateFileIdArray(int flag); 00100 vtkGetMacro(GenerateFileIdArray, int); 00101 vtkBooleanMacro(GenerateFileIdArray, int); 00102 virtual int GetTotalNumberOfElements(); 00103 virtual int GetTotalNumberOfNodes(); 00104 00105 00106 //begin USE_EXO_DSP_FILTERS 00107 int GetNumberOfVariableArrays(); 00108 const char *GetVariableArrayName(int a_which); 00109 void EnableDSPFiltering(); 00110 void AddFilter(vtkDSPFilterDefinition *a_filter); 00111 void StartAddingFilter(); 00112 void AddFilterInputVar(char *name); 00113 void AddFilterOutputVar(char *name); 00114 void AddFilterNumeratorWeight(double weight); 00115 void AddFilterForwardNumeratorWeight(double weight); 00116 void AddFilterDenominatorWeight(double weight); 00117 void FinishAddingFilter(); 00118 void RemoveFilter(char *a_outputVariableName); 00119 //end USE_EXO_DSP_FILTERS 00120 00121 00122 protected: 00123 vtkPExodusReader(); 00124 ~vtkPExodusReader(); 00125 00126 //begin USE_EXO_DSP_FILTERS 00127 void GetDSPOutputArrays(int exoid, vtkUnstructuredGrid* output); 00128 //end USE_EXO_DSP_FILTERS 00129 00131 00132 int DeterminePattern(const char* file); 00133 static int DetermineFileId(const char* file); 00135 00136 // This method sets up a ugrid with 00137 // all meta data but zero cells 00138 void SetUpEmptyGrid(); 00139 00140 // **KEN** Previous discussions concluded with std classes in header 00141 // files is bad. Perhaps we should change readerList. 00142 00143 char* FilePattern; 00144 char* CurrentFilePattern; 00145 char* FilePrefix; 00146 char* CurrentFilePrefix; 00147 char* MultiFileName; 00148 int FileRange[2]; 00149 int CurrentFileRange[2]; 00150 int NumberOfFiles; 00151 char **FileNames; 00152 int NumberOfFileNames; 00153 int GenerateFileIdArray; 00154 //BTX 00155 vtkstd::vector<vtkExodusReader*> readerList; 00156 //ETX 00157 00158 int Timing; 00159 vtkTimerLog *TimerLog; 00160 00161 int RequestInformation( 00162 vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00163 int RequestData( 00164 vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00165 00166 private: 00167 vtkPExodusReader(const vtkPExodusReader&); // Not implemented 00168 void operator=(const vtkPExodusReader&); // Not implemented 00169 }; 00170 00171 #endif