VTK  9.1.0
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 "vtkExodusIIReader.h"
43#include "vtkIOParallelExodusModule.h" // For export macro
44
45#include <vector> // Required for vector
46
47class vtkTimerLog;
49
50class VTKIOPARALLELEXODUS_EXPORT vtkPExodusIIReader : public vtkExodusIIReader
51{
52public:
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
58
64 vtkGetObjectMacro(Controller, vtkMultiProcessController);
66
68
77 vtkSetFilePathMacro(FilePattern);
78 vtkGetFilePathMacro(FilePattern);
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 void SetFileName(VTK_FILEPATH const char* name) override;
102
106 char** GetFileNames() { return this->FileNames; }
107
111 int GetNumberOfFileNames() { return this->NumberOfFileNames; }
112
114
117 vtkGetMacro(NumberOfFiles, int);
119
122
128
130
140 vtkGetMacro(VariableCacheSize, double);
141 vtkSetMacro(VariableCacheSize, double);
143
144protected:
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
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
184
187
188private:
189 vtkPExodusIIReader(const vtkPExodusIIReader&) = delete;
190 void operator=(const vtkPExodusIIReader&) = delete;
191};
192
193#endif
Read exodus 2 files .ex2.
friend class vtkPExodusIIReader
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
Read Exodus II files (.exii)
vtkSetFilePathMacro(FilePattern)
These methods tell the reader that the data is distributed across multiple files.
static vtkPExodusIIReader * New()
static int DetermineFileId(const char *file)
Try to "guess" the pattern of files.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
char ** GetFileNames()
Return pointer to list of file names set in SetFileNames.
vtkGetFilePathMacro(FilePrefix)
These methods tell the reader that the data is distributed across multiple files.
vtkSetFilePathMacro(FilePrefix)
These methods tell the reader that the data is distributed across multiple files.
int GetNumberOfFileNames()
Return number of file names set in SetFileNames.
vtkGetFilePathMacro(FilePattern)
These methods tell the reader that the data is distributed across multiple files.
vtkIdType GetTotalNumberOfNodes() override
vtkIdType GetTotalNumberOfElements() override
void SetFileName(VTK_FILEPATH const char *name) override
Specify file name of the Exodus file.
std::vector< int > NumberOfPointsPerFile
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetController(vtkMultiProcessController *c)
Set/get the communication object used to relay a list of files from the rank 0 process to all others.
void SetFileNames(int nfiles, const char **names)
Provide an arbitrary list of file names instead of a prefix, pattern and range.
void SetFileRange(int *r)
Set the range of files that are being loaded.
std::vector< int > NumberOfCellsPerFile
~vtkPExodusIIReader() override
vtkMultiProcessController * Controller
int DeterminePattern(const char *file)
Try to "guess" the pattern of files.
virtual void Broadcast(vtkMultiProcessController *ctrl)
Sends metadata (that read from the input file, not settings modified through this API) from the rank ...
void SetFileRange(int, int)
Set the range of files that are being loaded.
std::vector< vtkExodusIIReader * > ReaderList
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Timer support and logging.
Definition: vtkTimerLog.h:199
@ name
Definition: vtkX3D.h:225
int vtkIdType
Definition: vtkType.h:332
#define VTK_FILEPATH