11 #ifndef vtkAMReXGridReaderInternal_h
12 #define vtkAMReXGridReaderInternal_h
21 VTK_ABI_NAMESPACE_BEGIN
58 const long*
format()
const&;
60 const int*
order()
const&;
111 std::vector<std::vector<std::vector<std::vector<double>>>>
levelCells;
167 NoFabHeaderMinMax_v1 = 3,
169 NoFabHeaderFAMinMax_v1 = 4
238 void ReadFAB(std::istream& is);
240 void ReadOrder(std::istream& is, std::vector<int>& ar);
242 void ReadFormat(std::istream& is, std::vector<long>& ar);
245 long ReadBoxArray(std::istream& is,
int* boxArray,
int* boxArrayDim);
252 void* out,
const void* in,
long nitems,
const int* outord,
const int* inord,
int REALSIZE);
254 template <
typename T>
270 template <
typename T>
284 dataArray->
SetName(attribute.c_str());
287 T* arrayPtr =
new T[numberOfPoints];
288 for (
int j = 0; j < nComps; ++j)
290 this->
Convert(arrayPtr, buffers[j].
data(), numberOfPoints, *ord, *ird);
293 for (
int i = 0; i < numberOfPoints; ++i)
304 VTK_ABI_NAMESPACE_END
int GetOffsetOfAttribute(const char *attribute)
void DestroyLevelHeader()
const int * order() const &
void SetFileName(char *fName)
const long * format() const &
abstract class to specify dataset behavior
const std::vector< int > & orderarray() const &
void SetTypedComponent(vtkIdType tupleIdx, int comp, ValueType value)
Set component comp of the tuple at tupleIdx to value.
void PrintSelf(std::ostream &os, vtkIndent indent)
void PermuteOrder(void *out, const void *in, long nitems, const int *outord, const int *inord, int REALSIZE)
RealDescriptor * ReadRealDescriptor(std::istream &is)
Consists of the low-level AMReX Reader used by the vtkAMReXGridReader.
void SetNumberOfTuples(vtkIdType number) override
int ReadNumberOfAttributes(std::istream &is)
~vtkAMReXGridReaderInternal()
bool ReadExtraFabHeader()
void ReadBlockAttribute(std::istream &is, long numberOfPoints, long size, char *buffer)
void GetExtraMultiFabBlockAttribute(const char *attribute, int blockIdx, vtkDataSet *pDataSet)
virtual void SetName(const char *)
Set/get array's name.
int GetAttributeOffsetExtraMultiFab(const char *attribute, int fabIndex)
void PrintFormat(std::vector< long > &ar)
void PrintBoxArray(int *boxArray)
a simple class to control print indentation
vtkAMReXGridHeader * Header
Array-Of-Structs implementation of vtkGenericDataArray.
const std::vector< long > & formatarray() const &
int GetBlockLevel(int blockIdx)
friend class vtkAMReXGridLeveHeader
std::vector< vtkAMReXGridLevelHeader * > LevelHeader
void ReadFAB(std::istream &is)
void CreateVTKAttributeArray(vtkAOSDataArrayTemplate< T > *dataArray, const RealDescriptor *ord, const RealDescriptor *ird, const std::vector< std::vector< char >> &buffers, int numberOfPoints, const std::string &attribute)
int ReadVersion(std::istream &is)
long ReadBoxArray(std::istream &is, int *boxArray, int *boxArrayDim)
void Convert(void *out, const void *in, long nitems, const RealDescriptor &ord, const RealDescriptor &ird)
void ReadOrder(std::istream &is, std::vector< int > &ar)
void GetBlockAttribute(const char *attribute, int blockIdx, vtkDataSet *pDataSet)
void PrintOrder(std::vector< int > &ar)
std::vector< std::vector< vtkAMReXGridLevelHeader * > > ExtraMultiFabHeader
int GetExtraMultiFabIndex(const char *attribute)
vtkAMReXGridReaderInternal()
bool operator==(const RealDescriptor &rd) const
void SetNumberOfComponents(int num) override
bool extraMultiFabHeadersAreRead
void ReadFormat(std::istream &is, std::vector< long > &ar)
int GetBlockIndexWithinLevel(int blockIdx, int level)