VTK
vtkPExodusIIReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPExodusIIReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*----------------------------------------------------------------------------
16  Copyright (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
19 
39 #ifndef vtkPExodusIIReader_h
40 #define vtkPExodusIIReader_h
41 
42 #include "vtkIOParallelExodusModule.h" // For export macro
43 #include "vtkExodusIIReader.h"
44 
45 #include <vector> // Required for vector
46 
47 class vtkTimerLog;
49 
50 class VTKIOPARALLELEXODUS_EXPORT vtkPExodusIIReader : public vtkExodusIIReader
51 {
52 public:
53  static vtkPExodusIIReader* New();
55  void PrintSelf( ostream& os, vtkIndent indent );
56 
58 
63  void SetController(vtkMultiProcessController* c);
64  vtkGetObjectMacro(Controller, vtkMultiProcessController);
66 
68 
77  vtkSetStringMacro(FilePattern);
78  vtkGetStringMacro(FilePattern);
79  vtkSetStringMacro(FilePrefix);
80  vtkGetStringMacro(FilePrefix);
82 
84 
88  void SetFileRange( int, int );
89  void SetFileRange( int* r ) { this->SetFileRange( r[0], r[1] ); }
90  vtkGetVector2Macro(FileRange,int);
92 
99  void SetFileNames( int nfiles, const char** names );
100 
101  virtual void SetFileName( const char* name );
102 
106  char** GetFileNames() { return this->FileNames; }
107 
111  int GetNumberOfFileNames() { return this->NumberOfFileNames; }
112 
114 
117  vtkGetMacro(NumberOfFiles,int);
119 
122 
127  virtual void Broadcast( vtkMultiProcessController* ctrl );
128 
130 
140  vtkGetMacro(VariableCacheSize,double);
141  vtkSetMacro(VariableCacheSize,double);
143 
144 protected:
147 
149 
152  int DeterminePattern( const char* file );
153  static int DetermineFileId( const char* file );
155 
156  //holds the size of the variable cache in GigaBytes
158 
159  // **KEN** Previous discussions concluded with std classes in header
160  // files is bad. Perhaps we should change ReaderList.
161 
165  char* FilePattern;
167  char* FilePrefix;
170  int FileRange[2];
171  int CurrentFileRange[2];
173  char **FileNames;
175 
176  std::vector<vtkExodusIIReader*> ReaderList;
177  std::vector<int> NumberOfPointsPerFile;
178  std::vector<int> NumberOfCellsPerFile;
179 
181 
182  int Timing;
184 
187 
188 private:
189  vtkPExodusIIReader( const vtkPExodusIIReader& ) VTK_DELETE_FUNCTION;
190  void operator = ( const vtkPExodusIIReader& ) VTK_DELETE_FUNCTION;
191 };
192 
193 #endif
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
std::vector< int > NumberOfPointsPerFile
std::vector< vtkExodusIIReader * > ReaderList
Store vtkAlgorithm input/output information.
int vtkIdType
Definition: vtkType.h:287
static vtkExodusIIReader * New()
virtual void SetFileName(const char *fname)
Specify file name of the Exodus file.
virtual vtkIdType GetTotalNumberOfElements()
Timer support and logging.
Definition: vtkTimerLog.h:80
std::vector< int > NumberOfCellsPerFile
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkMultiProcessController * Controller
a simple class to control print indentation
Definition: vtkIndent.h:39
Read Exodus II files (.exii)
virtual vtkIdType GetTotalNumberOfNodes()
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetFileRange(int *r)
Set the range of files that are being loaded.
Read exodus 2 files .ex2.
char ** GetFileNames()
Return pointer to list of file names set in SetFileNames.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
int GetNumberOfFileNames()
Return number of file names set in SetFileNames.
friend class vtkPExodusIIReader
Multiprocessing communication superclass.