VTK  9.3.20240420
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
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
53 vtkGetObjectMacro(Controller, vtkMultiProcessController);
55
57
66 vtkSetFilePathMacro(FilePattern);
67 vtkGetFilePathMacro(FilePattern);
71
73
77 void SetFileRange(int, int);
78 void SetFileRange(int* r) { this->SetFileRange(r[0], r[1]); }
79 vtkGetVector2Macro(FileRange, int);
81
88 void SetFileNames(int nfiles, const char** names);
89
90 void SetFileName(VTK_FILEPATH const char* name) override;
91
95 char** GetFileNames() { return this->FileNames; }
96
100 int GetNumberOfFileNames() { return this->NumberOfFileNames; }
101
103
106 vtkGetMacro(NumberOfFiles, int);
108
111
117
119
129 vtkGetMacro(VariableCacheSize, double);
130 vtkSetMacro(VariableCacheSize, double);
132
133protected:
136
138
141 int DeterminePattern(const char* file);
142 static int DetermineFileId(const char* file);
144
145 // holds the size of the variable cache in GigaBytes
147
148 // **KEN** Previous discussions concluded with std classes in header
149 // files is bad. Perhaps we should change ReaderList.
150
159 int FileRange[2];
160 int CurrentFileRange[2];
162 char** FileNames;
164
165 std::vector<vtkExodusIIReader*> ReaderList;
166 std::vector<int> NumberOfPointsPerFile;
167 std::vector<int> NumberOfCellsPerFile;
168
170
173
176
177private:
178 vtkPExodusIIReader(const vtkPExodusIIReader&) = delete;
179 void operator=(const vtkPExodusIIReader&) = delete;
180};
181
182VTK_ABI_NAMESPACE_END
183#endif
Read exodus 2 files .ex2.
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.
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.
int vtkIdType
Definition vtkType.h:315
#define VTK_FILEPATH