45#ifndef vtkAMRDataObject_h
46#define vtkAMRDataObject_h
48#include "vtkCommonDataModelModule.h"
54VTK_ABI_NAMESPACE_BEGIN
89 virtual void Initialize(
const std::vector<unsigned int>& blocksPerLevel);
100 virtual
void Initialize(
int numLevels, const
int* blocksPerLevel);
107 void SetGridDescription(
int gridDescription);
108 int GetGridDescription();
115 [[nodiscard]]
unsigned int GetNumberOfLevels() const;
122 [[nodiscard]]
unsigned int GetNumberOfBlocks() const;
128 virtual
unsigned int GetTotalNumberOfBlocks() {
return this->GetNumberOfBlocks(); }
140 unsigned
int GetNumberOfDataSets(
unsigned int level) {
return this->GetNumberOfBlocks(level); }
152 using Superclass::SetDataSet;
174 using Superclass::GetDataSet;
187 [[nodiscard]]
int GetAbsoluteBlockIndex(
unsigned int level,
unsigned int index) const;
194 int GetCompositeIndex(
unsigned int level,
unsigned int index)
196 return this->GetAbsoluteBlockIndex(level, index);
211 void GetLevelAndIndex(
unsigned int compositeIdx,
unsigned int& level,
unsigned int& idx)
213 this->ComputeIndexPair(compositeIdx, level, idx);
275 "This function is deprecated and should not be inherited, use GetAMRMetaData() instead")
278 "SetAMRMetaData() or Initialize(vtkAMRMetaData*) instead")
286 void InitializeInternal();
container of vtkUniformGrid for an AMR data set
a multi-resolution dataset based on vtkCartesianGrid
void CompositeShallowCopy(vtkCompositeDataSet *src) override
ShallowCopy.
vtkImageData * GetDataSetAsImageData(unsigned int level, unsigned int idx)
Get the data set as an image data using the (level, index) pair.
virtual void SetDataSet(unsigned int level, unsigned int idx, vtkDataSet *grid)
At the passed in level, set grid as the idx'th block at that level.
unsigned int GetNumberOfBlocks(unsigned int level) const
Get the number of block at the given level plus this AMR current level Returns 0 if AMRMetaData is in...
virtual const double * GetBounds()
Get the (min/max) bounds of the AMR domain.
vtkAMRMetaData * GetAMRMetaData()
Get/Set the AMR meta data.
static vtkAMRDataObject * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
virtual void InstantiateMetaData()
Create and set a new vtkAMRMetaData as AMRMetaData.
vtkCompositeDataIterator * NewIterator() override
Return a new vtkAMRIterator (the iterator has to be deleted by the user).
void Initialize() override
Restore data object to initial state.
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
virtual void Initialize(vtkAMRMetaData *metadata)
Initialize AMR using the provided metadata by reconstructing the blocksPerLevel.
~vtkAMRDataObject() override
void ComputeIndexPair(unsigned int index, unsigned int &level, unsigned int &id)
Returns the an index pair (level, relative index) given a absolute block index Forward to the interna...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkAMRDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
virtual void Initialize(const std::vector< unsigned int > &blocksPerLevel)
Initialize the AMRMetaData and the AMR with the specified blocksPerLevel.
vtkRectilinearGrid * GetDataSetAsRectilinearGrid(unsigned int level, unsigned int idx)
Get the data set as a rectilinear grid using the (level, index) pair.
void ShallowCopy(vtkDataObject *src) override
ShallowCopy.
void DeepCopy(vtkDataObject *src) override
DeepCopy.
void GetBounds(double bounds[6])
Get the (min/max) bounds of the AMR domain.
static vtkAMRDataObject * New()
void GetMax(double max[3])
Get the (min/max) bounds of the AMR domain.
void SetAMRMetaData(vtkAMRMetaData *metadata)
Get/Set the AMR meta data.
void GetMin(double min[3])
Get the (min/max) bounds of the AMR domain.
void CopyStructure(vtkCompositeDataSet *src) override
CopyStructure.
vtkCartesianGrid * GetDataSetAsCartesianGrid(unsigned int level, unsigned int idx)
Get the data set as a cartesian grid using the (level, index) pair.
Abstract API for vtkImageData and vtkRectilinearGrid.
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
general representation of visualization data
abstract class to specify dataset behavior
topologically and geometrically regular array of data
a simple class to control print indentation
Composite dataset that groups datasets as a collection.
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
#define VTK_DEPRECATED_IN_9_6_0(reason)