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 
42 #ifndef vtkPExodusIIReader_h
43 #define vtkPExodusIIReader_h
44 
45 #include "vtkIOParallelExodusModule.h" // For export macro
46 #include "vtkExodusIIReader.h"
47 
48 #include <vector> // Required for vector
49 
50 class vtkTimerLog;
52 
53 class VTKIOPARALLELEXODUS_EXPORT vtkPExodusIIReader : public vtkExodusIIReader
54 {
55 public:
56  static vtkPExodusIIReader* New();
58  void PrintSelf( ostream& os, vtkIndent indent ) override;
59 
61 
66  void SetController(vtkMultiProcessController* c);
67  vtkGetObjectMacro(Controller, vtkMultiProcessController);
69 
71 
80  vtkSetStringMacro(FilePattern);
81  vtkGetStringMacro(FilePattern);
82  vtkSetStringMacro(FilePrefix);
83  vtkGetStringMacro(FilePrefix);
85 
87 
91  void SetFileRange( int, int );
92  void SetFileRange( int* r ) { this->SetFileRange( r[0], r[1] ); }
93  vtkGetVector2Macro(FileRange,int);
95 
102  void SetFileNames( int nfiles, const char** names );
103 
104  void SetFileName( const char* name ) override;
105 
109  char** GetFileNames() { return this->FileNames; }
110 
114  int GetNumberOfFileNames() { return this->NumberOfFileNames; }
115 
117 
120  vtkGetMacro(NumberOfFiles,int);
122 
124  vtkIdType GetTotalNumberOfNodes() override;
125 
130  virtual void Broadcast( vtkMultiProcessController* ctrl );
131 
133 
143  vtkGetMacro(VariableCacheSize,double);
144  vtkSetMacro(VariableCacheSize,double);
146 
147 protected:
149  ~vtkPExodusIIReader() override;
150 
152 
155  int DeterminePattern( const char* file );
156  static int DetermineFileId( const char* file );
158 
159  //holds the size of the variable cache in GigaBytes
161 
162  // **KEN** Previous discussions concluded with std classes in header
163  // files is bad. Perhaps we should change ReaderList.
164 
168  char* FilePattern;
170  char* FilePrefix;
173  int FileRange[2];
174  int CurrentFileRange[2];
176  char **FileNames;
178 
179  std::vector<vtkExodusIIReader*> ReaderList;
180  std::vector<int> NumberOfPointsPerFile;
181  std::vector<int> NumberOfCellsPerFile;
182 
184 
185  int Timing;
187 
190 
191 private:
192  vtkPExodusIIReader( const vtkPExodusIIReader& ) = delete;
193  void operator = ( const vtkPExodusIIReader& ) = delete;
194 };
195 
196 #endif
std::vector< int > NumberOfPointsPerFile
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
std::vector< vtkExodusIIReader * > ReaderList
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store vtkAlgorithm input/output information.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int vtkIdType
Definition: vtkType.h:347
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:91
std::vector< int > NumberOfCellsPerFile
vtkMultiProcessController * Controller
a simple class to control print indentation
Definition: vtkIndent.h:39
Read Exodus II files (.exii)
virtual vtkIdType GetTotalNumberOfNodes()
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.
int GetNumberOfFileNames()
Return number of file names set in SetFileNames.
friend class vtkPExodusIIReader
Multiprocessing communication superclass.