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 
111  virtual void Broadcast( vtkMultiProcessController* ctrl );
112 
114 
121  vtkGetMacro(VariableCacheSize,double);
122  vtkSetMacro(VariableCacheSize,double);
124 
125 protected:
128 
130 
131  int DeterminePattern( const char* file );
132  static int DetermineFileId( const char* file );
134 
135  //holds the size of the variable cache in GigaBytes
137 
138  // **KEN** Previous discussions concluded with std classes in header
139  // files is bad. Perhaps we should change ReaderList.
140 
144  char* FilePattern;
146  char* FilePrefix;
149  int FileRange[2];
150  int CurrentFileRange[2];
152  char **FileNames;
154 //BTX
155  std::vector<vtkExodusIIReader*> ReaderList;
156  std::vector<int> NumberOfPointsPerFile;
157  std::vector<int> NumberOfCellsPerFile;
158 //ETX
159 
161 
162  int Timing;
164 
167 
168 private:
169  vtkPExodusIIReader( const vtkPExodusIIReader& ); // Not implemented
170  void operator = ( const vtkPExodusIIReader& ); // Not implemented
171 };
172 
173 #endif
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
std::vector< int > NumberOfPointsPerFile
std::vector< vtkExodusIIReader * > ReaderList
Store vtkAlgorithm input/output information.
int vtkIdType
Definition: vtkType.h:275
static vtkExodusIIReader * New()
virtual void SetFileName(const char *fname)
virtual vtkIdType GetTotalNumberOfElements()
Timer support and logging.
Definition: vtkTimerLog.h:81
std::vector< int > NumberOfCellsPerFile
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkMultiProcessController * Controller
a simple class to control print indentation
Definition: vtkIndent.h:38
Read Exodus II files (.exii)
virtual vtkIdType GetTotalNumberOfNodes()
void SetFileRange(int *r)
Read exodus 2 files .ex2.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
Multiprocessing communication superclass.