23 #ifndef vtkAMReXGridReaderInternal_h
24 #define vtkAMReXGridReaderInternal_h
33 VTK_ABI_NAMESPACE_BEGIN
104 char nameDelim =
'_';
123 std::vector<std::vector<std::vector<std::vector<double>>>>
levelCells;
179 NoFabHeaderMinMax_v1 = 3,
181 NoFabHeaderFAMinMax_v1 = 4
264 void* out,
const void* in,
long nitems,
const int* outord,
const int* inord,
int REALSIZE);
266 template <
typename T>
279 friend class vtkAMReXGridLeveHeader;
282 template <
typename T>
287 int nComps =
static_cast<int>(this->Header->parsedVariableNames[attribute].size());
290 nComps =
static_cast<int>(this->Header->extraMultiFabParsedVarNames[attribute].size());
296 dataArray->
SetName(attribute.c_str());
299 T* arrayPtr =
new T[numberOfPoints];
300 for (
int j = 0; j < nComps; ++j)
302 this->
Convert(arrayPtr, buffers[j].
data(), numberOfPoints, *ord, *ird);
305 for (
int i = 0; i < numberOfPoints; ++i)
316 VTK_ABI_NAMESPACE_END
const int * order() const &
const long * format() const &
const std::vector< long > & formatarray() const &
const std::vector< int > & orderarray() 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)
long ReadBoxArray(std::istream &is, int *boxArray, int *boxArrayDim)
vtkAMReXGridReaderInternal()
std::vector< vtkAMReXGridLevelHeader * > LevelHeader
void GetBlockAttribute(const char *attribute, int blockIdx, vtkDataSet *pDataSet)
void PrintSelf(std::ostream &os, vtkIndent indent)
void DestroyLevelHeader()
int GetAttributeOffsetExtraMultiFab(const char *attribute, int fabIndex)
bool ReadExtraFabHeader()
int GetBlockLevel(int blockIdx)
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)
RealDescriptor * ReadRealDescriptor(std::istream &is)
bool extraMultiFabHeadersAreRead
void PrintOrder(std::vector< int > &ar)
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 GetExtraMultiFabIndex(const char *attribute)
void PrintFormat(std::vector< long > &ar)
void ReadBlockAttribute(std::istream &is, long numberOfPoints, long size, char *buffer)
int ReadVersion(std::istream &is)
std::vector< std::vector< vtkAMReXGridLevelHeader * > > ExtraMultiFabHeader
void SetFileName(char *fName)
void GetExtraMultiFabBlockAttribute(const char *attribute, int blockIdx, vtkDataSet *pDataSet)
~vtkAMReXGridReaderInternal()
vtkAMReXGridHeader * Header
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)