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:
55  void PrintSelf( ostream& os, vtkIndent indent );
56 
58 
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
vtkPExodusIIReader::FileNames
char ** FileNames
Definition: vtkPExodusIIReader.h:173
vtkPExodusIIReader::GetTotalNumberOfElements
virtual vtkIdType GetTotalNumberOfElements()
vtkExodusIIReader::vtkPExodusIIReader
friend class vtkPExodusIIReader
Definition: vtkExodusIIReader.h:831
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkPExodusIIReader::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkPExodusIIReader::MultiFileName
char * MultiFileName
Definition: vtkPExodusIIReader.h:169
vtkPExodusIIReader::NumberOfCellsPerFile
std::vector< int > NumberOfCellsPerFile
Definition: vtkPExodusIIReader.h:178
vtkPExodusIIReader::SetFileNames
void SetFileNames(int nfiles, const char **names)
Provide an arbitrary list of file names instead of a prefix, pattern and range.
vtkExodusIIReader
Read exodus 2 files .ex2.
Definition: vtkExodusIIReader.h:57
vtkPExodusIIReader::SetFileRange
void SetFileRange(int *r)
Definition: vtkPExodusIIReader.h:89
vtkPExodusIIReader::NumberOfFileNames
int NumberOfFileNames
Definition: vtkPExodusIIReader.h:174
vtkPExodusIIReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPExodusIIReader::GetNumberOfFileNames
int GetNumberOfFileNames()
Return number of file names set in SetFileNames.
Definition: vtkPExodusIIReader.h:111
vtkPExodusIIReader::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkPExodusIIReader::GetFileNames
char ** GetFileNames()
Return pointer to list of file names set in SetFileNames.
Definition: vtkPExodusIIReader.h:106
vtkPExodusIIReader::CurrentFilePrefix
char * CurrentFilePrefix
Definition: vtkPExodusIIReader.h:168
vtkPExodusIIReader::GetTotalNumberOfNodes
virtual vtkIdType GetTotalNumberOfNodes()
vtkPExodusIIReader
Read Exodus II files (.exii)
Definition: vtkPExodusIIReader.h:51
vtkPExodusIIReader::CurrentFilePattern
char * CurrentFilePattern
Definition: vtkPExodusIIReader.h:166
vtkPExodusIIReader::New
static vtkPExodusIIReader * New()
vtkPExodusIIReader::FilePrefix
char * FilePrefix
Definition: vtkPExodusIIReader.h:167
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:83
vtkPExodusIIReader::ReaderList
std::vector< vtkExodusIIReader * > ReaderList
Definition: vtkPExodusIIReader.h:176
vtkPExodusIIReader::DeterminePattern
int DeterminePattern(const char *file)
Try to "guess" the pattern of files.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPExodusIIReader::Timing
int Timing
Definition: vtkPExodusIIReader.h:182
vtkPExodusIIReader::NumberOfPointsPerFile
std::vector< int > NumberOfPointsPerFile
Definition: vtkPExodusIIReader.h:177
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkPExodusIIReader::SetController
void SetController(vtkMultiProcessController *c)
Set/get the communication object used to relay a list of files from the rank 0 process to all others.
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkPExodusIIReader::Broadcast
virtual void Broadcast(vtkMultiProcessController *ctrl)
Sends metadata (that read from the input file, not settings modified through this API) from the rank ...
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkPExodusIIReader::VariableCacheSize
double VariableCacheSize
Definition: vtkPExodusIIReader.h:157
vtkTimerLog
Timer support and logging.
Definition: vtkTimerLog.h:81
vtkPExodusIIReader::SetFileName
virtual void SetFileName(const char *name)
Specify file name of the Exodus file.
vtkPExodusIIReader::ProcSize
vtkIdType ProcSize
Definition: vtkPExodusIIReader.h:164
vtkExodusIIReader.h
vtkPExodusIIReader::LastCommonTimeStep
int LastCommonTimeStep
Definition: vtkPExodusIIReader.h:180
vtkPExodusIIReader::SetFileRange
void SetFileRange(int, int)
Set the range of files that are being loaded.
vtkPExodusIIReader::~vtkPExodusIIReader
~vtkPExodusIIReader()
vtkPExodusIIReader::DetermineFileId
static int DetermineFileId(const char *file)
vtkPExodusIIReader::TimerLog
vtkTimerLog * TimerLog
Definition: vtkPExodusIIReader.h:183
vtkPExodusIIReader::vtkPExodusIIReader
vtkPExodusIIReader()
vtkPExodusIIReader::Controller
vtkMultiProcessController * Controller
Definition: vtkPExodusIIReader.h:162
vtkPExodusIIReader::NumberOfFiles
int NumberOfFiles
Definition: vtkPExodusIIReader.h:172
vtkPExodusIIReader::ProcRank
vtkIdType ProcRank
Definition: vtkPExodusIIReader.h:163
vtkPExodusIIReader::FilePattern
char * FilePattern
Definition: vtkPExodusIIReader.h:165