VTK  9.2.20221001
vtkAMReXGridReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMReXGridReader.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 =========================================================================*/
25 #ifndef vtkAMReXGridReader_h
26 #define vtkAMReXGridReader_h
27 
28 #include "vtkAMRBaseReader.h"
29 #include "vtkIOAMRModule.h" // For export macro
30 #include "vtkNew.h" // for vtkNew
31 
32 #include <string> // for std::string.
33 #include <vector> // for std::vector.
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkOverlappingAMR;
38 
39 class VTKIOAMR_EXPORT vtkAMReXGridReader : public vtkAMRBaseReader
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  int GetNumberOfBlocks() override;
50 
54  int GetNumberOfLevels() override;
55 
59  void SetFileName(VTK_FILEPATH const char* fileName) override;
60 
61 protected:
63  ~vtkAMReXGridReader() override;
64 
68  void ReadMetaData() override;
69 
73  int GetBlockLevel(const int blockIdx) override;
74 
82  int GetLevelBlockID(const int blockIdx);
83 
87  int FillMetaData() override;
88 
92  vtkUniformGrid* GetAMRGrid(const int blockIdx) override;
93 
97  void GetAMRGridData(const int blockIdx, vtkUniformGrid* block, const char* field) override;
98 
103  void GetAMRGridPointData(const int blockIdx, vtkUniformGrid* block, const char* field) override;
104 
108  void SetUpDataArraySelections() override;
109 
111  bool IsReady;
112 
113 private:
114  vtkAMReXGridReader(const vtkAMReXGridReader&) = delete;
115  void operator=(const vtkAMReXGridReader&) = delete;
116 
117  void ComputeStats(
118  vtkAMReXGridReaderInternal* internal, std::vector<int>& numBlocks, double min[3]);
119  vtkAMReXGridReaderInternal* Internal;
120 };
121 
122 VTK_ABI_NAMESPACE_END
123 #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.
void GetAMRGridPointData(const int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData Note: currently, nodal data is only supported in extra multifabs...
void ReadMetaData() override
See vtkAMRBaseReader::ReadMetaData.
int GetNumberOfLevels() override
See vtkAMRBaseReader::GetNumberOfLevels.
int GetLevelBlockID(const int blockIdx)
GetLevelBlockID.
vtkUniformGrid * GetAMRGrid(const int blockIdx) override
See vtkAMRBaseReader::GetAMRGrid.
void GetAMRGridData(const int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData.
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 GetBlockLevel(const int blockIdx) override
See vtkAMRBaseReader::GetBlockLevel.
int FillMetaData() override
See vtkAMRBaseReader::FillMetaData.
void SetFileName(VTK_FILEPATH const char *fileName) override
See vtkAMRBaseReader::SetFileName.
static vtkAMReXGridReader * New()
a simple class to control print indentation
Definition: vtkIndent.h:120
hierarchical dataset of vtkUniformGrids
image data with blanking
@ field
Definition: vtkX3D.h:189
#define VTK_FILEPATH