31 #ifndef vtkAMRInformation_h 32 #define vtkAMRInformation_h 34 #include "vtkCommonDataModelModule.h" 46 class vtkAMRIndexIterator;
63 void Initialize(
int numLevels,
const int* blocksPerLevel);
69 vtkGetMacro( GridDescription,
int );
78 void GetOrigin(
double origin[3] );
80 void SetOrigin(
const double* origin);
87 {
return static_cast<unsigned int>(this->NumBlocks.size()-1);}
92 unsigned int GetNumberOfDataSets(
unsigned int level)
const;
98 {
return this->NumBlocks.back();}
103 int GetIndex(
unsigned int level,
unsigned int id)
const 104 {
return this->NumBlocks[
level] + id;}
109 void ComputeIndexPair(
unsigned int index,
unsigned int& level,
unsigned int&
id);
114 const double* GetBounds();
119 void GetBounds(
unsigned int level,
unsigned int id,
double* bb);
124 bool GetOrigin(
unsigned int level,
unsigned int id,
double* origin);
129 void GetSpacing(
unsigned int level,
double spacing[3]);
131 bool HasSpacing(
unsigned int level);
137 void SetAMRBox(
unsigned int level,
unsigned int id,
const vtkAMRBox& box);
138 const vtkAMRBox& GetAMRBox(
unsigned int level,
unsigned int id)
const;
144 bool GetCoarsenedAMRBox(
unsigned int level,
unsigned int id,
vtkAMRBox& box)
const;
151 int GetAMRBlockSourceIndex(
int index);
152 void SetAMRBlockSourceIndex(
int index,
int sourceId);
165 void GenerateRefinementRatio();
171 bool HasRefinementRatio();
177 void SetRefinementRatio(
unsigned int level,
int ratio);
182 int GetRefinementRatio(
unsigned int level)
const;
187 void SetSpacing(
unsigned int level,
const double* h);
192 bool HasChildrenInformation();
199 unsigned int *GetParents(
unsigned int level,
unsigned int index,
unsigned int& numParents);
206 unsigned int *GetChildren(
unsigned int level,
unsigned int index,
unsigned int& numChildren);
211 void PrintParentChildInfo(
unsigned int level,
unsigned int index);
217 void GenerateParentChildInformation();
229 bool FindCell(
double q[3],
unsigned int level,
unsigned int index,
int &cellIdx);
234 bool FindGrid(
double q[3],
int level,
unsigned int& gridId);
239 bool FindGrid(
double q[3],
unsigned int& level,
unsigned int& gridId);
245 {
return this->NumBlocks;}
248 {
return this->AllChildren[i];}
258 bool HasValidOrigin();
259 bool HasValidBounds();
260 void UpdateBounds(
const int level,
const int id);
261 void AllocateBoxes(
unsigned int n);
262 void GenerateBlockLevel();
263 void CalculateParentChildRelationShip(
unsigned int level,
265 std::vector<std::vector<unsigned int> >& parents );
273 std::vector<int> NumBlocks;
286 std::vector<std::vector<std::vector<unsigned int> > > AllChildren;
287 std::vector<std::vector<std::vector<unsigned int> > > AllParents;
dynamic, self-adjusting array of unsigned int
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.
dynamic, self-adjusting array of double
dynamic, self-adjusting array of int
a simple class to control print indentation
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...