VTK  9.6.20251228
vtkPExodusIIReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3// SPDX-License-Identifier: BSD-3-Clause
4
26
27#ifndef vtkPExodusIIReader_h
28#define vtkPExodusIIReader_h
29
30#include "vtkExodusIIReader.h"
31#include "vtkIOParallelExodusModule.h" // For export macro
32
33#include <vector> // Required for vector
34
35VTK_ABI_NAMESPACE_BEGIN
36class vtkTimerLog;
38
39class VTKIOPARALLELEXODUS_EXPORT vtkPExodusIIReader : public vtkExodusIIReader
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
55
57
68 virtual void SetFilePattern(VTK_FILEPATH const char*);
73
75
79 void SetFileRange(int, int);
80 void SetFileRange(int* r) { this->SetFileRange(r[0], r[1]); }
81 vtkGetVector2Macro(FileRange, int);
83
90 void SetFileNames(int nfiles, const char** names);
91
92 void SetFileName(VTK_FILEPATH const char* name) override;
93
97 char** GetFileNames() { return this->FileNames; }
98
103
105
108 vtkGetMacro(NumberOfFiles, int);
110
113
119
121
131 vtkGetMacro(VariableCacheSize, double);
132 vtkSetMacro(VariableCacheSize, double);
134
135protected:
138
140
143 int DeterminePattern(const char* file);
144 static int DetermineFileId(const char* file);
146
147 // holds the size of the variable cache in GigaBytes
149
150 // **KEN** Previous discussions concluded with std classes in header
151 // files is bad. Perhaps we should change ReaderList.
152
162 int FileRange[2];
165 char** FileNames;
167
168 std::vector<vtkExodusIIReader*> ReaderList;
169 std::vector<int> NumberOfPointsPerFile;
170 std::vector<int> NumberOfCellsPerFile;
171
173
176
179
180private:
181 vtkPExodusIIReader(const vtkPExodusIIReader&) = delete;
182 void operator=(const vtkPExodusIIReader&) = delete;
183};
184
185VTK_ABI_NAMESPACE_END
186#endif
friend class vtkPExodusIIReader
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
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.
std::string FilePatternStdFormat
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
virtual void SetFilePattern(const char *)
These methods tell the reader that the data is distributed across multiple files.
std::vector< int > NumberOfPointsPerFile
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetFileName(const char *name) override
Specify file name of the Exodus file.
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.
int vtkIdType
Definition vtkType.h:368
#define VTK_FILEPATH