14#ifndef vtkAMREnzoReader_h
15#define vtkAMREnzoReader_h
18#include "vtkIOAMRModule.h"
23VTK_ABI_NAMESPACE_BEGIN
79 void ParseLabel(
const std::string& labelString,
int& idx, std::string& label);
85 void ParseCFactor(
const std::string& labelString,
int& idx,
double& factor);
126 const char* vtkNotUsed(field))
override
144 std::map<std::string, int> label2idx;
145 std::map<int, double> conversionFactors;
An abstract class that encapsulates common functionality for all AMR readers.
A concrete instance of vtkAMRBaseReader that implements functionality for reading Enzo AMR datasets.
void ParseLabel(const std::string &labelString, int &idx, std::string &label)
Given the label string, this method parses the attribute label and the string index.
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 SetFileName(VTK_FILEPATH const char *fileName) override
See vtkAMRBaseReader::SetFileName.
int GetBlockLevel(int blockIdx) override
See vtkAMRBaseReader::GetBlockLevel.
int FillMetaData() override
See vtkAMRBaseReader::FillMetaData.
int GetNumberOfLevels() override
See vtkAMRBaseReader::GetNumberOfLevels.
void ComputeStats(vtkEnzoReaderInternal *internal, std::vector< int > &blocksPerLevel, double min[3])
~vtkAMREnzoReader() override
void GetAMRGridData(int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData.
void ParseCFactor(const std::string &labelString, int &idx, double &factor)
Given the label string, this method parses the corresponding attribute index and conversion factor.
void ParseConversionFactors()
Parses the parameters file and extracts the conversion factors that are used to convert to CGS units.
vtkUniformGrid * GetAMRGrid(int blockIdx) override
See vtkAMRBaseReader::GetAMRGrid.
void SetUpDataArraySelections() override
See vtkAMRBaseReader::SetUpDataArraySelections.
void ReadMetaData() override
See vtkAMRBaseReader::ReadMetaData.
void GetAMRGridPointData(int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) override
See vtkAMRBaseReader::GetAMRGridData.
double GetConversionFactor(const std::string &name)
Given the variable name, return the conversion factor used to convert the data to CGS.
static vtkAMREnzoReader * New()
int GetIndexFromArrayName(std::string arrayName)
Given an array name of the form "array[idx]" this method extracts and returns the corresponding index...
a simple class to control print indentation
hierarchical dataset of vtkUniformGrids