VTK  9.4.20241226
vtkAMReXGridReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
13#ifndef vtkAMReXGridReader_h
14#define vtkAMReXGridReader_h
15
16#include "vtkAMRBaseReader.h"
17#include "vtkIOAMRModule.h" // For export macro
18#include "vtkNew.h" // for vtkNew
19
20#include <string> // for std::string.
21#include <vector> // for std::vector.
22
23VTK_ABI_NAMESPACE_BEGIN
26
27class VTKIOAMR_EXPORT vtkAMReXGridReader : public vtkAMRBaseReader
28{
29public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
37 int GetNumberOfBlocks() override;
38
42 int GetNumberOfLevels() override;
43
47 void SetFileName(VTK_FILEPATH const char* fileName) override;
48
49protected:
52
56 void ReadMetaData() override;
57
61 int GetBlockLevel(int blockIdx) override;
62
70 int GetLevelBlockID(int blockIdx);
71
75 int FillMetaData() override;
76
80 vtkUniformGrid* GetAMRGrid(int blockIdx) override;
81
85 void GetAMRGridData(int blockIdx, vtkUniformGrid* block, const char* field) override;
86
91 void GetAMRGridPointData(int blockIdx, vtkUniformGrid* block, const char* field) override;
92
96 void SetUpDataArraySelections() override;
97
99 bool IsReady;
100
101private:
102 vtkAMReXGridReader(const vtkAMReXGridReader&) = delete;
103 void operator=(const vtkAMReXGridReader&) = delete;
104
105 void ComputeStats(
106 vtkAMReXGridReaderInternal* internal, std::vector<int>& numBlocks, double min[3]);
108};
109
110VTK_ABI_NAMESPACE_END
111#endif
An abstract class that encapsulates common functionality for all AMR readers.
Consists of the low-level AMReX Reader used by the vtkAMReXGridReader.
reader for AMReX plotfiles grid data.
int GetLevelBlockID(int blockIdx)
GetLevelBlockID.
int GetBlockLevel(int blockIdx) override
See vtkAMRBaseReader::GetBlockLevel.
void ReadMetaData() override
See vtkAMRBaseReader::ReadMetaData.
int GetNumberOfLevels() override
See vtkAMRBaseReader::GetNumberOfLevels.
int GetNumberOfBlocks() override
See vtkAMRBaseReader::GetNumberOfBlocks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetUpDataArraySelections() override
See vtkAMRBaseReader::SetUpDataArraySelections.
~vtkAMReXGridReader() override
int FillMetaData() override
See vtkAMRBaseReader::FillMetaData.
vtkUniformGrid * GetAMRGrid(int blockIdx) override
See vtkAMRBaseReader::GetAMRGrid.
void GetAMRGridData(int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData.
void SetFileName(VTK_FILEPATH const char *fileName) override
See vtkAMRBaseReader::SetFileName.
void GetAMRGridPointData(int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData Note: currently, nodal data is only supported in extra multifabs...
static vtkAMReXGridReader * New()
a simple class to control print indentation
Definition vtkIndent.h:108
hierarchical dataset of vtkUniformGrids
image data with blanking
#define VTK_FILEPATH