00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00038 #ifndef __vtkPExodusReader_h
00039 #define __vtkPExodusReader_h
00040
00041 #include "vtkExodusReader.h"
00042
00043 #include <vtkstd/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
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
00120
00121
00122 protected:
00123 vtkPExodusReader();
00124 ~vtkPExodusReader();
00125
00126
00127 void GetDSPOutputArrays(int exoid, vtkUnstructuredGrid* output);
00128
00129
00131
00132 int DeterminePattern(const char* file);
00133 static int DetermineFileId(const char* file);
00135
00136
00137
00138 void SetUpEmptyGrid();
00139
00140
00141
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
00155 vtkstd::vector<vtkExodusReader*> readerList;
00156
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&);
00168 void operator=(const vtkPExodusReader&);
00169 };
00170
00171 #endif