19 #ifndef vtkAMRInformation_h
20 #define vtkAMRInformation_h
23 #include "vtkCommonDataModelModule.h"
30 VTK_ABI_NAMESPACE_BEGIN
34 class vtkAMRIndexIterator;
51 void Initialize(
int numLevels,
const int* blocksPerLevel);
57 vtkGetMacro(GridDescription,
int);
66 void GetOrigin(
double origin[3]);
68 void SetOrigin(
const double* origin);
76 return static_cast<unsigned int>(this->NumBlocks.size() - 1);
82 unsigned int GetNumberOfDataSets(
unsigned int level)
const;
97 void ComputeIndexPair(
unsigned int index,
unsigned int&
level,
unsigned int&
id);
112 bool GetOrigin(
unsigned int level,
unsigned int id,
double* origin);
119 bool HasSpacing(
unsigned int level);
125 void SetAMRBox(
unsigned int level,
unsigned int id,
const vtkAMRBox& box);
126 const vtkAMRBox& GetAMRBox(
unsigned int level,
unsigned int id)
const;
132 bool GetCoarsenedAMRBox(
unsigned int level,
unsigned int id,
vtkAMRBox& box)
const;
139 int GetAMRBlockSourceIndex(
int index);
140 void SetAMRBlockSourceIndex(
int index,
int sourceId);
153 void GenerateRefinementRatio();
159 bool HasRefinementRatio();
165 void SetRefinementRatio(
unsigned int level,
int ratio);
170 int GetRefinementRatio(
unsigned int level)
const;
175 void SetSpacing(
unsigned int level,
const double* h);
180 bool HasChildrenInformation();
187 unsigned int* GetParents(
unsigned int level,
unsigned int index,
unsigned int& numParents);
194 unsigned int* GetChildren(
unsigned int level,
unsigned int index,
unsigned int& numChildren);
199 void PrintParentChildInfo(
unsigned int level,
unsigned int index);
205 void GenerateParentChildInformation();
217 bool FindCell(
double q[3],
unsigned int level,
unsigned int index,
int& cellIdx);
222 bool FindGrid(
double q[3],
int level,
unsigned int& gridId);
227 bool FindGrid(
double q[3],
unsigned int&
level,
unsigned int& gridId);
232 const std::vector<int>&
GetNumBlocks()
const {
return this->NumBlocks; }
236 return this->AllChildren[i];
247 bool HasValidOrigin();
248 bool HasValidBounds();
249 void UpdateBounds(
int level,
int id);
250 void AllocateBoxes(
unsigned int n);
251 void GenerateBlockLevel();
252 void CalculateParentChildRelationShip(
unsigned int level,
278 std::vector<std::vector<std::vector<unsigned int>>> AllChildren;
279 std::vector<std::vector<std::vector<unsigned int>>> AllParents;
282 VTK_ABI_NAMESPACE_END
dynamic, self-adjusting array of unsigned int
void GetBounds(T a, double bds[6])
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Encloses a rectangular region of voxel like cells.
bool VTKCOMMONCORE_EXPORT operator==(const std::string &a, const vtkStringToken &b)
dynamic, self-adjusting array of double
dynamic, self-adjusting array of int
a simple class to control print indentation
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...