VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPExodusIIReader.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 __vtkPExodusIIReader_h 00039 #define __vtkPExodusIIReader_h 00040 00041 #include "vtkExodusIIReader.h" 00042 00043 #include <vtkstd/vector> // Required for vector 00044 00045 class vtkTimerLog; 00046 class vtkMultiProcessController; 00047 00048 class VTK_HYBRID_EXPORT vtkPExodusIIReader : public vtkExodusIIReader 00049 { 00050 public: 00051 static vtkPExodusIIReader* New(); 00052 vtkTypeMacro(vtkPExodusIIReader,vtkExodusIIReader); 00053 void PrintSelf( ostream& os, vtkIndent indent ); 00054 00056 00059 void SetController(vtkMultiProcessController* c); 00060 vtkGetObjectMacro(Controller, vtkMultiProcessController); 00062 00064 00071 vtkSetStringMacro(FilePattern); 00072 vtkGetStringMacro(FilePattern); 00073 vtkSetStringMacro(FilePrefix); 00074 vtkGetStringMacro(FilePrefix); 00076 00078 00080 void SetFileRange( int, int ); 00081 void SetFileRange( int* r ) { this->SetFileRange( r[0], r[1] ); } 00082 vtkGetVector2Macro(FileRange,int); 00084 00089 void SetFileNames( int nfiles, const char** names ); 00090 00091 virtual void SetFileName( const char* name ); 00092 00094 char** GetFileNames() { return this->FileNames; } 00095 00097 int GetNumberOfFileNames() { return this->NumberOfFileNames; } 00098 00100 00101 vtkGetMacro(NumberOfFiles,int); 00103 00104 virtual vtkIdType GetTotalNumberOfElements(); 00105 virtual vtkIdType GetTotalNumberOfNodes(); 00106 00112 virtual void UpdateTimeInformation(); 00113 00117 virtual void Broadcast( vtkMultiProcessController* ctrl ); 00118 00119 protected: 00120 vtkPExodusIIReader(); 00121 ~vtkPExodusIIReader(); 00122 00124 00125 int DeterminePattern( const char* file ); 00126 static int DetermineFileId( const char* file ); 00128 00129 // **KEN** Previous discussions concluded with std classes in header 00130 // files is bad. Perhaps we should change ReaderList. 00131 00132 vtkMultiProcessController* Controller; 00133 vtkIdType ProcRank; 00134 vtkIdType ProcSize; 00135 char* FilePattern; 00136 char* CurrentFilePattern; 00137 char* FilePrefix; 00138 char* CurrentFilePrefix; 00139 char* MultiFileName; 00140 int FileRange[2]; 00141 int CurrentFileRange[2]; 00142 int NumberOfFiles; 00143 char **FileNames; 00144 int NumberOfFileNames; 00145 //BTX 00146 vtkstd::vector<vtkExodusIIReader*> ReaderList; 00147 vtkstd::vector<int> NumberOfPointsPerFile; 00148 vtkstd::vector<int> NumberOfCellsPerFile; 00149 //ETX 00150 00151 int LastCommonTimeStep; 00152 00153 int Timing; 00154 vtkTimerLog *TimerLog; 00155 00156 int RequestInformation( vtkInformation*, vtkInformationVector**, vtkInformationVector* ); 00157 int RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector* ); 00158 00159 private: 00160 vtkPExodusIIReader( const vtkPExodusIIReader& ); // Not implemented 00161 void operator = ( const vtkPExodusIIReader& ); // Not implemented 00162 }; 00163 00164 #endif