23#ifndef vtkAMReXGridReaderInternal_h
24#define vtkAMReXGridReaderInternal_h
104 char nameDelim =
'_';
121 std::vector<std::vector<std::vector<std::vector<double>>>>
levelCells;
166 NoFabHeaderMinMax_v1 = 3,
168 NoFabHeaderFAMinMax_v1 = 4
247 void* out,
const void* in,
long nitems,
const int* outord,
const int* inord,
int REALSIZE);
249 template <
typename T>
252 const int numberOfPoints,
const std::string& attribute);
260 friend class vtkAMReXGridLeveHeader;
266 const std::vector<std::vector<char>>& buffers,
const int numberOfPoints,
269 int nComps =
static_cast<int>(this->Header->parsedVariableNames[attribute].size());
270 dataArray->
SetName(attribute.c_str());
273 T* arrayPtr =
new T[numberOfPoints];
274 for (
int j = 0; j < nComps; ++j)
276 this->
Convert(arrayPtr, buffers[j].
data(), numberOfPoints, *ord, *ird);
279 for (
int i = 0; i < numberOfPoints; ++i)
const int * order() const &
const std::vector< long > & formatarray() const &
const std::vector< int > & orderarray() const &
const long * format() const &
RealDescriptor(const long *format, const int *order, int order_length)
Consists of the low-level AMReX Reader used by the vtkAMReXGridReader.
void ReadFAB(std::istream &is)
void ReadFormat(std::istream &is, std::vector< long > &ar)
void Convert(void *out, const void *in, long nitems, const RealDescriptor &ord, const RealDescriptor &ird)
int GetOffsetOfAttribute(const char *attribute)
vtkAMReXGridReaderInternal()
int GetBlockLevel(const int blockIdx)
std::vector< vtkAMReXGridLevelHeader * > LevelHeader
void GetBlockAttribute(const char *attribute, int blockIdx, vtkDataSet *pDataSet)
void PrintSelf(std::ostream &os, vtkIndent indent)
void DestroyLevelHeader()
void ReadBlockAttribute(std::istream &is, int numberOfPoints, int size, char *buffer)
RealDescriptor * ReadRealDescriptor(std::istream &is)
int ReadBoxArray(std::istream &is, int *boxArray, int *boxArrayDim)
void PermuteOrder(void *out, const void *in, long nitems, const int *outord, const int *inord, int REALSIZE)
void PrintBoxArray(int *boxArray)
int GetBlockIndexWithinLevel(int blockIdx, int level)
int ReadNumberOfAttributes(std::istream &is)
void PrintOrder(std::vector< int > &ar)
void PrintFormat(std::vector< long > &ar)
int ReadVersion(std::istream &is)
void SetFileName(char *fName)
~vtkAMReXGridReaderInternal()
vtkAMReXGridHeader * Header
void CreateVTKAttributeArray(vtkAOSDataArrayTemplate< T > *dataArray, const RealDescriptor *ord, const RealDescriptor *ird, const std::vector< std::vector< char > > &buffers, const int numberOfPoints, const std::string &attribute)
void ReadOrder(std::istream &is, std::vector< int > &ar)
Array-Of-Structs implementation of vtkGenericDataArray.
void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value)
Set component comp of the tuple at tupleIdx to value.
virtual void SetName(const char *)
Set/get array's name.
abstract class to specify dataset behavior
void SetNumberOfComponents(int num) override
Set/Get the dimension (n) of the components.
void SetNumberOfTuples(vtkIdType number) override
Set the number of tuples (a component group) in the array.
a simple class to control print indentation
VTKACCELERATORSVTKMCORE_EXPORT vtkDataArray * Convert(const vtkm::cont::Field &input)