23#ifndef vtkAMREnzoReader_h
24#define vtkAMREnzoReader_h
27#include "vtkIOAMRModule.h"
87 void ParseLabel(
const std::string& labelString,
int& idx, std::string& label);
93 void ParseCFactor(
const std::string& labelString,
int& idx,
double& factor);
134 const char* vtkNotUsed(field))
override
152 std::map<std::string, int> label2idx;
153 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 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 ParseCFactor(const std::string &labelString, int &idx, double &factor)
Given the label string, this method parses the corresponding attribute index and conversion factor.
void GetAMRGridData(const int blockIdx, vtkUniformGrid *block, const char *field) override
See vtkAMRBaseReader::GetAMRGridData.
void ParseConversionFactors()
Parses the parameters file and extracts the conversion factors that are used to convert to CGS units.
void GetAMRGridPointData(const int vtkNotUsed(blockIdx), vtkUniformGrid *vtkNotUsed(block), const char *vtkNotUsed(field)) override
See vtkAMRBaseReader::GetAMRGridData.
vtkUniformGrid * GetAMRGrid(const int blockIdx) override
See vtkAMRBaseReader::GetAMRGrid.
int GetBlockLevel(const int blockIdx) override
See vtkAMRBaseReader::GetBlockLevel.
void SetUpDataArraySelections() override
See vtkAMRBaseReader::SetUpDataArraySelections.
void ReadMetaData() override
See vtkAMRBaseReader::ReadMetaData.
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