VTK
dox/Hybrid/vtkPExodusIIReader.h
Go to the documentation of this file.
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 <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 
00120 
00127   vtkGetMacro(VariableCacheSize,double);
00128   vtkSetMacro(VariableCacheSize,double);
00130 
00131 protected:
00132   vtkPExodusIIReader();
00133   ~vtkPExodusIIReader();
00134 
00136 
00137   int DeterminePattern( const char* file );
00138   static int DetermineFileId( const char* file );
00140 
00141   //holds the size of the variable cache in GigaBytes
00142   double VariableCacheSize;
00143 
00144   // **KEN** Previous discussions concluded with std classes in header
00145   // files is bad.  Perhaps we should change ReaderList.
00146 
00147   vtkMultiProcessController* Controller;
00148   vtkIdType ProcRank;
00149   vtkIdType ProcSize;
00150   char* FilePattern;
00151   char* CurrentFilePattern;
00152   char* FilePrefix;
00153   char* CurrentFilePrefix;
00154   char* MultiFileName;
00155   int FileRange[2];
00156   int CurrentFileRange[2];
00157   int NumberOfFiles;
00158   char **FileNames;
00159   int NumberOfFileNames;
00160 //BTX
00161   std::vector<vtkExodusIIReader*> ReaderList;
00162   std::vector<int> NumberOfPointsPerFile;
00163   std::vector<int> NumberOfCellsPerFile;
00164 //ETX
00165 
00166   int LastCommonTimeStep;
00167 
00168   int Timing;
00169   vtkTimerLog *TimerLog;
00170 
00171   int RequestInformation( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00172   int RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00173 
00174 private:
00175   vtkPExodusIIReader( const vtkPExodusIIReader& ); // Not implemented
00176   void operator = ( const vtkPExodusIIReader& ); // Not implemented
00177 };
00178 
00179 #endif