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 
38 #ifndef __vtkPExodusIIReader_h
39 #define __vtkPExodusIIReader_h
40 
41 #include "vtkIOParallelExodusModule.h" // For export macro
42 #include "vtkExodusIIReader.h"
43 
44 #include <vector> // Required for vector
45 
46 class vtkTimerLog;
48 
49 class VTKIOPARALLELEXODUS_EXPORT vtkPExodusIIReader : public vtkExodusIIReader
50 {
51 public:
52  static vtkPExodusIIReader* New();
54  void PrintSelf( ostream& os, vtkIndent indent );
55 
57 
60  void SetController(vtkMultiProcessController* c);
61  vtkGetObjectMacro(Controller, vtkMultiProcessController);
63 
65 
72  vtkSetStringMacro(FilePattern);
73  vtkGetStringMacro(FilePattern);
74  vtkSetStringMacro(FilePrefix);
75  vtkGetStringMacro(FilePrefix);
77 
79 
81  void SetFileRange( int, int );
82  void SetFileRange( int* r ) { this->SetFileRange( r[0], r[1] ); }
83  vtkGetVector2Macro(FileRange,int);
85 
90  void SetFileNames( int nfiles, const char** names );
91 
92  virtual void SetFileName( const char* name );
93 
95  char** GetFileNames() { return this->FileNames; }
96 
98  int GetNumberOfFileNames() { return this->NumberOfFileNames; }
99 
101 
102  vtkGetMacro(NumberOfFiles,int);
104 
107 
113  virtual void UpdateTimeInformation();
114 
118  virtual void Broadcast( vtkMultiProcessController* ctrl );
119 
121 
128  vtkGetMacro(VariableCacheSize,double);
129  vtkSetMacro(VariableCacheSize,double);
131 
132 protected:
135 
137 
138  int DeterminePattern( const char* file );
139  static int DetermineFileId( const char* file );
141 
142  //holds the size of the variable cache in GigaBytes
144 
145  // **KEN** Previous discussions concluded with std classes in header
146  // files is bad. Perhaps we should change ReaderList.
147 
151  char* FilePattern;
153  char* FilePrefix;
156  int FileRange[2];
157  int CurrentFileRange[2];
159  char **FileNames;
161 //BTX
162  std::vector<vtkExodusIIReader*> ReaderList;
163  std::vector<int> NumberOfPointsPerFile;
164  std::vector<int> NumberOfCellsPerFile;
165 //ETX
166 
168 
169  int Timing;
171 
174 
175 private:
176  vtkPExodusIIReader( const vtkPExodusIIReader& ); // Not implemented
177  void operator = ( const vtkPExodusIIReader& ); // Not implemented
178 };
179 
180 #endif